Skip to content

Commit

Permalink
Commit triggered by a change on the main branch of helm-charts-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rconway committed Jan 11, 2024
1 parent c4907d2 commit 0658b0f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/identity-gatekeeper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 1.0.3
version: 1.0.4

# 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
Expand Down
9 changes: 8 additions & 1 deletion charts/identity-gatekeeper/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@ Return the target Kubernetes version
*/}}
{{- define "identity-gatekeeper.kubeVersion" -}}
{{- default .Capabilities.KubeVersion.Version .Values.kubeVersionOverride }}
{{- end -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "identity-gatekeeper.proxyServiceUrl" -}}
http://{{ include "identity-gatekeeper.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.proxy.port }}
{{- end }}
9 changes: 8 additions & 1 deletion charts/identity-gatekeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,16 @@ ingress:
add_header Access-Control-Allow-Methods "*";
add_header Access-Control-Allow-Headers "Authorization, Origin, Content-Type";
nginx.ingress.kubernetes.io/server-snippet: |
# Open endpoints provided by gatekeeper itself
# - which should passthru to gatekeeper, rather than the 'target' protected service,
# without need for any auth.
location /oauth/(authorize|callback|expired|health|login|logout|token|metrics|discovery) {
proxy_pass {{ include "identity-gatekeeper.proxyServiceUrl" . }}/$request_uri;
}
# Endpoint for the nginx 'auth_request' - which directs to gatekeeper
location ^~ /auth {
internal;
proxy_pass http://{{ include "identity-gatekeeper.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.proxy.port }}/$request_uri;
proxy_pass {{ include "identity-gatekeeper.proxyServiceUrl" . }}/$request_uri;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Forwarded-Proto $scheme;
Expand Down

0 comments on commit 0658b0f

Please sign in to comment.