apiVersion: batch/v1
kind: Job
metadata:
  annotations:
    helm.sh/hook: post-install,post-upgrade
    helm.sh/hook-weight: "-4"
  creationTimestamp: "2026-04-09T02:18:02Z"
  generation: 1
  labels:
    application: barbican
    component: db-sync
    release_group: barbican
  name: barbican-db-sync
  namespace: openstack
  resourceVersion: "7450"
  uid: a14395ed-fbdc-458d-9510-62bf01849eaf
spec:
  backoffLimit: 1000
  completionMode: NonIndexed
  completions: 1
  parallelism: 1
  selector:
    matchLabels:
      batch.kubernetes.io/controller-uid: a14395ed-fbdc-458d-9510-62bf01849eaf
  suspend: false
  template:
    metadata:
      annotations:
        openstackhelm.openstack.org/release_uuid: ""
      creationTimestamp: null
      labels:
        application: barbican
        batch.kubernetes.io/controller-uid: a14395ed-fbdc-458d-9510-62bf01849eaf
        batch.kubernetes.io/job-name: barbican-db-sync
        component: db-sync
        controller-uid: a14395ed-fbdc-458d-9510-62bf01849eaf
        job-name: barbican-db-sync
        release_group: barbican
    spec:
      containers:
      - command:
        - /bin/bash
        - -c
        - /tmp/db-sync.sh
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/barbican:2024.1@sha256:3df102a2dfc79b4bcb3c32547f8995f1e08597123829cc77e6081f690233bacc
        imagePullPolicy: IfNotPresent
        name: barbican-db-sync
        resources: {}
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /tmp/db-sync.sh
          name: db-sync-sh
          readOnly: true
          subPath: db-sync.sh
        - mountPath: /etc/barbican
          name: etc-service
        - mountPath: /etc/barbican/barbican.conf
          name: db-sync-conf
          readOnly: true
          subPath: barbican.conf
        - mountPath: /etc/barbican/logging.conf
          name: db-sync-conf
          readOnly: true
          subPath: logging.conf
        - mountPath: /tmp/simple_crypto_kek_rewrap.py
          name: db-sync-sh
          readOnly: true
          subPath: simple_crypto_kek_rewrap.py
        - mountPath: /tmp/old_kek
          name: db-sync-conf
          readOnly: true
          subPath: old_kek
      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_JOBS
          value: barbican-db-init
        - name: DEPENDENCY_DAEMONSET
        - name: DEPENDENCY_CONTAINER
        - name: DEPENDENCY_POD_JSON
        - name: DEPENDENCY_CUSTOM_RESOURCE
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/kubernetes-entrypoint:edge@sha256:8921b64b87af184a1421dd856b2703bcf3cff9f50863cd0d18371cf964a87bd3
        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: barbican-db-sync
      serviceAccountName: barbican-db-sync
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir: {}
        name: pod-tmp
      - configMap:
          defaultMode: 365
          name: barbican-bin
        name: db-sync-sh
      - emptyDir: {}
        name: etc-service
      - name: db-sync-conf
        secret:
          defaultMode: 292
          secretName: barbican-etc
status:
  completionTime: "2026-04-09T02:18:16Z"
  conditions:
  - lastProbeTime: "2026-04-09T02:18:16Z"
    lastTransitionTime: "2026-04-09T02:18:16Z"
    status: "True"
    type: Complete
  ready: 0
  startTime: "2026-04-09T02:18:02Z"
  succeeded: 1
  uncountedTerminatedPods: {}
