From 18e5c2639f238aa741d0685f9a1ff10937743a1a Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:00:53 +0200 Subject: [PATCH 1/6] use oauthproxy for pr test ingress --- helm-chart/templates/acend-ingres.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index 03d49fe2..ee35bdc5 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -52,8 +52,8 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - nginx.ingress.kubernetes.io/auth-type: basic - nginx.ingress.kubernetes.io/auth-secret: staging-basic-auth + ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=$escaped_request_uri + ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: ingressClassName: {{ .Values.ingress.ingressClass }} From e3c21851bddc36ab0a644ca34d35b9af6e289633 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:06:44 +0200 Subject: [PATCH 2/6] change annotation --- helm-chart/templates/acend-ingres.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index ee35bdc5..4bab8422 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -52,8 +52,8 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=$escaped_request_uri - ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth + nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=$escaped_request_uri + nginx.ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: ingressClassName: {{ .Values.ingress.ingressClass }} From a198fb2e7a17383fd978715733a4d9f31dc8d18e Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:11:53 +0200 Subject: [PATCH 3/6] fix redirect url --- helm-chart/templates/acend-ingres.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index 4bab8422..c442e7f5 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -52,7 +52,7 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=$escaped_request_uri + nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=website-{{ .Release.Name }}.test.acend.ch nginx.ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: From 931958f028c41e94855ff0b7b085d0ad74c72089 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:19:00 +0200 Subject: [PATCH 4/6] fix redirect url --- helm-chart/templates/acend-ingres.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index c442e7f5..3c176994 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -1,5 +1,6 @@ {{- $fullName := include "acend-website-chart.fullname" . -}} {{- $svcPort := .Values.service.port -}} +{{- $releaseName := .Release.Name -}} {{- if eq .Release.Name "latest" -}} --- apiVersion: networking.k8s.io/v1 @@ -52,7 +53,7 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=website-{{ .Release.Name }}.test.acend.ch + nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=website-{{ $releaseName }}.test.acend.ch nginx.ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: From 2e561aa6b62c67995654732bc0f57a748e33a84b Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:22:26 +0200 Subject: [PATCH 5/6] fix redirect url --- helm-chart/templates/acend-ingres.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index 3c176994..e7c18c49 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -53,7 +53,7 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=website-{{ $releaseName }}.test.acend.ch + nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=https%%3A%%2F%%2Fwebsite-{{ $releaseName }}.test.acend.ch nginx.ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: From eb90e7b2fc9453be62ecfb47a2bf9c9c27575afd Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 25 Jul 2024 20:26:42 +0200 Subject: [PATCH 6/6] fix redirect url --- helm-chart/templates/acend-ingres.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-chart/templates/acend-ingres.yaml b/helm-chart/templates/acend-ingres.yaml index e7c18c49..a02581b9 100644 --- a/helm-chart/templates/acend-ingres.yaml +++ b/helm-chart/templates/acend-ingres.yaml @@ -53,7 +53,7 @@ metadata: {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} - nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=https%%3A%%2F%%2Fwebsite-{{ $releaseName }}.test.acend.ch + nginx.ingress.kubernetes.io/auth-signin: https://github-oauth-proxy.acend.ch/oauth2/start?rd=https%3A%2F%2Fwebsite-{{ $releaseName }}.test.acend.ch nginx.ingress.kubernetes.io/auth-url: https://github-oauth-proxy.acend.ch/oauth2/auth {{- end }} spec: