apiVersion: apps/v1
kind: Deployment
metadata:
  name: photogalleryworker
spec:
  replicas: 1
  minReadySeconds: 5
  selector:
    matchLabels:
      app: photogalleryworker
  template:
    metadata:
      labels:
        app: photogalleryworker
    spec:
      containers:
        - name: photogalleryworker
          image: galleryazmregistry.azurecr.io/photogalleryworker:{VERSION}
          imagePullPolicy: Always
          ports:
            - containerPort: 80
          env:
            - name: ASPNETCORE_ENVIRONMENT
              value: Production
            - name: ConnectionStrings__Cosmos
              valueFrom:
                secretKeyRef: 
                  name: photogallerysecrets
                  key: Cosmos
            - name: ConnectionStrings__BlobStorage
              valueFrom:
                secretKeyRef: 
                  name: photogallerysecrets
                  key: BlobStorage
      imagePullSecrets:
        - name: galleryazmregistry
