Skip to content

Commit

Permalink
Revert valkey changes so they can be made in a separate PR
Browse files Browse the repository at this point in the history
  • Loading branch information
kppullin committed Feb 20, 2025
1 parent 2f713f2 commit d3dd475
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion bitnami/valkey/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ maintainers:
name: valkey
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/valkey
version: 2.3.1
version: 2.3.0
20 changes: 6 additions & 14 deletions bitnami/valkey/templates/scripts-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -779,22 +779,14 @@ data:
update-primary-label.sh: |
#!/bin/bash
while true; do
while [ ! -f "/etc/shared/current" ] && [ ! -f "/etc/shared/terminate" ]; do
while [ ! -f "/etc/shared/current" ]; do
sleep 1
done
if [ -f "/etc/shared/current" ]; then
echo "new primary elected, updating label(s)..."
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/current")" isPrimary="true" --overwrite
if [ -f /etc/shared/previous ]; then
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/previous")" isPrimary="false" --overwrite
fi
rm "/etc/shared/current" "/etc/shared/previous"
fi
if [ -f "/etc/shared/terminate" ]; then
echo "received signal to terminate"
exit
echo "new primary elected, updating label(s)..."
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/current")" isPrimary="true" --overwrite
if [ -f /etc/shared/previous ]; then
kubectl label pod --field-selector metadata.name="$(< "/etc/shared/previous")" isPrimary="false" --overwrite
fi
rm "/etc/shared/current" "/etc/shared/previous"
done
{{- end }}
6 changes: 0 additions & 6 deletions bitnami/valkey/templates/sentinel/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -639,12 +639,6 @@ spec:
image: {{ template "valkey.kubectl.image" . }}
imagePullPolicy: {{ .Values.kubectl.image.pullPolicy | quote }}
command: {{- toYaml .Values.kubectl.command | nindent 12 }}
lifecycle:
preStop:
exec:
command:
- touch
- /etc/shared/terminate
{{- if .Values.kubectl.containerSecurityContext.enabled }}
securityContext: {{- include "common.compatibility.renderSecurityContext" (dict "secContext" .Values.kubectl.containerSecurityContext "context" $) | nindent 12 }}
{{- end }}
Expand Down

0 comments on commit d3dd475

Please sign in to comment.