Skip to content

Commit

Permalink
Ensure chart will not render if additional clusters configured withou…
Browse files Browse the repository at this point in the history
…t oidc (#1926)

* Ensure chart will not render if multicluster configured without oidc

* Enable an externally configured auth proxy.
  • Loading branch information
absoludity authored Aug 10, 2020
1 parent 90ecdb4 commit 35d9ee5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/kubeapps/templates/dashboard-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ data:
{
"namespace": "{{ .Release.Namespace }}",
"appVersion": "{{ .Chart.AppVersion }}",
"authProxyEnabled": {{ .Values.authProxy.enabled }},
"authProxyEnabled": {{ or .Values.authProxy.enabled .Values.authProxy.externallyEnabled }},
"oauthLoginURI": {{ .Values.authProxy.oauthLoginURI | quote }},
"oauthLogoutURI": {{ .Values.authProxy.oauthLogoutURI | quote }},
"featureFlags": {{ .Values.featureFlags | toJson }}
Expand Down
4 changes: 4 additions & 0 deletions chart/kubeapps/templates/kubeapps-frontend-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ spec:
{{- if .Values.authProxy.resources }}
resources: {{- toYaml .Values.authProxy.resources | nindent 12 }}
{{- end }}
{{- else }}
{{- if and .Values.featureFlags.additionalClusters (not .Values.authProxy.externallyEnabled) }}
{{ fail "additionalClusters can be configured only when using an authenticate proxy for cluster oidc authentication."}}
{{ end -}}
{{- end }}
volumes:
- name: vhost
Expand Down
3 changes: 3 additions & 0 deletions chart/kubeapps/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ testImage:
authProxy:
# Set to true to enable the OIDC proxy
enabled: false
# Set to true if an external auth proxy is setup to provide cookie authentication
# at the oauthLoginURI and oauthLogoutURI values below.
externallyEnabled: false
## Bitnami OAuth2 Proxy image
## ref: https://hub.docker.com/r/bitnami/oauth2-proxy/tags/
##
Expand Down

0 comments on commit 35d9ee5

Please sign in to comment.