apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: oauth
  name: oauth
spec:
  replicas: 1
  revisionHistoryLimit: 5
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  selector:
    matchLabels:
      app: oauth
  template:
    metadata:
      labels:
        app: oauth
    spec:
      containers:
        - image: quay.io/pusher/oauth2_proxy
          name: oauth2-proxy
          args:
            - --email-domain=*
            - --cookie-secure=false
            - --cookie-secret=jLTKkbMwRJpsS7ZW
            - --provider=google
            - --client-secret=G3RfPLig_e0UhROUuf45dKJ3
            - --client-id=214800094662-35dpgqu2llmn9mr5tt2ao9d7roebmtmm.apps.googleusercontent.com
            - --upstream=http://proxy/
            - --skip-auth-regex=\/model\/get\/.*
            - --skip-auth-regex=\/model\/getRecursively\/.*
            - --skip-auth-regex=\/model\/put\/.*
            - --skip-auth-regex=\/model\/putAll
            - --skip-auth-regex=\/model\/getAll
            - --skip-auth-regex=\/model\/counter\/.*
            - --skip-auth-regex=\/model\/subscribe\/.*
            - --skip-auth-regex=\/model\/getEmail
            - --skip-auth-regex=^\/$
            - --http-address=0.0.0.0:4180
          volumeMounts:
            - name: sslcert
              mountPath: /secrets/sslcert
              readOnly: true
          readinessProbe:
            httpGet:
              path: /ping
              port: 4180
              scheme: HTTP
            initialDelaySeconds: 3
            periodSeconds: 5
            timeoutSeconds: 3
          livenessProbe:
            httpGet:
              path: /ping
              port: 4180
              scheme: HTTP
            initialDelaySeconds: 3
            periodSeconds: 10
            timeoutSeconds: 5
      volumes:
        - name: sslcert
          secret:
            secretName: sslcert