Files
homelab/k8s/temporal/oauth2-proxy.yaml
T
Story Crater Bot 69ad5c371c k8s/messaging: add kafka kmsvc and temporal workflows
- Kafka 3-broker cluster (RF=3, min-ISR=2)
- kmsvc SQS-like API on Kafka
- Redis dedup (standalone, can extend to HA)
- Temporal workflow orchestration (Cassandra backend)
2026-08-18 15:08:00 -07:00

109 lines
2.7 KiB
YAML

# OAuth2-Proxy deployment for Temporal UI
# Requires: temporal-oidc secret with clientSecret and cookieSecret
apiVersion: v1
kind: ServiceAccount
metadata:
name: oauth2-proxy
namespace: temporal
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: oauth2-proxy
namespace: temporal
spec:
replicas: 1
selector:
matchLabels:
app: oauth2-proxy
template:
metadata:
labels:
app: oauth2-proxy
annotations:
secret.reloader.stakater.com/reload: "temporal-oidc"
spec:
serviceAccountName: oauth2-proxy
containers:
- name: oauth2-proxy
image: quay.io/oauth2-proxy/oauth2-proxy:v7.5.1
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 4180
protocol: TCP
env:
- name: OAUTH2_PROXY_PROVIDER
value: "oidc"
- name: OAUTH2_PROXY_OIDC_ISSUER_URL
value: "https://authentik.riotpiao.homelab.com/application/o/temporal/"
- name: OAUTH2_PROXY_CLIENT_ID
value: "temporal"
- name: OAUTH2_PROXY_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: temporal-oidc
key: clientSecret
- name: OAUTH2_PROXY_COOKIE_SECRET
valueFrom:
secretKeyRef:
name: temporal-oidc
key: cookieSecret
- name: OAUTH2_PROXY_REDIRECT_URL
value: "https://temporal.riotpiao.homelab.com/oauth2/callback"
- name: OAUTH2_PROXY_UPSTREAM
value: "http://temporal-web:8080"
- name: OAUTH2_PROXY_COOKIE_SECURE
value: "true"
- name: OAUTH2_PROXY_COOKIE_HTTPONLY
value: "true"
- name: OAUTH2_PROXY_COOKIE_SAMESITE
value: "Lax"
- name: OAUTH2_PROXY_EMAIL_DOMAIN
value: "*"
- name: OAUTH2_PROXY_SKIP_AUTH_REGEX
value: "^/health"
- name: OAUTH2_PROXY_PASS_AUTHORIZATION_HEADER
value: "true"
- name: OAUTH2_PROXY_SKIP_AUTH_PREFLIGHT
value: "true"
- name: OAUTH2_PROXY_REVERSE_PROXY
value: "true"
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
livenessProbe:
httpGet:
path: /ping
port: http
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /ping
port: http
initialDelaySeconds: 5
periodSeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: oauth2-proxy
namespace: temporal
spec:
type: ClusterIP
ports:
- port: 4180
targetPort: http
protocol: TCP
name: http
selector:
app: oauth2-proxy