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