apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: frontend-deployment
  name: frontend-deployment
  namespace: flashbacker-qa
spec:
  replicas: 1
  selector:
    matchLabels:
      run: frontend-deployment
  template:
    metadata:
      labels:
        run: frontend-deployment
    spec:
      containers:
      - image: registry.gitlab.com/flashbacker/frontend:master-a7f6e20b
        name: frontend-deployment
        ports:
        - containerPort: 80
        envFrom:
          - secretRef:
              name: cognito-secret
          - configMapRef:
              name: backend-url-configmap
        readinessProbe:
          httpGet:
            port: 80
            path: /
        volumeMounts:
          - name: nginx-configmap-volume
            mountPath: /etc/nginx/conf.d
      imagePullSecrets:
      - name: regcred
      volumes:
        - name: nginx-configmap-volume
          configMap:
            name: nginx-configmap
