apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    meta.helm.sh/release-name: cloudnative-pg
    meta.helm.sh/release-namespace: cnpg-system
  creationTimestamp: "2026-07-14T17:35:03Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: cloudnative-pg
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: cloudnative-pg
    app.kubernetes.io/version: 1.28.1
    helm.sh/chart: cloudnative-pg-0.27.1
  name: cloudnative-pg
  namespace: cnpg-system
  resourceVersion: "2674"
  uid: a9b4aa1a-0176-43b4-9ec9-a7e79731c2e3
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: cloudnative-pg
      app.kubernetes.io/name: cloudnative-pg
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/config: 41a3bad5593fe49346da18c09ee5c8b91cfa7ffa36eff2e7eec4be4ac9df433d
        checksum/monitoring-config: 9d6c19452de04094e4742a1a33f31e02ec1f1f9b13c11c03566081a1accccaa5
        checksum/rbac: ca9e7bb2212674b1b9cf4e634187b34a5ca7d015f030c62729ca6496c8208253
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: cloudnative-pg
        app.kubernetes.io/name: cloudnative-pg
    spec:
      containers:
      - args:
        - controller
        - --leader-elect
        - --max-concurrent-reconciles=10
        - --config-map-name=cnpg-controller-manager-config
        - --webhook-port=9443
        command:
        - /manager
        env:
        - name: OPERATOR_IMAGE_NAME
          value: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg:1.28.4
        - name: OPERATOR_NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: MONITORING_QUERIES_CONFIGMAP
          value: cnpg-default-monitoring
        image: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg:1.28.4
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 3
          httpGet:
            path: /readyz
            port: webhook-server
            scheme: HTTPS
          initialDelaySeconds: 3
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: manager
        ports:
        - containerPort: 8080
          name: metrics
          protocol: TCP
        - containerPort: 9443
          name: webhook-server
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /readyz
            port: webhook-server
            scheme: HTTPS
          initialDelaySeconds: 3
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: 500m
        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          readOnlyRootFilesystem: true
          runAsGroup: 10001
          runAsUser: 10001
          seccompProfile:
            type: RuntimeDefault
        startupProbe:
          failureThreshold: 6
          httpGet:
            path: /readyz
            port: webhook-server
            scheme: HTTPS
          periodSeconds: 5
          successThreshold: 1
          timeoutSeconds: 1
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /controller
          name: scratch-data
        - mountPath: /run/secrets/cnpg.io/webhook
          name: webhook-certificates
      dnsPolicy: ClusterFirst
      nodeSelector:
        openstack-control-plane: enabled
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      serviceAccount: cloudnative-pg
      serviceAccountName: cloudnative-pg
      terminationGracePeriodSeconds: 10
      volumes:
      - emptyDir: {}
        name: scratch-data
      - name: webhook-certificates
        secret:
          defaultMode: 420
          optional: true
          secretName: cnpg-webhook-cert
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-07-14T17:35:10Z"
    lastUpdateTime: "2026-07-14T17:35:10Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-07-14T17:35:03Z"
    lastUpdateTime: "2026-07-14T17:35:10Z"
    message: ReplicaSet "cloudnative-pg-6747b4cb98" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
