apiVersion: apps/v1
kind: StatefulSet
metadata:
  creationTimestamp: "2026-04-02T13:58:16Z"
  generation: 1
  name: openstack-cell1-galera
  namespace: openstack
  ownerReferences:
  - apiVersion: mariadb.openstack.org/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: Galera
    name: openstack-cell1
    uid: 3937b74c-f077-4a80-b12a-d26a5e278bf7
  resourceVersion: "41482"
  uid: 21901ddb-4e3c-42a4-b5f1-80be9d2c98c3
spec:
  persistentVolumeClaimRetentionPolicy:
    whenDeleted: Retain
    whenScaled: Retain
  podManagementPolicy: Parallel
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: galera
      cr: galera-openstack-cell1
      galera/name: openstack-cell1
      galera/namespace: openstack
      galera/uid: 3937b74c-f077-4a80-b12a-d26a5e278bf7
      owner: mariadb-operator
      service: openstack-cell1-galera
  serviceName: openstack-cell1-galera
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: galera
        cr: galera-openstack-cell1
        galera/name: openstack-cell1
        galera/namespace: openstack
        galera/uid: 3937b74c-f077-4a80-b12a-d26a5e278bf7
        owner: mariadb-operator
        service: openstack-cell1-galera
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: service
                  operator: In
                  values:
                  - openstack-cell1-galera
              topologyKey: kubernetes.io/hostname
            weight: 100
      containers:
      - command:
        - /usr/bin/dumb-init
        - --
        - /usr/local/bin/kolla_start
        env:
        - name: CR_CONFIG_HASH
          value: n8dh7dh55bh7bh57h6dh554hcdh5dfhfbh6fh689hbh68fh68fh695h85h575h5fdh66bh8h55bh595h58dh66dh55h9chfdh57dh89h54dh698q
        - name: KOLLA_CONFIG_STRATEGY
          value: COPY_ALWAYS
        image: quay.io/podified-antelope-centos9/openstack-mariadb:current-podified
        imagePullPolicy: IfNotPresent
        lifecycle:
          preStop:
            exec:
              command:
              - /bin/bash
              - /var/lib/operator-scripts/mysql_shutdown.sh
        livenessProbe:
          exec:
            command:
            - /bin/bash
            - /var/lib/operator-scripts/mysql_probe.sh
            - liveness
          failureThreshold: 3
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: galera
        ports:
        - containerPort: 3306
          name: mysql
          protocol: TCP
        - containerPort: 4567
          name: galera
          protocol: TCP
        readinessProbe:
          exec:
            command:
            - /bin/bash
            - /var/lib/operator-scripts/mysql_probe.sh
            - readiness
          failureThreshold: 3
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        startupProbe:
          exec:
            command:
            - /bin/bash
            - /var/lib/operator-scripts/mysql_probe.sh
            - startup
            - "240"
          failureThreshold: 1
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 250
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /var/lib/mysql
          name: mysql-db
          subPath: mysql
        - mountPath: /var/lib/config-data/default
          name: config-data-default
          readOnly: true
        - mountPath: /var/lib/config-data/generated
          name: config-data-generated
        - mountPath: /var/lib/operator-scripts
          name: operator-scripts
          readOnly: true
        - mountPath: /var/lib/kolla/config_files
          name: kolla-config
          readOnly: true
        - mountPath: /var/lib/config-data/tls/certs/galera.crt
          name: galera-tls-certs
          readOnly: true
          subPath: tls.crt
        - mountPath: /var/lib/config-data/tls/private/galera.key
          name: galera-tls-certs
          readOnly: true
          subPath: tls.key
        - mountPath: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
          name: combined-ca-bundle
          readOnly: true
          subPath: tls-ca-bundle.pem
      dnsPolicy: ClusterFirst
      initContainers:
      - command:
        - bash
        - /var/lib/operator-scripts/mysql_bootstrap.sh
        env:
        - name: KOLLA_BOOTSTRAP
          value: "True"
        - name: KOLLA_CONFIG_STRATEGY
          value: COPY_ALWAYS
        image: quay.io/podified-antelope-centos9/openstack-mariadb:current-podified
        imagePullPolicy: IfNotPresent
        name: mysql-bootstrap
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /var/lib/mysql
          name: mysql-db
          subPath: mysql
        - mountPath: /var/lib/config-data/default
          name: config-data-default
          readOnly: true
        - mountPath: /var/lib/config-data/generated
          name: config-data-generated
        - mountPath: /var/lib/operator-scripts
          name: operator-scripts
          readOnly: true
        - mountPath: /var/lib/kolla/config_files
          name: kolla-config
          readOnly: true
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: galera-openstack-cell1
      serviceAccountName: galera-openstack-cell1
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          items:
          - key: config.json
            path: config.json
          name: openstack-cell1-config-data
        name: kolla-config
      - emptyDir: {}
        name: config-data-generated
      - configMap:
          defaultMode: 420
          items:
          - key: galera.cnf.in
            path: galera.cnf.in
          - key: galera_custom.cnf.in
            path: galera_custom.cnf.in
          - key: galera_tls.cnf.in
            path: galera_tls.cnf.in
          name: openstack-cell1-config-data
        name: config-data-default
      - configMap:
          defaultMode: 420
          items:
          - key: mysql_bootstrap.sh
            path: mysql_bootstrap.sh
          - key: mysql_probe.sh
            path: mysql_probe.sh
          - key: mysql_shutdown.sh
            path: mysql_shutdown.sh
          - key: detect_last_commit.sh
            path: detect_last_commit.sh
          - key: detect_gcomm_and_start.sh
            path: detect_gcomm_and_start.sh
          - key: mysql_wsrep_notify.sh
            path: mysql_wsrep_notify.sh
          - key: mysql_root_auth.sh
            path: mysql_root_auth.sh
          name: openstack-cell1-scripts
        name: operator-scripts
      - name: galera-tls-certs
        secret:
          defaultMode: 256
          secretName: cert-galera-openstack-cell1-svc
      - name: combined-ca-bundle
        secret:
          defaultMode: 292
          secretName: combined-ca-bundle
  updateStrategy:
    rollingUpdate:
      partition: 0
    type: RollingUpdate
  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      creationTimestamp: null
      labels:
        app: galera
        cr: galera-openstack-cell1
        galera/name: openstack-cell1
        galera/namespace: openstack
        galera/uid: 3937b74c-f077-4a80-b12a-d26a5e278bf7
        owner: mariadb-operator
        service: openstack-cell1-galera
      name: mysql-db
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 10G
      storageClassName: local-storage
      volumeMode: Filesystem
    status:
      phase: Pending
status:
  availableReplicas: 1
  collisionCount: 0
  currentReplicas: 1
  currentRevision: openstack-cell1-galera-5cd584c9fd
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updateRevision: openstack-cell1-galera-5cd584c9fd
  updatedReplicas: 1
