apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "1"
    meta.helm.sh/release-name: magnum
    meta.helm.sh/release-namespace: openstack
    openstackhelm.openstack.org/release_uuid: ""
  creationTimestamp: "2026-03-06T01:22:59Z"
  generation: 1
  labels:
    app.kubernetes.io/managed-by: Helm
    application: magnum
    component: api
    release_group: magnum
  name: magnum-api
  namespace: openstack
  resourceVersion: "24164"
  uid: 77edef2a-ee17-4e18-89bd-07949ae7fa5c
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 3
  selector:
    matchLabels:
      application: magnum
      component: api
      release_group: magnum
  strategy:
    rollingUpdate:
      maxSurge: 3
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      annotations:
        configmap-bin-hash: f92208e88a791caba6d7d280c8abf3458eee0b251b24c8de414018ec68b7473b
        configmap-etc-hash: 92167555d2dde4ffc2683e006dc7d6cc5d3730835633649cde3693766822fcb4
        openstackhelm.openstack.org/release_uuid: ""
      creationTimestamp: null
      labels:
        application: magnum
        component: api
        release_group: magnum
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: release_group
                  operator: In
                  values:
                  - magnum
                - key: application
                  operator: In
                  values:
                  - magnum
                - key: component
                  operator: In
                  values:
                  - api
              topologyKey: kubernetes.io/hostname
            weight: 10
      containers:
      - command:
        - /tmp/magnum-api.sh
        - start
        image: harbor.atmosphere.dev/ghcr.io/vexxhost/magnum:2025.1@sha256:2a40d95b84b3a4d012809098146a80a1101ebf18feeb536371d6bb5527295b93
        imagePullPolicy: IfNotPresent
        lifecycle:
          preStop:
            exec:
              command:
              - /tmp/magnum-api.sh
              - stop
        name: magnum-api
        ports:
        - containerPort: 9511
          name: m-api
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /
            port: 9511
            scheme: HTTP
          initialDelaySeconds: 5
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources: {}
        securityContext:
          runAsUser: 42424
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp
          name: pod-tmp
        - mountPath: /tmp/magnum-api.sh
          name: magnum-bin
          readOnly: true
          subPath: magnum-api.sh
        - mountPath: /etc/magnum
          name: pod-etc-magnum
        - mountPath: /var/cache/magnum
          name: pod-var-cache-magnum
        - mountPath: /etc/magnum/magnum.conf
          name: magnum-etc
          readOnly: true
          subPath: magnum.conf
        - mountPath: /etc/magnum/magnum-api-uwsgi.ini
          name: magnum-etc
          readOnly: true
          subPath: magnum-api-uwsgi.ini
        - mountPath: /etc/magnum/api-paste.ini
          name: magnum-etc
          readOnly: true
          subPath: api-paste.ini
        - mountPath: /etc/magnum/policy.yaml
          name: magnum-etc
          readOnly: true
          subPath: policy.yaml
        - mountPath: /var/lib/magnum/tmp
          name: magnum-lock-path
      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-magnum,openstack:barbican-api,openstack:heat-api
        - name: DEPENDENCY_JOBS
          value: magnum-db-sync,magnum-ks-user,magnum-domain-ks-user,magnum-ks-endpoints,magnum-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: {}
      serviceAccount: magnum-api
      serviceAccountName: magnum-api
      terminationGracePeriodSeconds: 30
      volumes:
      - emptyDir: {}
        name: pod-tmp
      - emptyDir: {}
        name: pod-etc-magnum
      - emptyDir: {}
        name: pod-var-cache-magnum
      - configMap:
          defaultMode: 365
          name: magnum-bin
        name: magnum-bin
      - name: magnum-etc
        secret:
          defaultMode: 292
          secretName: magnum-etc
      - emptyDir: {}
        name: magnum-lock-path
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2026-03-06T01:22:59Z"
    lastUpdateTime: "2026-03-06T01:22:59Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2026-03-06T01:22:59Z"
    lastUpdateTime: "2026-03-06T01:25:45Z"
    message: ReplicaSet "magnum-api-5df988b789" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 1
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
