[bitnami/redis] Implementing an option to define masters as DaemonSets #20939 (#20939)

This commit is contained in:
Michal Olah
2023-11-16 12:36:57 +01:00
committed by GitHub
parent 9c3dfb522a
commit a53f6eb7e9
6 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -34,4 +34,4 @@ maintainers:
name: redis name: redis
sources: sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis - https://github.com/bitnami/charts/tree/main/bitnami/redis
version: 18.3.3 version: 18.4.0
+1 -1
View File
@@ -172,7 +172,7 @@ The command removes all the Kubernetes components associated with the chart and
| `master.containerSecurityContext.allowPrivilegeEscalation` | Is it possible to escalate Redis® pod(s) privileges | `false` | | `master.containerSecurityContext.allowPrivilegeEscalation` | Is it possible to escalate Redis® pod(s) privileges | `false` |
| `master.containerSecurityContext.seccompProfile.type` | Set Redis® master containers' Security Context seccompProfile | `RuntimeDefault` | | `master.containerSecurityContext.seccompProfile.type` | Set Redis® master containers' Security Context seccompProfile | `RuntimeDefault` |
| `master.containerSecurityContext.capabilities.drop` | Set Redis® master containers' Security Context capabilities to drop | `["ALL"]` | | `master.containerSecurityContext.capabilities.drop` | Set Redis® master containers' Security Context capabilities to drop | `["ALL"]` |
| `master.kind` | Use either Deployment or StatefulSet (default) | `StatefulSet` | | `master.kind` | Use either Deployment, StatefulSet (default) or DaemonSet | `StatefulSet` |
| `master.schedulerName` | Alternate scheduler for Redis® master pods | `""` | | `master.schedulerName` | Alternate scheduler for Redis® master pods | `""` |
| `master.updateStrategy.type` | Redis® master statefulset strategy type | `RollingUpdate` | | `master.updateStrategy.type` | Redis® master statefulset strategy type | `RollingUpdate` |
| `master.minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `0` | | `master.minReadySeconds` | How many seconds a pod needs to be ready before killing the next, during update | `0` |
@@ -16,7 +16,9 @@ metadata:
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }} {{- end }}
spec: spec:
{{- if not (eq .Values.master.kind "DaemonSet") }}
replicas: {{ .Values.master.count }} replicas: {{ .Values.master.count }}
{{- end }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.master.podLabels .Values.commonLabels ) "context" . ) }} {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.master.podLabels .Values.commonLabels ) "context" . ) }}
selector: selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
@@ -472,7 +474,7 @@ spec:
{{- if .Values.metrics.extraVolumes }} {{- if .Values.metrics.extraVolumes }}
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.extraVolumes "context" $ ) | nindent 8 }}
{{- end }} {{- end }}
{{- if not .Values.master.persistence.enabled }} {{- if or (not .Values.master.persistence.enabled) (eq .Values.master.kind "DaemonSet") }}
- name: redis-data - name: redis-data
{{- if or .Values.master.persistence.medium .Values.master.persistence.sizeLimit }} {{- if or .Values.master.persistence.medium .Values.master.persistence.sizeLimit }}
emptyDir: emptyDir:
@@ -135,7 +135,7 @@ spec:
- name: REDIS_MASTER_HOST - name: REDIS_MASTER_HOST
{{- if .Values.replica.externalMaster.enabled }} {{- if .Values.replica.externalMaster.enabled }}
value: {{ .Values.replica.externalMaster.host | quote }} value: {{ .Values.replica.externalMaster.host | quote }}
{{- else if and (eq (int64 .Values.master.count) 1) (ne .Values.master.kind "Deployment") }} {{- else if and (eq (int64 .Values.master.count) 1) (eq .Values.master.kind "StatefulSet") }}
value: {{ template "common.names.fullname" . }}-master-0.{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} value: {{ template "common.names.fullname" . }}-master-0.{{ template "common.names.fullname" . }}-headless.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
{{- else }} {{- else }}
value: {{ template "common.names.fullname" . }}-master.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }} value: {{ template "common.names.fullname" . }}-master.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}
+2 -2
View File
@@ -40,8 +40,8 @@
"type": "string", "type": "string",
"title": "Workload Kind", "title": "Workload Kind",
"form": true, "form": true,
"description": "Allowed values: `Deployment` or `StatefulSet`", "description": "Allowed values: `Deployment`, `StatefulSet` or `DaemonSet`",
"enum": ["Deployment", "StatefulSet"] "enum": ["Deployment", "StatefulSet", "DaemonSet"]
}, },
"persistence": { "persistence": {
"type": "object", "type": "object",
+1 -1
View File
@@ -299,7 +299,7 @@ master:
capabilities: capabilities:
drop: drop:
- ALL - ALL
## @param master.kind Use either Deployment or StatefulSet (default) ## @param master.kind Use either Deployment, StatefulSet (default) or DaemonSet
## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/
## ##
kind: StatefulSet kind: StatefulSet