add oauth2-proxy
This commit is contained in:
parent
614ef16063
commit
6da9551d66
10 changed files with 216 additions and 0 deletions
25
flux/olympus/apps/services/oauth2-proxy/external-secret.yaml
Normal file
25
flux/olympus/apps/services/oauth2-proxy/external-secret.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
apiVersion: external-secrets.io/v1beta1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: oauth2-proxy
|
||||
namespace: services
|
||||
spec:
|
||||
refreshInterval: "5m"
|
||||
secretStoreRef:
|
||||
name: vault
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: oauth2-proxy
|
||||
data:
|
||||
- secretKey: OAUTH2_PROXY_CLIENT_ID
|
||||
remoteRef:
|
||||
key: services/oauth2-proxy
|
||||
property: client_id
|
||||
- secretKey: OAUTH2_PROXY_CLIENT_SECRET
|
||||
remoteRef:
|
||||
key: services/oauth2-proxy
|
||||
property: client_secret
|
||||
- secretKey: OAUTH2_PROXY_COOKIE_SECRET
|
||||
remoteRef:
|
||||
key: services/oauth2-proxy
|
||||
property: cookie_secret
|
|
@ -0,0 +1,5 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- external-secret.yaml
|
||||
- oauth2-proxy.yaml
|
67
flux/olympus/apps/services/oauth2-proxy/oauth2-proxy.yaml
Normal file
67
flux/olympus/apps/services/oauth2-proxy/oauth2-proxy.yaml
Normal file
|
@ -0,0 +1,67 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: oauth2-proxy
|
||||
name: oauth2-proxy
|
||||
namespace: services
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: oauth2-proxy
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: oauth2-proxy
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- --provider=oidc
|
||||
- --provider-display2-name="Dex"
|
||||
- --oidc-issuer-url=https://dex.0x76.dev/dex
|
||||
- --redirect-url=https://o2p.0x76.dev/oauth2/callback
|
||||
- --cookie-secure=false
|
||||
- --http-address=0.0.0.0:4180
|
||||
image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.1
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: oauth2-proxy
|
||||
name: oauth2-proxy
|
||||
ports:
|
||||
- containerPort: 4180
|
||||
protocol: TCP
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
k8s-app: oauth2-proxy
|
||||
name: oauth2-proxy
|
||||
namespace: services
|
||||
spec:
|
||||
ports:
|
||||
- name: http
|
||||
port: 4180
|
||||
protocol: TCP
|
||||
targetPort: 4180
|
||||
selector:
|
||||
k8s-app: oauth2-proxy
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: oauth2-proxy
|
||||
namespace: services
|
||||
spec:
|
||||
rules:
|
||||
- host: "o2p.0x76.dev"
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: oauth2-proxy
|
||||
port:
|
||||
number: 4180
|
Loading…
Add table
Add a link
Reference in a new issue