infra/k8s/system/traefik-forward-auth-herzfeld-casa.yaml

83 lines
2 KiB
YAML
Raw Permalink Normal View History

2024-10-13 23:54:22 +00:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: traefik-forward-auth-herzfeld-casa
namespace: kube-system
labels:
app: traefik-forward-auth-herzfeld-casa
spec:
replicas: 1
selector:
matchLabels:
app: traefik-forward-auth-herzfeld-casa
strategy:
type: Recreate
template:
metadata:
labels:
app: traefik-forward-auth-herzfeld-casa
spec:
terminationGracePeriodSeconds: 60
containers:
- image: git.janky.solutions/jankysolutions/infra/traefik-forward-auth:latest
name: traefik-forward-auth
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 4181
protocol: TCP
envFrom:
- configMapRef:
name: traefik-forward-auth-herzfeld-casa
- secretRef:
name: traefik-forward-auth-herzfeld-casa
---
apiVersion: v1
kind: Service
metadata:
name: traefik-forward-auth-herzfeld-casa
namespace: kube-system
spec:
selector:
app: traefik-forward-auth-herzfeld-casa
ports:
- name: auth-http
port: 4181
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: traefik-forward-auth-herzfeld-casa
namespace: kube-system
spec:
forwardAuth:
address: http://traefik-forward-auth-herzfeld-casa:4181
authResponseHeaders:
- X-Forwarded-User
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: traefik-forward-auth-herzfeld-casa
namespace: kube-system
annotations:
traefik.ingress.kubernetes.io/router.middlewares: kube-system-traefik-forward-auth-herzfeld-casa@kubernetescrd
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts: [authproxy.herzfeld.casa]
secretName: authproxy.herzfeld.casa
rules:
- host: authproxy.herzfeld.casa
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: traefik-forward-auth-herzfeld-casa
port:
number: 4181