apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    meta.helm.sh/release-name: cloudnative-pg
    meta.helm.sh/release-namespace: openstack
  creationTimestamp: "2026-07-14T08:42:37Z"
  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: openstack
  resourceVersion: "2581"
  uid: c9c5014f-72c6-4cbd-b58e-c5292746aa08
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: a08788114f2a5ae0b68a6f0a95b9e026792ccf52cea3f0e8fcbe1445cb567f2b
        checksum/monitoring-config: c843a8170f5de876475fec5add61a10e2bfb2201c85533a0b30a0e14dd0ad4d1
        checksum/rbac: d17e9ce9e2c119d078279c98571d4a6843ed7c29d9cd74be95300dfd2b7cac54
      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.3
        - 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.3
        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-14T08:42:43Z"
    lastUpdateTime: "2026-07-14T08:42:43Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-07-14T08:42:37Z"
    lastUpdateTime: "2026-07-14T08:42:43Z"
    message: ReplicaSet "cloudnative-pg-f9bb4dcf9" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
