apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-gateway-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: auth-gateway
  template:
    metadata:
      labels:
        app: auth-gateway
    spec:
      imagePullSecrets:
      - name: registry-credentials
      containers:
        - name: auth-gateway
          image: stokei/auth-gateway:latest
          ports:
            - containerPort: 80
              protocol: TCP
          resources: {}
          imagePullPolicy: Always
          env:
            - name: SERVER_URL
              valueFrom:
                configMapKeyRef:
                  name: urls-configmap
                  key: auth-gateway-url
            - name: MICROSERVICE_URL
              valueFrom:
                secretKeyRef:
                  name: rabbitmq-secret
                  key: url
            - name: FRONTEND_AUTH_URL
              valueFrom:
                configMapKeyRef:
                  name: urls-configmap
                  key: auth-frontend-url
            - name: FRONTEND_AUTH_SUCCESS_URL
              valueFrom:
                configMapKeyRef:
                  name: urls-configmap
                  key: auth-callback-frontend-url
            - name: FRONTEND_AUTH_ERROR_URL
              valueFrom:
                configMapKeyRef:
                  name: urls-configmap
                  key: auth-callback-frontend-url
            - name: FACEBOOK_APP_ID
              valueFrom:
                secretKeyRef:
                  name: login-social-secret
                  key: facebook-id
            - name: FACEBOOK_APP_SECRET
              valueFrom:
                secretKeyRef:
                  name: login-social-secret
                  key: facebook-secret
            - name: GOOGLE_APP_ID
              valueFrom:
                secretKeyRef:
                  name: login-social-secret
                  key: google-id
            - name: GOOGLE_APP_SECRET
              valueFrom:
                secretKeyRef:
                  name: login-social-secret
                  key: google-secret
