apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "interhub.fullname" . }} labels: {{- include "interhub.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "interhub.selectorLabels" . | nindent 6 }} strategy: type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 0 template: metadata: labels: {{- include "interhub.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: inter-hub image: {{ include "interhub.image" . | quote }} imagePullPolicy: {{ .Values.image.pullPolicy }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} ports: - name: http containerPort: {{ .Values.service.targetPort }} protocol: TCP envFrom: - secretRef: name: {{ .Values.envSecretName | quote }} {{- if .Values.probes.enabled }} readinessProbe: httpGet: path: {{ .Values.probes.path }} port: {{ .Values.probes.port }} initialDelaySeconds: {{ .Values.probes.readiness.initialDelaySeconds }} periodSeconds: {{ .Values.probes.readiness.periodSeconds }} timeoutSeconds: {{ .Values.probes.readiness.timeoutSeconds }} failureThreshold: {{ .Values.probes.readiness.failureThreshold }} livenessProbe: httpGet: path: {{ .Values.probes.path }} port: {{ .Values.probes.port }} initialDelaySeconds: {{ .Values.probes.liveness.initialDelaySeconds }} periodSeconds: {{ .Values.probes.liveness.periodSeconds }} timeoutSeconds: {{ .Values.probes.liveness.timeoutSeconds }} failureThreshold: {{ .Values.probes.liveness.failureThreshold }} {{- end }} resources: {{- toYaml .Values.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 }}