Skip to content

Commit

Permalink
[bitnami/redis] label slave pod using sentinel masterService (#29121)
Browse files Browse the repository at this point in the history
* add label to statefulset replicas and delete logic

Signed-off-by: BernardBerenes <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

* bump chart version

Signed-off-by: BernardBerenes <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <[email protected]>

---------

Signed-off-by: BernardBerenes <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Bernard Bereness <[email protected]>
Co-authored-by: Bitnami Containers <[email protected]>
  • Loading branch information
BernardBerenes and bitnami-bot authored Sep 5, 2024
1 parent 44aca55 commit 6ae397f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bitnami/redis/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Changelog

## 20.0.4 (2024-08-29)
## 20.0.5 (2024-09-05)

* [bitnami/redis] update values.schema.json ([#29106](https://github.com/bitnami/charts/pull/29106))
* [bitnami/redis] label slave pod using sentinel masterService ([#29121](https://github.com/bitnami/charts/pull/29121))

## <small>20.0.4 (2024-09-04)</small>

* [bitnami/redis] update values.schema.json (#29106) ([8a2fea3](https://github.com/bitnami/charts/commit/8a2fea3d935989fc929092083e3af341d4eb545f)), closes [#29106](https://github.com/bitnami/charts/issues/29106)

## <small>20.0.3 (2024-08-20)</small>

Expand Down
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.0.4
version: 20.0.5
1 change: 1 addition & 0 deletions bitnami/redis/templates/scripts-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ data:
done
echo "new master elected, updating label(s)..."
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/current")" isMaster="true" --overwrite
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/current")" app.kubernetes.io/role-
if [ -f /etc/shared/previous ]; then
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/previous")" isMaster="false" --overwrite
fi
Expand Down
3 changes: 3 additions & 0 deletions bitnami/redis/templates/sentinel/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
{{- if (include "redis.createConfigmap" .) }}
checksum/configmap: {{ pick ( include (print $.Template.BasePath "/configmap.yaml") . | fromYaml ) "data" | toYaml | sha256sum }}
{{- end }}
{{- if .Values.sentinel.masterService.enabled }}
app.kubernetes.io/role: slave
{{- end }}
checksum/health: {{ pick ( include (print $.Template.BasePath "/health-configmap.yaml") . | fromYaml ) "data" | toYaml | sha256sum }}
checksum/scripts: {{ pick ( include (print $.Template.BasePath "/scripts-configmap.yaml") . | fromYaml ) "data" | toYaml | sha256sum }}
checksum/secret: {{ pick ( include (print $.Template.BasePath "/secret.yaml") . | fromYaml ) "data" | toYaml | sha256sum }}
Expand Down

0 comments on commit 6ae397f

Please sign in to comment.