Skip to content

Commit 681d3f8

Browse files
committed
hide oauth2proxy behind a feature toggle
1 parent 84be7c9 commit 681d3f8

File tree

5 files changed

+9
-0
lines changed

5 files changed

+9
-0
lines changed

service-proxy/charts/1.0.0/service-proxy/templates/ingress.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ metadata:
1414
{{- with .Values.ingress.annotations }}
1515
annotations:
1616
{{- toYaml . | nindent 4 }}
17+
{{- if $.Values.oauth2proxy.enabled }}
1718
nginx.ingress.kubernetes.io/auth-signin: https://auth-proxy.{{ required ".domain missing" $.Values.domain }}/oauth2/start
1819
nginx.ingress.kubernetes.io/auth-url: https://auth-proxy.{{ required ".domain missing" $.Values.domain }}/oauth2/auth
1920
nginx.ingress.kubernetes.io/service-upstream: "true"
21+
{{- end }}
2022
{{- end }}
2123
spec:
2224
{{- if .Values.ingress.className }}

service-proxy/charts/1.0.0/service-proxy/templates/oauth2-proxy-deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
{{- if .Values.oauth2proxy.enabled }}
45
apiVersion: apps/v1
56
kind: Deployment
67
metadata:
@@ -84,3 +85,4 @@ spec:
8485
securityContext:
8586
runAsUser: 0
8687
terminationGracePeriodSeconds: 30
88+
{{- end }}

service-proxy/charts/1.0.0/service-proxy/templates/oauth2-proxy-ingress.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
{{- if .Values.oauth2proxy.enabled }}
45
{{- $fullName := include "oauth2-proxy.fullname" . }}
56
apiVersion: networking.k8s.io/v1
67
kind: Ingress
@@ -29,3 +30,4 @@ spec:
2930
- hosts:
3031
- auth-proxy.{{ required ".domain missing" $.Values.domain }}
3132
secretName: {{ $fullName }}-tls
33+
{{- end }}

service-proxy/charts/1.0.0/service-proxy/templates/oauth2-proxy-service.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Greenhouse contributors
22
# SPDX-License-Identifier: Apache-2.0
33

4+
{{- if .Values.oauth2proxy.enabled }}
45
apiVersion: v1
56
kind: Service
67
metadata:
@@ -17,3 +18,4 @@ spec:
1718
selector:
1819
k8s-app: oauth2-proxy
1920
type: ClusterIP
21+
{{- end }}

service-proxy/charts/1.0.0/service-proxy/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ingress:
3939
disco: "true"
4040

4141
oauth2proxy:
42+
enabled: false
4243
image:
4344
registry: "docker.io"
4445
repository: "bitnami/oauth2-proxy"

0 commit comments

Comments
 (0)