2019-12-12 23:12:12 +00:00
|
|
|
apiVersion: apps/v1
|
2017-03-08 23:58:34 +00:00
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: oauth2-proxy
|
|
|
|
name: oauth2-proxy
|
|
|
|
namespace: kube-system
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s-app: oauth2-proxy
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: oauth2-proxy
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- args:
|
|
|
|
- --provider=github
|
|
|
|
- --email-domain=*
|
|
|
|
- --upstream=file:///dev/null
|
|
|
|
- --http-address=0.0.0.0:4180
|
|
|
|
# Register a new application
|
|
|
|
# https://github.com/settings/applications/new
|
|
|
|
env:
|
|
|
|
- name: OAUTH2_PROXY_CLIENT_ID
|
|
|
|
value: <Client ID>
|
|
|
|
- name: OAUTH2_PROXY_CLIENT_SECRET
|
|
|
|
value: <Client Secret>
|
2018-06-11 15:19:12 +00:00
|
|
|
# docker run -ti --rm python:3-alpine python -c 'import secrets,base64; print(base64.b64encode(base64.b64encode(secrets.token_bytes(16))));'
|
2017-03-08 23:58:34 +00:00
|
|
|
- name: OAUTH2_PROXY_COOKIE_SECRET
|
|
|
|
value: SECRET
|
2019-07-18 06:59:19 +00:00
|
|
|
image: quay.io/pusher/oauth2_proxy:latest
|
2017-03-08 23:58:34 +00:00
|
|
|
imagePullPolicy: Always
|
|
|
|
name: oauth2-proxy
|
|
|
|
ports:
|
|
|
|
- containerPort: 4180
|
|
|
|
protocol: TCP
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: oauth2-proxy
|
|
|
|
name: oauth2-proxy
|
2018-01-26 18:11:28 +00:00
|
|
|
namespace: kube-system
|
2017-03-08 23:58:34 +00:00
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- name: http
|
|
|
|
port: 4180
|
|
|
|
protocol: TCP
|
|
|
|
targetPort: 4180
|
|
|
|
selector:
|
|
|
|
k8s-app: oauth2-proxy
|