---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-headless
spec:
  selector:
    matchLabels:
      app: api-headless
  template:
    spec:
      initContainers:
        - name: migrate-database
          imagePullPolicy: Always
      containers:
        - name: api-headless
          imagePullPolicy: Always
          env:
            - name: APP_ENV
              value: staging
            - name: S3_ENDPOINT
              valueFrom:
                secretKeyRef:
                  name: rook-ceph-object-user-object-store-dev-object-store-dev-admin
                  key: Endpoint
            - name: S3_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: rook-ceph-object-user-object-store-dev-object-store-dev-admin
                  key: AccessKey
            - name: S3_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: rook-ceph-object-user-object-store-dev-object-store-dev-admin
                  key: SecretKey
