--- apiVersion: batch/v1 items: - apiVersion: batch/v1 kind: Job metadata: annotations: hash: n5c8h5fbhfh558h67fh58h95h667h556h578hf5h59ch5f7hffh68h56h5d5hb6hfch545h644h588h658h648h58bh544h6fh54h8ch6h669hddq creationTimestamp: "2026-03-12T12:45:52Z" generation: 1 labels: app: mariadbschema cr: cinder_74a2 owner: mariadb-operator managedFields: - apiVersion: batch/v1 fieldsType: FieldsV1 fieldsV1: f:metadata: f:annotations: .: {} f:hash: {} f:labels: .: {} f:app: {} f:cr: {} f:owner: {} f:ownerReferences: .: {} k:{"uid":"487f28df-dce8-4318-b66b-40c0601175c3"}: {} f:spec: f:backoffLimit: {} f:completionMode: {} f:completions: {} f:manualSelector: {} f:parallelism: {} f:podReplacementPolicy: {} f:suspend: {} f:template: f:spec: f:containers: k:{"name":"mariadb-account-create-update"}: .: {} f:command: {} f:env: .: {} k:{"name":"DatabasePassword"}: .: {} f:name: {} f:valueFrom: .: {} f:secretKeyRef: {} f:image: {} f:imagePullPolicy: {} f:name: {} f:resources: {} f:terminationMessagePath: {} f:terminationMessagePolicy: {} f:volumeMounts: .: {} k:{"mountPath":"/var/lib/operator-scripts"}: .: {} f:mountPath: {} f:name: {} f:readOnly: {} f:dnsPolicy: {} f:restartPolicy: {} f:schedulerName: {} f:securityContext: {} f:serviceAccount: {} f:serviceAccountName: {} f:terminationGracePeriodSeconds: {} f:volumes: .: {} k:{"name":"operator-scripts"}: .: {} f:configMap: .: {} f:defaultMode: {} f:items: {} f:name: {} f:name: {} f:ttlSecondsAfterFinished: {} manager: manager operation: Update time: "2026-03-12T12:45:52Z" - apiVersion: batch/v1 fieldsType: FieldsV1 fieldsV1: f:status: f:completionTime: {} f:conditions: {} f:ready: {} f:startTime: {} f:succeeded: {} f:terminating: {} f:uncountedTerminatedPods: {} manager: kube-controller-manager operation: Update subresource: status time: "2026-03-12T12:46:08Z" name: cinder-74a2-account-create-update namespace: openstack ownerReferences: - apiVersion: mariadb.openstack.org/v1beta1 blockOwnerDeletion: true controller: true kind: MariaDBAccount name: cinder uid: 487f28df-dce8-4318-b66b-40c0601175c3 resourceVersion: "27699" uid: 8dca1e72-ec13-49c7-b66f-e10434dce55d spec: backoffLimit: 6 completionMode: NonIndexed completions: 1 manualSelector: false parallelism: 1 podReplacementPolicy: TerminatingOrFailed selector: matchLabels: batch.kubernetes.io/controller-uid: 8dca1e72-ec13-49c7-b66f-e10434dce55d suspend: false template: metadata: creationTimestamp: null labels: batch.kubernetes.io/controller-uid: 8dca1e72-ec13-49c7-b66f-e10434dce55d batch.kubernetes.io/job-name: cinder-74a2-account-create-update controller-uid: 8dca1e72-ec13-49c7-b66f-e10434dce55d job-name: cinder-74a2-account-create-update spec: containers: - command: - /bin/sh - -c - | #!/bin/bash MYSQL_REMOTE_HOST="openstack.openstack.svc" source /var/lib/operator-scripts/mysql_root_auth.sh export DatabasePassword=${DatabasePassword:?"Please specify a DatabasePassword variable."} MYSQL_CMD="mysql -h openstack.openstack.svc -u root -P 3306" if [ -n "cinder" ]; then GRANT_DATABASE="cinder" else GRANT_DATABASE="*" fi # going for maximum compatibility here: # 1. MySQL 8 no longer allows implicit create user when GRANT is used # 2. MariaDB has "CREATE OR REPLACE", but MySQL does not # 3. create user with CREATE but then do all password and TLS with ALTER to # support updates $MYSQL_CMD <