Added oauth2 proxy
This commit is contained in:
@@ -1,5 +1,18 @@
|
|||||||
---
|
---
|
||||||
apiVersion: traefik.io/v1alpha1
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: keycloak-auth
|
||||||
|
spec:
|
||||||
|
forwardAuth:
|
||||||
|
address: http://oauth2-proxy.oauth2-proxy.svc:80/oauth2/auth
|
||||||
|
trustForwardHeader: true
|
||||||
|
authResponseHeaders:
|
||||||
|
- X-Auth-Request-User
|
||||||
|
- X-Auth-Request-Email
|
||||||
|
- X-Auth-Request-Groups
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
kind: IngressRoute
|
kind: IngressRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: secret-reader
|
name: secret-reader
|
||||||
@@ -13,7 +26,6 @@ spec:
|
|||||||
kind: Rule
|
kind: Rule
|
||||||
middlewares:
|
middlewares:
|
||||||
- name: keycloak-auth
|
- name: keycloak-auth
|
||||||
namespace: kube-system
|
|
||||||
services:
|
services:
|
||||||
- name: secret-reader
|
- name: secret-reader
|
||||||
port: 80
|
port: 80
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ kind: Kustomization
|
|||||||
resources:
|
resources:
|
||||||
- app.yaml
|
- app.yaml
|
||||||
- external-secrets.yaml
|
- external-secrets.yaml
|
||||||
- middleware.yaml
|
|
||||||
|
|
||||||
helmCharts:
|
helmCharts:
|
||||||
- name: oauth2-proxy
|
- name: oauth2-proxy
|
||||||
|
|||||||
@@ -1,14 +1,3 @@
|
|||||||
---
|
# Middleware is deployed per-namespace alongside each IngressRoute
|
||||||
apiVersion: traefik.io/v1alpha1
|
# because Traefik does not allow cross-namespace middleware references.
|
||||||
kind: Middleware
|
# See k8s/apps/mtproxy/secret-reader-ingress.yaml for example.
|
||||||
metadata:
|
|
||||||
name: keycloak-auth
|
|
||||||
namespace: kube-system
|
|
||||||
spec:
|
|
||||||
forwardAuth:
|
|
||||||
address: http://oauth2-proxy.oauth2-proxy.svc:80/oauth2/auth
|
|
||||||
trustForwardHeader: true
|
|
||||||
authResponseHeaders:
|
|
||||||
- X-Auth-Request-User
|
|
||||||
- X-Auth-Request-Email
|
|
||||||
- X-Auth-Request-Groups
|
|
||||||
|
|||||||
Reference in New Issue
Block a user