Skip to content

Commit 47a1bbc

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 ea1986d commit 47a1bbc

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
@@ -209,6 +209,11 @@ podSecurityContext:
209209
runAsUser: 1000
210210
fsGroup: 1000
211211

212+
# -- Pod annotations to be applied to all Redis pods
213+
podAnnotations: {}
214+
# annotation-key: "annotation-value"
215+
# prometheus.io/scrape: "true"
216+
# prometheus.io/port: "6379"
212217

213218
# serviceAccountName: redis-sa
214219

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
@@ -147,6 +147,12 @@ tolerations: []
147147

148148
serviceAccountName: ""
149149

150+
# -- Pod annotations to be applied to all Redis pods
151+
podAnnotations: {}
152+
# annotation-key: "annotation-value"
153+
# prometheus.io/scrape: "true"
154+
# prometheus.io/port: "6379"
155+
150156
TLS:
151157
ca: ca.key
152158
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
@@ -148,6 +148,12 @@ tolerations: []
148148

149149
serviceAccountName: ""
150150

151+
# -- Pod annotations to be applied to all sentinel pods
152+
podAnnotations: {}
153+
# annotation-key: "annotation-value"
154+
# prometheus.io/scrape: "true"
155+
# prometheus.io/port: "6379"
156+
151157
TLS:
152158
ca: ca.key
153159
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)