Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: template configmaps #703

Merged
merged 4 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions hacks/values/hydra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ hydra:
- "foo bar 123 456 lorem 1"
- "foo bar 123 456 lorem 2"
- "foo bar 123 456 lorem 3"
log:
redaction_text: "example template {{ .Release.Name }}"

secret:
enabled: false
Expand Down
2 changes: 2 additions & 0 deletions hacks/values/keto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ keto:
- keto
config:
dsn: "postgres://postgres:ory@postgresql.default.svc.cluster.local/ory_keto?sslmode=disable&max_conn_lifetime=10s"
log:
redaction_text: "example template {{ .Release.Name }}"
ingress:
read:
enabled: true
Expand Down
2 changes: 2 additions & 0 deletions hacks/values/oathkeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ oathkeeper:
authenticators:
noop:
enabled: true
log:
redaction_text: "example template {{ .Release.Name }}"

secret:
enabled: true
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/hydra/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Generate the configmap data, redacting secrets
*/}}
{{- define "hydra.configmap" -}}
{{- $config := omit .Values.hydra.config "dsn" "secrets" -}}
{{- toYaml $config -}}
{{- tpl (toYaml $config) . -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/keto/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Generate the configmap data, redacting secrets
*/}}
{{- define "keto.configmap" -}}
{{- $config := omit .Values.keto.config "dsn" -}}
{{- toYaml $config -}}
{{- tpl (toYaml $config) . -}}
{{- end -}}

{{/*
Expand Down
8 changes: 8 additions & 0 deletions helm/charts/oathkeeper/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ If release name contains chart name it will be used as a full name.
{{- end -}}


{{/*
Generate the configmap data, redacting secrets
*/}}
{{- define "oathkeeper.configmap" -}}
{{- $config := .Values.oathkeeper.config -}}
{{- tpl (toYaml $config) . -}}
{{- end -}}

{{/*
Create a config map name for rules.
If maester is enabled, use the child chart named template to get the value.
Expand Down
6 changes: 2 additions & 4 deletions helm/charts/oathkeeper/templates/configmap-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ metadata:
{{ include "oathkeeper.labels" . | indent 4 }}
data:
"config.yaml": |
{{- with .Values.oathkeeper.config -}}
{{- toYaml . | nindent 4 }}
{{- end -}}
{{ end }}
{{- include "oathkeeper.configmap" . | nindent 4 }}
{{ end }}
Loading