Skip to content
Open
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
12 changes: 12 additions & 0 deletions charts/postgres-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Render an extra object, given as a map or as a string, with Helm templating support.
Expects a dict with "value" (the object) and "context" (the root context).
*/}}
{{- define "postgres-operator.renderObject" -}}
{{- if typeIs "string" .value -}}
{{- tpl .value .context -}}
{{- else -}}
{{- tpl (toYaml .value) .context -}}
{{- end -}}
{{- end -}}

{{/*
Flatten nested config options when ConfigMap is used as ConfigTarget
*/}}
Expand Down
4 changes: 4 additions & 0 deletions charts/postgres-operator/templates/extra-objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ range .Values.extraObjects }}
---
{{ include "postgres-operator.renderObject" (dict "value" . "context" $) }}
{{ end }}
5 changes: 5 additions & 0 deletions charts/postgres-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,8 @@ controllerID:
# The name of the controller ID to use.
# If not set and create is true, a name is generated using the fullname template
name:

# Extra Kubernetes manifests to deploy alongside the operator.
# Each entry is a full manifest, either as a map or as a string (templated with tpl,
# so Helm templating like {{ .Release.Namespace }} can be used).
extraObjects: []