mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 14:57:08 +08:00
[bitnami/redis]: Add an extra VolumeMount to the metrics sidecar (#6806)
* [bitnami/redis]: Add an extra VolumeMount to the metrics sidecar for custom scripts If `metrics.extraArgs.script` is defined, add an extra VolumeMount to the metrics sidecar containers to ensure they can see it. The responsibility of providing the volume and script is on the chart, by way of the new `metrics.extraVolumes` and `metrics.extraVolumeMounts` parameters. This was not added to the sentinel sidecar, as that is apparently going away. Fixes issue: https://github.com/bitnami/charts/issues/6792 * address review feedback Co-authored-by: Nicolas Simonds <nisimond@cisco.com>
This commit is contained in:
@@ -25,4 +25,4 @@ name: redis
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-redis
|
||||
- http://redis.io/
|
||||
version: 14.8.4
|
||||
version: 14.8.5
|
||||
|
||||
@@ -370,6 +370,8 @@ The command removes all the Kubernetes components associated with the chart and
|
||||
| `metrics.image.pullSecrets` | Redis(TM) Exporter image pull secrets | `[]` |
|
||||
| `metrics.redisTargetHost` | A way to specify an alternative Redis(TM) hostname | `localhost` |
|
||||
| `metrics.extraArgs` | Extra arguments for Redis(TM) exporter, for example: | `{}` |
|
||||
| `metrics.extraVolumes` | Optionally specify extra list of additional volumes for the Redis(TM) metrics sidecar | `[]` |
|
||||
| `metrics.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Redis(TM) metrics sidecar | `[]` |
|
||||
| `metrics.containerSecurityContext.enabled` | Enabled Redis(TM) exporter containers' Security Context | `true` |
|
||||
| `metrics.containerSecurityContext.runAsUser` | Set Redis(TM) exporter containers' Security Context runAsUser | `1001` |
|
||||
| `metrics.resources.limits` | The resources limits for the Redis(TM) exporter container | `{}` |
|
||||
|
||||
@@ -290,6 +290,9 @@ spec:
|
||||
mountPath: /opt/bitnami/redis/certs
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.master.sidecars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.master.sidecars "context" $) | nindent 8 }}
|
||||
@@ -384,6 +387,9 @@ spec:
|
||||
{{- if .Values.master.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.master.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.master.persistence.enabled }}
|
||||
- name: redis-data
|
||||
emptyDir: {}
|
||||
|
||||
@@ -300,6 +300,9 @@ spec:
|
||||
mountPath: /opt/bitnami/redis/certs
|
||||
readOnly: true
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumeMounts "context" $ ) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.replica.sidecars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.replica.sidecars "context" $) | nindent 8 }}
|
||||
@@ -392,6 +395,9 @@ spec:
|
||||
{{- if .Values.replica.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.replica.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if not .Values.replica.persistence.enabled }}
|
||||
- name: redis-data
|
||||
emptyDir: {}
|
||||
|
||||
@@ -1130,6 +1130,12 @@ metrics:
|
||||
containerSecurityContext:
|
||||
enabled: true
|
||||
runAsUser: 1001
|
||||
## @param metrics.extraVolumes Optionally specify extra list of additional volumes for the Redis(TM) metrics sidecar
|
||||
##
|
||||
extraVolumes: []
|
||||
## @param metrics.extraVolumeMounts Optionally specify extra list of additional volumeMounts for the Redis(TM) metrics sidecar
|
||||
##
|
||||
extraVolumeMounts: []
|
||||
## Redis(TM) exporter resource requests and limits
|
||||
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
|
||||
## @param metrics.resources.limits The resources limits for the Redis(TM) exporter container
|
||||
|
||||
Reference in New Issue
Block a user