Skip to content

Commit

Permalink
feat(oathkeeper): template configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
jagregory committed Sep 16, 2024
1 parent 8e17542 commit 9711b80
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
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 }}

0 comments on commit 9711b80

Please sign in to comment.