Skip to content

Commit

Permalink
Add support for master and replicas resources to be annotated
Browse files Browse the repository at this point in the history
signed-off-by: gcaracuel <[email protected]>
  • Loading branch information
gcaracuel committed Dec 13, 2024
1 parent 012f6b4 commit 066e7bc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bitnami/redis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ maintainers:
name: redis
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/redis
version: 20.5.0
version: 20.6.0
2 changes: 2 additions & 0 deletions bitnami/redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ helm install my-release --set master.persistence.existingClaim=PVC_NAME oci://RE
| `master.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `{}` |
| `master.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `master.pdb.minAvailable` and `master.pdb.maxUnavailable` are empty. | `{}` |
| `master.extraPodSpec` | Optionally specify extra PodSpec for the Redis&reg; master pod(s) | `{}` |
| `master.annotations` | Additional custom annotations for Redis&reg; master resource | `{}` |

### Redis&reg; replicas configuration parameters

Expand Down Expand Up @@ -764,6 +765,7 @@ helm install my-release --set master.persistence.existingClaim=PVC_NAME oci://RE
| `replica.pdb.minAvailable` | Minimum number/percentage of pods that should remain scheduled | `{}` |
| `replica.pdb.maxUnavailable` | Maximum number/percentage of pods that may be made unavailable. Defaults to `1` if both `replica.pdb.minAvailable` and `replica.pdb.maxUnavailable` are empty. | `{}` |
| `replica.extraPodSpec` | Optionally specify extra PodSpec for the Redis&reg; replicas pod(s) | `{}` |
| `replica.annotations` | Additional custom annotations for Redis&reg; replicas resource | `{}` |

### Redis&reg; Sentinel configuration parameters

Expand Down
5 changes: 3 additions & 2 deletions bitnami/redis/templates/master/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ metadata:
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: master
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.commonAnnotations .Values.master.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.master.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if not (eq .Values.master.kind "DaemonSet") }}
Expand Down
5 changes: 3 additions & 2 deletions bitnami/redis/templates/replicas/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ metadata:
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: replica
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- if or .Values.commonAnnotations .Values.replica.annotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.replica.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
{{- if and (not (eq .Values.replica.kind "DaemonSet")) (not .Values.replica.autoscaling.enabled) }}
Expand Down
6 changes: 6 additions & 0 deletions bitnami/redis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,9 @@ master:
## @param master.extraPodSpec Optionally specify extra PodSpec for the Redis&reg; master pod(s)
##
extraPodSpec: {}
## @param master.annotations Additional custom annotations for Redis&reg; Master resource
##
annotations: {}
## @section Redis&reg; replicas configuration parameters
##
replica:
Expand Down Expand Up @@ -1128,6 +1131,9 @@ replica:
## @param replica.extraPodSpec Optionally specify extra PodSpec for the Redis&reg; replicas pod(s)
##
extraPodSpec: {}
## @param replica.annotations Additional custom annotations for Redis&reg; replicas resource
##
annotations: {}
## @section Redis&reg; Sentinel configuration parameters
##

Expand Down

0 comments on commit 066e7bc

Please sign in to comment.