83 lines
2 KiB
YAML
83 lines
2 KiB
YAML
|
|
apiVersion: traefik.io/v1alpha1
|
||
|
|
kind: Middleware
|
||
|
|
metadata:
|
||
|
|
name: navigation-forwardauth
|
||
|
|
namespace: default
|
||
|
|
spec:
|
||
|
|
forwardAuth:
|
||
|
|
address: http://oauth2-proxy.default.svc.cluster.local:4180
|
||
|
|
trustForwardHeader: true
|
||
|
|
authResponseHeaders:
|
||
|
|
- "X-Auth-User"
|
||
|
|
- "X-Auth-Email"
|
||
|
|
- "Authorization"
|
||
|
|
---
|
||
|
|
# Unauthenticated Ingress for the OAuth Callback endpoint
|
||
|
|
apiVersion: networking.k8s.io/v1
|
||
|
|
kind: Ingress
|
||
|
|
metadata:
|
||
|
|
name: navigation-ingress-oauth
|
||
|
|
namespace: default
|
||
|
|
annotations:
|
||
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||
|
|
spec:
|
||
|
|
tls:
|
||
|
|
- hosts:
|
||
|
|
- migrate.mynest.love
|
||
|
|
secretName: navigation-tls
|
||
|
|
rules:
|
||
|
|
- host: migrate.mynest.love
|
||
|
|
http:
|
||
|
|
paths:
|
||
|
|
- path: /oauth2
|
||
|
|
pathType: Prefix
|
||
|
|
backend:
|
||
|
|
service:
|
||
|
|
name: oauth2-proxy
|
||
|
|
port:
|
||
|
|
name: http-proxy
|
||
|
|
---
|
||
|
|
# Authenticated Ingress protecting the mapping services
|
||
|
|
apiVersion: networking.k8s.io/v1
|
||
|
|
kind: Ingress
|
||
|
|
metadata:
|
||
|
|
name: navigation-ingress
|
||
|
|
namespace: default
|
||
|
|
annotations:
|
||
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||
|
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||
|
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||
|
|
traefik.ingress.kubernetes.io/router.middlewares: default-navigation-forwardauth@kubernetescrd
|
||
|
|
spec:
|
||
|
|
tls:
|
||
|
|
- hosts:
|
||
|
|
- migrate.mynest.love
|
||
|
|
secretName: navigation-tls
|
||
|
|
rules:
|
||
|
|
- host: migrate.mynest.love
|
||
|
|
http:
|
||
|
|
paths:
|
||
|
|
- path: /route
|
||
|
|
pathType: Prefix
|
||
|
|
backend:
|
||
|
|
service:
|
||
|
|
name: valhalla
|
||
|
|
port:
|
||
|
|
name: http-valhalla
|
||
|
|
- path: /api
|
||
|
|
pathType: Prefix
|
||
|
|
backend:
|
||
|
|
service:
|
||
|
|
name: photon
|
||
|
|
port:
|
||
|
|
name: http-photon
|
||
|
|
- path: /
|
||
|
|
pathType: Prefix
|
||
|
|
backend:
|
||
|
|
service:
|
||
|
|
name: tileserver
|
||
|
|
port:
|
||
|
|
name: http-tileserver
|