apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
        aadpodidbinding: api-identity
    spec:
      containers:
        - env:
            - name: CORS_DEFAULT_ALLOWED_ORIGIN
              value: "http://localhost:8000"
            - name: SECRET_KEY
              value: insecure
            - name: DEBUG
              value: "false"
            - name: DATABASE_HOST
              value: "tao-test-db.postgres.database.azure.com"
            - name: DATABASE_NAME
              value: "data"
            - name: DATABASE_USER
              value: "writer@tao-test-db"
          image: taoregistry.azurecr.io/azure-aks-django:#{Build.BuildId}#
          imagePullPolicy: IfNotPresent
          name: main
          resources:
            limits:
              cpu: 500m
              memory: 512Mi
            requests:
              cpu: 500m
              memory: 512Mi
      restartPolicy: Always
