From 6d542eadef5e2fc7dbb8385f887daa6b8b679e24 Mon Sep 17 00:00:00 2001 From: Cedric Verstraeten Date: Wed, 30 Oct 2024 21:24:36 +0100 Subject: [PATCH] enable oauth on hub api as well --- charts/hub/Chart.yaml | 2 +- charts/hub/templates/kerberos-hub/hub-api.yaml | 4 ++++ charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/charts/hub/Chart.yaml b/charts/hub/Chart.yaml index 6152d95..36f8615 100644 --- a/charts/hub/Chart.yaml +++ b/charts/hub/Chart.yaml @@ -16,7 +16,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.61.0 +version: 0.62.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/hub/templates/kerberos-hub/hub-api.yaml b/charts/hub/templates/kerberos-hub/hub-api.yaml index befe706..834030c 100644 --- a/charts/hub/templates/kerberos-hub/hub-api.yaml +++ b/charts/hub/templates/kerberos-hub/hub-api.yaml @@ -27,6 +27,10 @@ metadata: name: hub-api-ingress annotations: kubernetes.io/ingress.class: {{ .Values.ingress }} + {{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }} + nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth" + nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri" + {{- end }} {{- if eq .Values.ingress "nginx" }} kubernetes.io/tls-acme: "true" nginx.ingress.kubernetes.io/ssl-redirect: "true" diff --git a/charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml b/charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml index 1b47a5d..a56ab98 100644 --- a/charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml +++ b/charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml @@ -23,6 +23,10 @@ metadata: name: hub-frontend-demo-ingress annotations: kubernetes.io/ingress.class: {{ .Values.ingress }} + {{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }} + nginx.ingress.kubernetes.io/auth-url: "https://$host/oauth2/auth" + nginx.ingress.kubernetes.io/auth-signin: "https://$host/oauth2/start?rd=$escaped_request_uri" + {{- end }} {{- if eq .Values.ingress "nginx" }} kubernetes.io/tls-acme: "true" nginx.ingress.kubernetes.io/ssl-redirect: "true"