{{- if .Values.frontend.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "datacenter-docs.frontend.fullname" . }} labels: {{- include "datacenter-docs.frontend.labels" . | nindent 4 }} spec: replicas: {{ .Values.frontend.replicaCount }} selector: matchLabels: {{- include "datacenter-docs.frontend.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "datacenter-docs.frontend.selectorLabels" . | nindent 8 }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "datacenter-docs.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: frontend securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}" imagePullPolicy: {{ .Values.frontend.image.pullPolicy }} ports: - name: http containerPort: {{ .Values.frontend.service.targetPort }} protocol: TCP livenessProbe: httpGet: path: / port: http initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: / port: http initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 resources: {{- toYaml .Values.frontend.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}