apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik-sso
  namespace: traefik
  labels:
    app: traefik-sso
spec:
  selector:
    matchLabels:
      app: traefik-sso
  template:
    metadata:
      labels:
        name: traefik-sso
        app: traefik-sso
    spec:
      containers:
      - name: traefik-sso
        image: thomseddon/traefik-forward-auth:latest
        imagePullPolicy: Always
        env:
        - name: PROVIDERS_GOOGLE_CLIENT_ID
          valueFrom:
            secretKeyRef:
              name: traefik-sso
              key: clientid
        - name: WHITELIST
          valueFrom:
            secretKeyRef:
              name: traefik-sso
              key: whitelist
        - name: PROVIDERS_GOOGLE_CLIENT_SECRET
          valueFrom:
            secretKeyRef:
              name: traefik-sso
              key: clientsecret
        - name: SECRET
          valueFrom:
            secretKeyRef:
              name: traefik-sso
              key: secret
        - name: INSECURE_COOKIE
          value: "false"
        # - name: URL_PATH 
        #   value: /_oauth
        - name: LOG_LEVEL
          value: debug
        ports:
        - containerPort: 4181
