Skip to content

Commit 69a2076

Browse files
authored
fix: Add PostStart lifecycle hook to reset Redis sentinel (#1674)
Signed-off-by: Marco Frömbgen <23717573+mfroembgen@users.noreply.github.com>
1 parent e697294 commit 69a2076

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

controllers/argocd/statefulset.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,17 @@ func (r *ReconcileArgoCD) reconcileRedisStatefulSet(cr *argoproj.ArgoCD) error {
278278
Type: "RuntimeDefault",
279279
},
280280
},
281+
Lifecycle: &corev1.Lifecycle{
282+
PostStart: &corev1.LifecycleHandler{
283+
Exec: &corev1.ExecAction{
284+
Command: []string{
285+
"/bin/sh",
286+
"-c",
287+
"sleep 30; redis-cli -p 26379 sentinel reset argocd",
288+
},
289+
},
290+
},
291+
},
281292
VolumeMounts: []corev1.VolumeMount{
282293
{
283294
MountPath: "/data",

0 commit comments

Comments
 (0)