Skip to content

Commit e011f35

Browse files
authored
feat: template configmaps (#703)
1 parent 85bc64b commit e011f35

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

hacks/values/hydra.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ hydra:
2626
- "foo bar 123 456 lorem 1"
2727
- "foo bar 123 456 lorem 2"
2828
- "foo bar 123 456 lorem 3"
29+
log:
30+
redaction_text: "example template {{ .Release.Name }}"
2931

3032
secret:
3133
enabled: false

hacks/values/keto.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ keto:
66
- keto
77
config:
88
dsn: "postgres://postgres:ory@postgresql.default.svc.cluster.local/ory_keto?sslmode=disable&max_conn_lifetime=10s"
9+
log:
10+
redaction_text: "example template {{ .Release.Name }}"
911
ingress:
1012
read:
1113
enabled: true

hacks/values/oathkeeper.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ oathkeeper:
133133
authenticators:
134134
noop:
135135
enabled: true
136+
log:
137+
redaction_text: "example template {{ .Release.Name }}"
136138

137139
secret:
138140
enabled: true

helm/charts/hydra/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Generate the configmap data, redacting secrets
125125
*/}}
126126
{{- define "hydra.configmap" -}}
127127
{{- $config := omit .Values.hydra.config "dsn" "secrets" -}}
128-
{{- toYaml $config -}}
128+
{{- tpl (toYaml $config) . -}}
129129
{{- end -}}
130130
131131
{{/*

helm/charts/keto/templates/_helpers.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Generate the configmap data, redacting secrets
5757
*/}}
5858
{{- define "keto.configmap" -}}
5959
{{- $config := omit .Values.keto.config "dsn" -}}
60-
{{- toYaml $config -}}
60+
{{- tpl (toYaml $config) . -}}
6161
{{- end -}}
6262

6363
{{/*

helm/charts/oathkeeper/templates/_helpers.tpl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ If release name contains chart name it will be used as a full name.
2525
{{- end -}}
2626

2727

28+
{{/*
29+
Generate the configmap data, redacting secrets
30+
*/}}
31+
{{- define "oathkeeper.configmap" -}}
32+
{{- $config := .Values.oathkeeper.config -}}
33+
{{- tpl (toYaml $config) . -}}
34+
{{- end -}}
35+
2836
{{/*
2937
Create a config map name for rules.
3038
If maester is enabled, use the child chart named template to get the value.

helm/charts/oathkeeper/templates/configmap-config.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,5 @@ metadata:
1111
{{ include "oathkeeper.labels" . | indent 4 }}
1212
data:
1313
"config.yaml": |
14-
{{- with .Values.oathkeeper.config -}}
15-
{{- toYaml . | nindent 4 }}
16-
{{- end -}}
17-
{{ end }}
14+
{{- include "oathkeeper.configmap" . | nindent 4 }}
15+
{{ end }}

0 commit comments

Comments
 (0)