-
Notifications
You must be signed in to change notification settings - Fork 184
/
sso-auth-deployment.yml
106 lines (106 loc) · 3.1 KB
/
sso-auth-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sso-auth
labels:
k8s-app: sso-auth
namespace: sso
spec:
replicas: 1
template:
metadata:
labels:
k8s-app: sso-auth
spec:
containers:
- image: buzzfeed/sso-dev:latest
name: sso-auth
command: ["/bin/sso-auth"]
ports:
- containerPort: 4180
env:
- name: GOOGLE_ADMIN_EMAIL
valueFrom:
secretKeyRef:
name: google-admin-email
key: email
- name: GOOGLE_SERVICE_ACCOUNT_JSON
value: /creds/service_account.json
- name: SSO_EMAIL_DOMAIN
value: 'mydomain.com'
- name: HOST
value: sso-auth.mydomain.com
- name: REDIRECT_URL
value: https://sso-auth.mydomain.com
- name: PROXY_ROOT_DOMAIN
value: mydomain.com
- name: CLIENT_ID
valueFrom:
secretKeyRef:
name: google-client-id
key: client-id
- name: CLIENT_SECRET
valueFrom:
secretKeyRef:
name: google-client-secret
key: client-secret
- name: PROXY_CLIENT_ID
valueFrom:
secretKeyRef:
name: proxy-client-id
key: proxy-client-id
- name: PROXY_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: proxy-client-secret
key: proxy-client-secret
- name: AUTH_CODE_SECRET
valueFrom:
secretKeyRef:
name: auth-code-secret
key: auth-code-secret
- name: COOKIE_SECRET
valueFrom:
secretKeyRef:
name: auth-cookie-secret
key: auth-cookie-secret
# OLD_COOKIE_SECRET is the same as COOKIE_SECRET, not sure why its even needed at this point
- name: OLD_COOKIE_SECRET
valueFrom:
secretKeyRef:
name: auth-cookie-secret
key: auth-cookie-secret
# STATSD_HOST and STATSD_PORT must be defined or the app wont launch, they dont need to be a real host / port
- name: STATSD_HOST
value: localhost
- name: STATSD_PORT
value: "11111"
- name: COOKIE_SECURE
value: "false"
- name: CLUSTER
value: dev
- name: VIRTUAL_HOST
value: sso-auth.mydomain.com
readinessProbe:
httpGet:
path: /ping
port: 4180
scheme: HTTP
livenessProbe:
httpGet:
path: /ping
port: 4180
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
resources:
limits:
memory: "256Mi"
cpu: "200m"
volumeMounts:
- name: google-service-account
mountPath: "/creds"
volumes:
- name: google-service-account
secret:
secretName: google-service-account