apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "pxc-operator.fullname" . }} namespace: {{ .Release.Namespace }} labels: {{ include "pxc-operator.labels" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: app.kubernetes.io/component: operator app.kubernetes.io/name: {{ include "pxc-operator.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ include "pxc-operator.name" . }} strategy: rollingUpdate: maxUnavailable: 1 type: RollingUpdate template: metadata: labels: app.kubernetes.io/component: operator app.kubernetes.io/name: {{ include "pxc-operator.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ include "pxc-operator.name" . }} spec: serviceAccountName: {{ include "pxc-operator.fullname" . }} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} terminationGracePeriodSeconds: 600 containers: - name: percona-xtradb-cluster-operator image: {{ include "pxc-operator.image" . }} imagePullPolicy: {{ .Values.imagePullPolicy }} ports: - containerPort: 8080 name: metrics protocol: TCP command: - percona-xtradb-cluster-operator {{- if .Values.containerSecurityContext.readOnlyRootFilesystem }} volumeMounts: - name: tmpdir mountPath: /tmp {{- end }} env: - name: WATCH_NAMESPACE {{- if .Values.watchAllNamespaces }} value: "" {{- else }} value: "{{ default .Release.Namespace .Values.watchNamespace }}" {{- end }} - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name - name: OPERATOR_NAME value: {{ include "pxc-operator.fullname" . }} - name: LOG_STRUCTURED value: "{{ .Values.logStructured }}" - name: LOG_LEVEL value: "{{ .Values.logLevel }}" - name: DISABLE_TELEMETRY value: "{{ .Values.disableTelemetry }}" livenessProbe: failureThreshold: 3 httpGet: path: /metrics port: metrics scheme: HTTP resources: {{- toYaml .Values.resources | nindent 12 }} {{- with .Values.containerSecurityContext }} securityContext: {{- toYaml . | nindent 12 }} {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- if .Values.containerSecurityContext.readOnlyRootFilesystem }} volumes: - name: tmpdir emptyDir: {} {{- end }} {{- if .Values.watchAllNamespaces }} --- apiVersion: v1 kind: Service metadata: name: {{ include "pxc-operator.name" . }} labels: name: {{ include "pxc-operator.name" . }} spec: ports: - port: 443 targetPort: 9443 selector: app.kubernetes.io/name: {{ include "pxc-operator.name" . }} {{- end }}