apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    meta.helm.sh/release-name: barbican
    meta.helm.sh/release-namespace: openstack
    openstackhelm.openstack.org/release_uuid: ""
  creationTimestamp: "2026-04-06T21:17:28Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
    application: barbican
    component: api
    release_group: barbican
  name: barbican-api
  namespace: openstack
  resourceVersion: "8413"
  uid: bd5f2c3e-378a-49db-a99b-17f12dedb1cb
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      application: barbican
      component: api
      release_group: barbican
  strategy:
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        configmap-bin-hash: 77a236bc7d97a4af292faf9e8e9159a5f98d4791ee8f5be1f85877388520b38c
        configmap-etc-hash: d71cb2321d2c119d5634ac05f31b8f10dfe211e793cd3f2685318902805d9462
        openstackhelm.openstack.org/release_uuid: ""
      creationTimestamp: null
      labels:
        application: barbican
        component: api
        release_group: barbican
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: release_group
                  operator: In
                  values:
                  - barbican
                - key: application
                  operator: In
                  values:
                  - barbican
                - key: component
                  operator: In
                  values:
                  - api
              topologyKey: kubernetes.io/hostname
            weight: 10
      containers:
      - command:
        - /tmp/barbican.sh
        - start
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/barbican:main@sha256:ae7aba7c015e3feafdae82fc88c47beeee41fdba200cd0abe8e38dcb530e6d7a
        imagePullPolicy: IfNotPresent
        lifecycle:
          preStop:
            exec:
              command:
              - /tmp/barbican.sh
              - stop
        name: barbican-api
        ports:
        - containerPort: 9311
          name: b-api
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 9311
            scheme: HTTP
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /etc/barbican
          name: etcbarbican
        - mountPath: /etc/barbican/barbican-api-uwsgi.ini
          name: barbican-etc
          readOnly: true
          subPath: barbican-api-uwsgi.ini
        - mountPath: /etc/barbican/barbican.conf
          name: barbican-etc
          readOnly: true
          subPath: barbican.conf
        - mountPath: /etc/barbican/api_audit_map.conf
          name: barbican-etc
          readOnly: true
          subPath: api_audit_map.conf
        - mountPath: /etc/barbican/barbican-api-paste.ini
          name: barbican-etc
          readOnly: true
          subPath: barbican-api-paste.ini
        - mountPath: /etc/barbican/policy.yaml
          name: barbican-etc
          readOnly: true
          subPath: policy.yaml
        - mountPath: /tmp/barbican.sh
          name: barbican-bin
          readOnly: true
          subPath: barbican.sh
      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,openstack:keystone-api,openstack:rabbitmq-barbican
        - name: DEPENDENCY_JOBS
          value: barbican-db-sync,barbican-ks-user,barbican-ks-endpoints,barbican-rabbit-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: Always
      schedulerName: default-scheduler
      securityContext:
        runAsUser: 42424
      serviceAccount: barbican-api
      serviceAccountName: barbican-api
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir: {}
        name: pod-tmp
      - emptyDir: {}
        name: etcbarbican
      - name: barbican-etc
        secret:
          defaultMode: 292
          secretName: barbican-etc
      - configMap:
          defaultMode: 365
          name: barbican-bin
        name: barbican-bin
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-04-06T21:17:28Z"
    lastUpdateTime: "2026-04-06T21:17:28Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-04-06T21:17:28Z"
    lastUpdateTime: "2026-04-06T21:19:18Z"
    message: ReplicaSet "barbican-api-6bc67cc77" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
