Skip to content

Commit

Permalink
Add 'additionalEnvVars' to the chart (cloudnative-pg#303)
Browse files Browse the repository at this point in the history
* Add 'additionalEnv' to the chart

Signed-off-by: Steven <[email protected]>
  • Loading branch information
Stevenpc3 authored May 30, 2024
1 parent f7e6ddc commit e364ff6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/cloudnative-pg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ CloudNativePG Operator Helm Chart
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| additionalArgs | list | `[]` | Additinal arguments to be added to the operator's args list. |
| additionalEnv | list | `[]` | Array containing extra environment variables which can be templated. See [values.yaml](./values.yaml) for examples.
| affinity | object | `{}` | Affinity for the operator to be installed. |
| commonAnnotations | object | `{}` | Annotations to be added to all other resources. |
| config | object | `{"create":true,"data":{},"name":"cnpg-controller-manager-config","secret":false}` | Operator configuration. |
Expand Down
3 changes: 3 additions & 0 deletions charts/cloudnative-pg/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ spec:
fieldPath: metadata.namespace
- name: MONITORING_QUERIES_CONFIGMAP
value: "{{ .Values.monitoringQueriesConfigMap.name }}"
{{- if .Values.additionalEnv }}
{{- tpl (.Values.additionalEnvVars | toYaml) . | nindent 8 }}
{{- end }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
livenessProbe:
Expand Down
8 changes: 8 additions & 0 deletions charts/cloudnative-pg/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ config:
# -- Additinal arguments to be added to the operator's args list.
additionalArgs: []

# -- Array containing extra environment variables which can be templated.
# For example:
# - name: RELEASE_NAME
# value: "{{ .Release.Name }}"
# - name: MY_VAR
# value: "mySpecialKey"
additionalEnv: []

serviceAccount:
# -- Specifies whether the service account should be created.
create: true
Expand Down

0 comments on commit e364ff6

Please sign in to comment.