apiVersion: v1
kind: Pod
metadata:
  annotations:
    cnpg.io/nodeSerial: "1"
    cnpg.io/operatorVersion: 1.28.3
    cnpg.io/podEnvHash: 78df4555db
    cnpg.io/podSpec: '{"volumes":[{"name":"pgdata","persistentVolumeClaim":{"claimName":"cnpg-db-1"}},{"name":"scratch-data","emptyDir":{}},{"name":"shm","emptyDir":{"medium":"Memory"}}],"initContainers":[{"name":"bootstrap-controller","image":"harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg:1.28.3","command":["/manager","bootstrap","/controller/manager","--log-level=info"],"resources":{},"volumeMounts":[{"name":"pgdata","mountPath":"/var/lib/postgresql/data"},{"name":"scratch-data","mountPath":"/run"},{"name":"scratch-data","mountPath":"/controller"},{"name":"shm","mountPath":"/dev/shm"}],"securityContext":{"capabilities":{"drop":["ALL"]},"privileged":false,"runAsNonRoot":true,"readOnlyRootFilesystem":true,"allowPrivilegeEscalation":false,"seccompProfile":{"type":"RuntimeDefault"}}}],"containers":[{"name":"postgres","image":"harbor.atmosphere.dev/ghcr.io/cloudnative-pg/postgresql:18.4-202606221003-minimal-trixie@sha256:538f1b327b8dc7621a94aac79c9c3e5c50dfa29115a6c291e19372a5b876f415","command":["/controller/manager","instance","run","--status-port-tls","--log-level=info"],"ports":[{"name":"postgresql","containerPort":5432,"protocol":"TCP"},{"name":"metrics","containerPort":9187,"protocol":"TCP"},{"name":"status","containerPort":8000,"protocol":"TCP"}],"env":[{"name":"PGDATA","value":"/var/lib/postgresql/data/pgdata"},{"name":"POD_NAME","value":"cnpg-db-1"},{"name":"NAMESPACE","value":"openstack"},{"name":"CLUSTER_NAME","value":"cnpg-db"},{"name":"PSQL_HISTORY","value":"/controller/tmp/.psql_history"},{"name":"PGPORT","value":"5432"},{"name":"PGHOST","value":"/controller/run"},{"name":"TMPDIR","value":"/controller/tmp"}],"resources":{},"volumeMounts":[{"name":"pgdata","mountPath":"/var/lib/postgresql/data"},{"name":"scratch-data","mountPath":"/run"},{"name":"scratch-data","mountPath":"/controller"},{"name":"shm","mountPath":"/dev/shm"}],"livenessProbe":{"httpGet":{"path":"/healthz","port":8000,"scheme":"HTTPS"},"timeoutSeconds":5,"periodSeconds":10},"readinessProbe":{"httpGet":{"path":"/readyz","port":8000,"scheme":"HTTPS"},"timeoutSeconds":5,"periodSeconds":10},"startupProbe":{"httpGet":{"path":"/startupz","port":8000,"scheme":"HTTPS"},"timeoutSeconds":5,"periodSeconds":10,"failureThreshold":360},"securityContext":{"capabilities":{"drop":["ALL"]},"privileged":false,"runAsNonRoot":true,"readOnlyRootFilesystem":true,"allowPrivilegeEscalation":false,"seccompProfile":{"type":"RuntimeDefault"}}}],"terminationGracePeriodSeconds":1800,"nodeSelector":{"openstack-control-plane":"enabled"},"serviceAccountName":"cnpg-db","securityContext":{"runAsUser":26,"runAsGroup":26,"runAsNonRoot":true,"fsGroup":26,"seccompProfile":{"type":"RuntimeDefault"}},"hostname":"cnpg-db-1","affinity":{"podAntiAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"weight":100,"podAffinityTerm":{"labelSelector":{"matchExpressions":[{"key":"cnpg.io/cluster","operator":"In","values":["cnpg-db"]},{"key":"cnpg.io/podRole","operator":"In","values":["instance"]}]},"topologyKey":"kubernetes.io/hostname"}}]}}}'
  creationTimestamp: "2026-07-14T08:43:09Z"
  labels:
    app.kubernetes.io/component: database
    app.kubernetes.io/instance: cnpg-db
    app.kubernetes.io/managed-by: cloudnative-pg
    app.kubernetes.io/name: postgresql
    app.kubernetes.io/version: "18"
    cnpg.io/cluster: cnpg-db
    cnpg.io/instanceName: cnpg-db-1
    cnpg.io/instanceRole: primary
    cnpg.io/podRole: instance
    role: primary
  name: cnpg-db-1
  namespace: openstack
  ownerReferences:
  - apiVersion: postgresql.cnpg.io/v1
    blockOwnerDeletion: true
    controller: true
    kind: Cluster
    name: cnpg-db
    uid: a089227b-9b7e-4ec1-bf61-60b505aaaa6f
  resourceVersion: "3004"
  uid: 0e4d1155-6b16-478c-86ae-3ba490c2b734
spec:
  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
      - podAffinityTerm:
          labelSelector:
            matchExpressions:
            - key: cnpg.io/cluster
              operator: In
              values:
              - cnpg-db
            - key: cnpg.io/podRole
              operator: In
              values:
              - instance
          topologyKey: kubernetes.io/hostname
        weight: 100
  containers:
  - command:
    - /controller/manager
    - instance
    - run
    - --status-port-tls
    - --log-level=info
    env:
    - name: PGDATA
      value: /var/lib/postgresql/data/pgdata
    - name: POD_NAME
      value: cnpg-db-1
    - name: NAMESPACE
      value: openstack
    - name: CLUSTER_NAME
      value: cnpg-db
    - name: PSQL_HISTORY
      value: /controller/tmp/.psql_history
    - name: PGPORT
      value: "5432"
    - name: PGHOST
      value: /controller/run
    - name: TMPDIR
      value: /controller/tmp
    image: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/postgresql:18.4-202606221003-minimal-trixie@sha256:538f1b327b8dc7621a94aac79c9c3e5c50dfa29115a6c291e19372a5b876f415
    imagePullPolicy: IfNotPresent
    livenessProbe:
      failureThreshold: 3
      httpGet:
        path: /healthz
        port: 8000
        scheme: HTTPS
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5
    name: postgres
    ports:
    - containerPort: 5432
      name: postgresql
      protocol: TCP
    - containerPort: 9187
      name: metrics
      protocol: TCP
    - containerPort: 8000
      name: status
      protocol: TCP
    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /readyz
        port: 8000
        scheme: HTTPS
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5
    resources: {}
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      privileged: false
      readOnlyRootFilesystem: true
      runAsNonRoot: true
      seccompProfile:
        type: RuntimeDefault
    startupProbe:
      failureThreshold: 360
      httpGet:
        path: /startupz
        port: 8000
        scheme: HTTPS
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 5
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /var/lib/postgresql/data
      name: pgdata
    - mountPath: /run
      name: scratch-data
    - mountPath: /controller
      name: scratch-data
    - mountPath: /dev/shm
      name: shm
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-pckhd
      readOnly: true
  dnsPolicy: ClusterFirst
  enableServiceLinks: true
  hostname: cnpg-db-1
  initContainers:
  - command:
    - /manager
    - bootstrap
    - /controller/manager
    - --log-level=info
    image: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg:1.28.3
    imagePullPolicy: IfNotPresent
    name: bootstrap-controller
    resources: {}
    securityContext:
      allowPrivilegeEscalation: false
      capabilities:
        drop:
        - ALL
      privileged: false
      readOnlyRootFilesystem: true
      runAsNonRoot: true
      seccompProfile:
        type: RuntimeDefault
    terminationMessagePath: /dev/termination-log
    terminationMessagePolicy: File
    volumeMounts:
    - mountPath: /var/lib/postgresql/data
      name: pgdata
    - mountPath: /run
      name: scratch-data
    - mountPath: /controller
      name: scratch-data
    - mountPath: /dev/shm
      name: shm
    - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
      name: kube-api-access-pckhd
      readOnly: true
  nodeName: instance
  nodeSelector:
    openstack-control-plane: enabled
  preemptionPolicy: PreemptLowerPriority
  priority: 0
  restartPolicy: Always
  schedulerName: default-scheduler
  securityContext:
    fsGroup: 26
    runAsGroup: 26
    runAsNonRoot: true
    runAsUser: 26
    seccompProfile:
      type: RuntimeDefault
  serviceAccount: cnpg-db
  serviceAccountName: cnpg-db
  terminationGracePeriodSeconds: 1800
  tolerations:
  - effect: NoExecute
    key: node.kubernetes.io/not-ready
    operator: Exists
    tolerationSeconds: 300
  - effect: NoExecute
    key: node.kubernetes.io/unreachable
    operator: Exists
    tolerationSeconds: 300
  volumes:
  - name: pgdata
    persistentVolumeClaim:
      claimName: cnpg-db-1
  - emptyDir: {}
    name: scratch-data
  - emptyDir:
      medium: Memory
    name: shm
  - name: kube-api-access-pckhd
    projected:
      defaultMode: 420
      sources:
      - serviceAccountToken:
          expirationSeconds: 3607
          path: token
      - configMap:
          items:
          - key: ca.crt
            path: ca.crt
          name: kube-root-ca.crt
      - downwardAPI:
          items:
          - fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
            path: namespace
status:
  conditions:
  - lastProbeTime: null
    lastTransitionTime: "2026-07-14T08:43:11Z"
    status: "True"
    type: Initialized
  - lastProbeTime: null
    lastTransitionTime: "2026-07-14T08:43:20Z"
    status: "True"
    type: Ready
  - lastProbeTime: null
    lastTransitionTime: "2026-07-14T08:43:20Z"
    status: "True"
    type: ContainersReady
  - lastProbeTime: null
    lastTransitionTime: "2026-07-14T08:43:09Z"
    status: "True"
    type: PodScheduled
  containerStatuses:
  - containerID: containerd://bd957f54b6e2efeff511d92bb8f3b5f40ae820f54872826ab548b69815d18ca8
    image: sha256:49639bf7af17aefb93dc7457fd8dfe62a249af7791c4bda55159a35e14f2752e
    imageID: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/postgresql@sha256:538f1b327b8dc7621a94aac79c9c3e5c50dfa29115a6c291e19372a5b876f415
    lastState: {}
    name: postgres
    ready: true
    restartCount: 0
    started: true
    state:
      running:
        startedAt: "2026-07-14T08:43:11Z"
  hostIP: 199.19.213.62
  initContainerStatuses:
  - containerID: containerd://2dd889ef11df0cfc6544515e2dd8c78099118a0885aa739e22f88655f7db73f1
    image: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg:1.28.3
    imageID: harbor.atmosphere.dev/ghcr.io/cloudnative-pg/cloudnative-pg@sha256:0c7889d0f4999fab6871422cc41ab0c10eb5b14d3df33544bc46ffb0d4224b30
    lastState: {}
    name: bootstrap-controller
    ready: true
    restartCount: 0
    started: false
    state:
      terminated:
        containerID: containerd://2dd889ef11df0cfc6544515e2dd8c78099118a0885aa739e22f88655f7db73f1
        exitCode: 0
        finishedAt: "2026-07-14T08:43:10Z"
        reason: Completed
        startedAt: "2026-07-14T08:43:10Z"
  phase: Running
  podIP: 10.0.0.142
  podIPs:
  - ip: 10.0.0.142
  qosClass: BestEffort
  startTime: "2026-07-14T08:43:09Z"
