Skip to content

Commit 25f89c1

Browse files
hanbing204drivebyer
authored andcommitted
feat: add support for customizable annotations for Redis and Sentinel pods (#1588)
Signed-off-by: Bing <[email protected]>
1 parent af04a32 commit 25f89c1

File tree

12 files changed

+39
-0
lines changed

12 files changed

+39
-0
lines changed

charts/redis-cluster/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ helm delete <my-release> --namespace <namespace>
6565
| initContainer.imagePullPolicy | string | `"IfNotPresent"` | |
6666
| initContainer.resources | object | `{}` | |
6767
| labels | object | `{}` | |
68+
| podAnnotations | object | `{}` | Pod annotations to be applied to all Redis pods |
6869
| podSecurityContext.fsGroup | int | `1000` | |
6970
| podSecurityContext.runAsUser | int | `1000` | |
7071
| priorityClassName | string | `""` | |

charts/redis-cluster/templates/redis-cluster.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ metadata:
55
name: {{ .Values.redisCluster.name | default .Release.Name }}
66
labels: {{- include "common.labels" . | nindent 4 }}
77
annotations:
8+
{{- if .Values.podAnnotations }}
9+
{{ toYaml .Values.podAnnotations | nindent 4 }}
10+
{{- end }}
811
{{ if .Values.redisCluster.recreateStatefulSetOnUpdateInvalid }}
912
redis.opstreelabs.in/recreate-statefulset: "true"
1013
{{ end }}

charts/redis-cluster/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ podSecurityContext:
214214
runAsUser: 1000
215215
fsGroup: 1000
216216

217+
# -- Pod annotations to be applied to all Redis pods
218+
podAnnotations: {}
219+
# annotation-key: "annotation-value"
220+
# prometheus.io/scrape: "true"
221+
# prometheus.io/port: "6379"
217222

218223
# serviceAccountName: redis-sa
219224

charts/redis-replication/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ helm delete <my-release> --namespace <namespace>
6464
| initContainer.imagePullPolicy | string | `"IfNotPresent"` | |
6565
| initContainer.resources | object | `{}` | |
6666
| labels | object | `{}` | |
67+
| podAnnotations | object | `{}` | Pod annotations to be applied to all Redis pods |
6768
| nodeSelector | object | `{}` | |
6869
| pdb.enabled | bool | `false` | |
6970
| pdb.maxUnavailable | string | `nil` | |

charts/redis-replication/templates/redis-replication.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ metadata:
55
name: {{ .Values.redisReplication.name | default .Release.Name }}
66
labels: {{- include "common.labels" . | nindent 4 }}
77
annotations:
8+
{{- if .Values.podAnnotations }}
9+
{{ toYaml .Values.podAnnotations | nindent 4 }}
10+
{{- end }}
811
{{ if .Values.redisReplication.recreateStatefulSetOnUpdateInvalid }}
912
redis.opstreelabs.in/recreate-statefulset: "true"
1013
{{ end }}

charts/redis-replication/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ tolerations: []
151151

152152
serviceAccountName: ""
153153

154+
# -- Pod annotations to be applied to all Redis pods
155+
podAnnotations: {}
156+
# annotation-key: "annotation-value"
157+
# prometheus.io/scrape: "true"
158+
# prometheus.io/port: "6379"
159+
154160
TLS:
155161
ca: ca.key
156162
cert: tls.crt

charts/redis-sentinel/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ helm delete <my-release> --namespace <namespace>
6363
| initContainer.imagePullPolicy | string | `"IfNotPresent"` | |
6464
| initContainer.resources | object | `{}` | |
6565
| labels | object | `{}` | |
66+
| podAnnotations | object | `{}` | Pod annotations to be applied to all sentinel pods |
6667
| livenessProbe.failureThreshold | int | `3` | |
6768
| livenessProbe.initialDelaySeconds | int | `1` | |
6869
| livenessProbe.periodSeconds | int | `10` | |

charts/redis-sentinel/templates/redis-sentinel.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ metadata:
55
name: {{ .Values.redisSentinel.name | default .Release.Name }}
66
labels: {{- include "common.labels" . | nindent 4 }}
77
annotations:
8+
{{- if .Values.podAnnotations }}
9+
{{ toYaml .Values.podAnnotations | nindent 4 }}
10+
{{- end }}
811
{{ if .Values.redisSentinel.recreateStatefulSetOnUpdateInvalid }}
912
redis.opstreelabs.in/recreate-statefulset: "true"
1013
{{ end }}

charts/redis-sentinel/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ tolerations: []
152152

153153
serviceAccountName: ""
154154

155+
# -- Pod annotations to be applied to all sentinel pods
156+
podAnnotations: {}
157+
# annotation-key: "annotation-value"
158+
# prometheus.io/scrape: "true"
159+
# prometheus.io/port: "6379"
160+
155161
TLS:
156162
ca: ca.key
157163
cert: tls.crt

charts/redis/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ helm delete <my-release> --namespace <namespace>
6363
| initContainer.imagePullPolicy | string | `"IfNotPresent"` | |
6464
| initContainer.resources | object | `{}` | |
6565
| labels | object | `{}` | |
66+
| podAnnotations | object | `{}` | Pod annotations to be applied to all Redis pods |
6667
| nodeSelector | object | `{}` | |
6768
| podSecurityContext.fsGroup | int | `1000` | |
6869
| podSecurityContext.runAsUser | int | `1000` | |

0 commit comments

Comments
 (0)