apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    helm.sh/hook: post-install,post-upgrade
    helm.sh/hook-weight: "-5"
  creationTimestamp: "2026-04-26T06:06:46Z"
  generation: 1
  labels:
    application: neutron
    component: db-init
    release_group: neutron
  name: neutron-db-init
  namespace: openstack
  resourceVersion: "15846"
  uid: cd8ae68c-4bb7-47d1-a14a-74e5eb1f6d56
spec:
  backoffLimit: 1000
  completionMode: NonIndexed
  completions: 1
  parallelism: 1
  selector:
    matchLabels:
      batch.kubernetes.io/controller-uid: cd8ae68c-4bb7-47d1-a14a-74e5eb1f6d56
  suspend: false
  template:
    metadata:
      annotations:
        openstackhelm.openstack.org/release_uuid: ""
      creationTimestamp: null
      labels:
        application: neutron
        batch.kubernetes.io/controller-uid: cd8ae68c-4bb7-47d1-a14a-74e5eb1f6d56
        batch.kubernetes.io/job-name: neutron-db-init
        component: db-init
        controller-uid: cd8ae68c-4bb7-47d1-a14a-74e5eb1f6d56
        job-name: neutron-db-init
        release_group: neutron
    spec:
      containers:
      - command:
        - /tmp/db-init.py
        env:
        - name: ROOT_DB_CONNECTION
          valueFrom:
            secretKeyRef:
              key: DB_CONNECTION
              name: neutron-db-admin
        - name: OPENSTACK_CONFIG_FILE
          value: /etc/neutron/neutron.conf
        - name: OPENSTACK_CONFIG_DB_SECTION
          value: database
        - name: OPENSTACK_CONFIG_DB_KEY
          value: connection
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/heat:main@sha256:3be2b3d1ab07714491f915307416d288783e484669a4b58a8fe3b7412b97044c
        imagePullPolicy: IfNotPresent
        name: neutron-db-init-0
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /tmp/db-init.py
          name: db-init-sh
          readOnly: true
          subPath: db-init.py
        - mountPath: /etc/neutron
          name: etc-service
        - mountPath: /etc/neutron/neutron.conf
          name: db-init-conf
          readOnly: true
          subPath: neutron.conf
        - mountPath: /etc/neutron/logging.conf
          name: db-init-conf
          readOnly: true
          subPath: logging.conf
      dnsPolicy: ClusterFirst
      initContainers:
      - command:
        - kubernetes-entrypoint
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.name
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              apiVersion: v1
              fieldPath: metadata.namespace
        - name: INTERFACE_NAME
          value: eth0
        - name: PATH
          value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/
        - name: DEPENDENCY_SERVICE
          value: openstack:percona-xtradb-haproxy
        - name: DEPENDENCY_DAEMONSET
        - name: DEPENDENCY_CONTAINER
        - name: DEPENDENCY_POD_JSON
        - name: DEPENDENCY_CUSTOM_RESOURCE
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/kubernetes-entrypoint:edge
        imagePullPolicy: IfNotPresent
        name: init
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
          runAsUser: 65534
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      nodeSelector:
        openstack-control-plane: enabled
      restartPolicy: OnFailure
      schedulerName: default-scheduler
      securityContext: {}
      serviceAccount: neutron-db-init
      serviceAccountName: neutron-db-init
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir: {}
        name: pod-tmp
      - configMap:
          defaultMode: 365
          name: neutron-bin
        name: db-init-sh
      - emptyDir: {}
        name: etc-service
      - name: db-init-conf
        secret:
          defaultMode: 292
          secretName: neutron-etc
status:
  completionTime: "2026-04-26T06:07:55Z"
  conditions:
  - lastProbeTime: "2026-04-26T06:07:56Z"
    lastTransitionTime: "2026-04-26T06:07:56Z"
    status: "True"
    type: Complete
  ready: 0
  startTime: "2026-04-26T06:06:46Z"
  succeeded: 1
  uncountedTerminatedPods: {}
