[bitnami/redis] Add extraEnv value to redis chart (#3651)

* Add extraEnv value to redis chart

* Bump version

* Add helper for rendering values

* Add extraEnvVars, extraEnvVarsCM and extraEnvVarsSecret to

* fix unnecessary newline

* Remove trim instruction

* Rebase app  version
This commit is contained in:
BaudouinH
2020-09-15 10:49:05 +02:00
committed by GitHub
parent a7424e082b
commit 10b54e8193
7 changed files with 128 additions and 1 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: redis
version: 10.8.2
version: 10.9.0
appVersion: 6.0.8
description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets.
keywords:
+6
View File
@@ -136,6 +136,9 @@ The following table lists the configurable parameters of the Redis chart and the
| `master.statefulset.rollingUpdatePartition` | Partition update strategy | `nil` |
| `master.podLabels` | Additional labels for Redis master pod | {} |
| `master.podAnnotations` | Additional annotations for Redis master pod | {} |
| `master.extraEnvVars` | Additional Environement Variables passed to the pod of the master's stateful set set | `[]`
| `master.extraEnvVarCMs` | Additional Environement Variables ConfigMappassed to the pod of the master's stateful set set | `[]`
| `master.extraEnvVarsSecret` | Additional Environement Variables Secret passed to the master's stateful set | `[]`
| `podDisruptionBudget.enabled` | Pod Disruption Budget toggle | `false` |
| `podDisruptionBudget.minAvailable` | Minimum available pods | `1` |
| `podDisruptionBudget.maxUnavailable` | Maximum unavailable pods | `nil` |
@@ -217,6 +220,9 @@ The following table lists the configurable parameters of the Redis chart and the
| `slave.persistence.matchExpressions` | matchExpressions persistent volume selector | `{}` |
| `slave.statefulset.updateStrategy` | Update strategy for StatefulSet | onDelete |
| `slave.statefulset.rollingUpdatePartition` | Partition update strategy | `nil` |
| `slave.extraEnvVars` | Additional Environement Variables passed to the pod of the slave's stateful set set | `[]`
| `slave.extraEnvVarCMs` | Additional Environement Variables ConfigMappassed to the pod of the slave's stateful set set | `[]`
| `masslaveter.extraEnvVarsSecret` | Additional Environement Variables Secret passed to the slave's stateful set | `[]`
| `slave.podLabels` | Additional labels for Redis slave pod | `master.podLabels` |
| `slave.podAnnotations` | Additional annotations for Redis slave pod | `master.podAnnotations` |
| `slave.schedulerName` | Name of an alternate scheduler | `nil` |
+13
View File
@@ -406,3 +406,16 @@ redis: spreadConstraints
Find more information at https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
{{- end -}}
{{- end -}}
{{/*
Renders a value that contains template.
Usage:
{{ include "redis.tplValue" (dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "redis.tplValue" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
@@ -162,6 +162,20 @@ spec:
- name: REDIS_PORT
value: {{ .Values.redisPort | quote }}
{{- end }}
{{- if .Values.master.extraEnvVars }}
{{- include "redis.tplValue" (dict "value" .Values.master.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if or .Values.master.extraEnvVarsCM .Values.master.extraEnvVarsSecret }}
envFrom:
{{- if .Values.master.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.master.extraEnvVarsCM }}
{{- end }}
{{- if .Values.master.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.master.extraEnvVarsSecret }}
{{- end }}
{{- end }}
ports:
- name: redis
containerPort: {{ .Values.redisPort }}
@@ -187,6 +187,20 @@ spec:
- name: REDIS_PORT
value: {{ .Values.redisPort | quote }}
{{- end }}
{{- if .Values.slave.extraEnvVars }}
{{- include "redis.tplValue" (dict "value" .Values.slave.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
{{- if or .Values.slave.extraEnvVarsCM .Values.slave.extraEnvVarsSecret }}
envFrom:
{{- if .Values.slave.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.slave.extraEnvVarsCM }}
{{- end }}
{{- if .Values.slave.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.slave.extraEnvVarsSecret }}
{{- end }}
{{- end }}
ports:
- name: redis
containerPort: {{ .Values.redisPort }}
+40
View File
@@ -407,6 +407,26 @@ master:
##
priorityClassName: {}
## An array to add extra env vars
## For example:
## extraEnvVars:
## - name: name
## value: value
## - name: other_name
## valueFrom:
## fieldRef:
## fieldPath: fieldPath
##
extraEnvVars: []
## ConfigMap with extra env vars:
##
extraEnvVarsCM: []
## Secret with extra env vars:
##
extraEnvVarsSecret: []
##
## Redis Slave properties
## Note: service.type is a mandatory parameter
@@ -565,6 +585,26 @@ slave:
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
# rollingUpdatePartition:
## An array to add extra env vars
## For example:
## extraEnvVars:
## - name: name
## value: value
## - name: other_name
## valueFrom:
## fieldRef:
## fieldPath: fieldPath
##
extraEnvVars: []
## ConfigMap with extra env vars:
##
extraEnvVarsCM: []
## Secret with extra env vars:
##
extraEnvVarsSecret: []
## Prometheus Exporter / Metrics
##
metrics:
+40
View File
@@ -407,6 +407,26 @@ master:
##
priorityClassName: {}
## An array to add extra env vars
## For example:
## extraEnvVars:
## - name: name
## value: value
## - name: other_name
## valueFrom:
## fieldRef:
## fieldPath: fieldPath
##
extraEnvVars: []
## ConfigMap with extra env vars:
##
extraEnvVarsCM: []
## Secret with extra env vars:
##
extraEnvVarsSecret: []
##
## Redis Slave properties
## Note: service.type is a mandatory parameter
@@ -565,6 +585,26 @@ slave:
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
# rollingUpdatePartition:
## An array to add extra env vars
## For example:
## extraEnvVars:
## - name: name
## value: value
## - name: other_name
## valueFrom:
## fieldRef:
## fieldPath: fieldPath
##
extraEnvVars: []
## ConfigMap with extra env vars:
##
extraEnvVarsCM: []
## Secret with extra env vars:
##
extraEnvVarsSecret: []
## Prometheus Exporter / Metrics
##
metrics: