---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: auth-svc
  namespace: helix
  labels:
    app: auth-svc
spec:
  replicas: 2
  selector:
    matchLabels:
      app: auth-svc
  template:
    metadata:
      labels:
        app: auth-svc
    spec:
      containers:
      - name: auth-svc
        image: p4hastest.azurecr.io/helix-auth-svc
        imagePullPolicy: Always
        ports:
        - containerPort: 3000
        envFrom:
        - configMapRef:
            name: auth-svc
        env:
        - name: OIDC_CLIENT_ID
          valueFrom:
            secretKeyRef:
              name: oidc-client-creds
              key: client_id
        - name: OIDC_CLIENT_SECRET
          valueFrom:
            secretKeyRef:
              name: oidc-client-creds
              key: client_secret
        readinessProbe:
          httpGet:
            path: /liveness
            port: 3000
          initialDelaySeconds: 5
          periodSeconds: 5
        livenessProbe:
          httpGet:
            path: /liveness
            port: 3000
          initialDelaySeconds: 3
          periodSeconds: 3
...
