apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "pgcat.fullname" . }} labels: {{- include "pgcat.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: {{- include "pgcat.selectorLabels" . | nindent 6 }} template: metadata: annotations: checksum/secret: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} {{- end }} labels: {{- include "pgcat.selectorLabels" . | nindent 8 }} spec: {{- with .Values.image.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "pgcat.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: {{ .Chart.Name }} securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - name: pgcat containerPort: {{ .Values.configuration.general.port }} protocol: TCP livenessProbe: tcpSocket: port: pgcat readinessProbe: tcpSocket: port: pgcat resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: - mountPath: /etc/pgcat name: config {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} volumes: - secret: defaultMode: 420 secretName: {{ include "pgcat.fullname" . }} name: config