Skip to content

Commit 5758f58

Browse files
committed
Move liveness probe logic
1 parent 5e2ff7b commit 5758f58

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

pkg/resources/kafka/pod.go

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,6 @@ fi`},
109109
if err != nil {
110110
log.Error(err, "failed to find controller listener port")
111111
} else {
112-
kafkaContainer.LivenessProbe = &corev1.Probe{
113-
ProbeHandler: corev1.ProbeHandler{
114-
Exec: &corev1.ExecAction{
115-
Command: []string{"/bin/bash", "-c", assets.KraftControllerHealthcheckSh},
116-
},
117-
},
118-
InitialDelaySeconds: 30,
119-
PeriodSeconds: 10,
120-
TimeoutSeconds: 5,
121-
FailureThreshold: 6,
122-
}
123-
124112
kafkaContainer.ReadinessProbe = &corev1.Probe{
125113
ProbeHandler: corev1.ProbeHandler{
126114
TCPSocket: &corev1.TCPSocketAction{
@@ -130,12 +118,23 @@ fi`},
130118
},
131119
},
132120
},
133-
InitialDelaySeconds: 15,
134-
PeriodSeconds: 10,
121+
InitialDelaySeconds: 0,
122+
PeriodSeconds: 5,
135123
TimeoutSeconds: 5,
136124
FailureThreshold: 20,
137125
}
138126
}
127+
kafkaContainer.LivenessProbe = &corev1.Probe{
128+
ProbeHandler: corev1.ProbeHandler{
129+
Exec: &corev1.ExecAction{
130+
Command: []string{"/bin/bash", "-c", assets.KraftControllerHealthcheckSh},
131+
},
132+
},
133+
InitialDelaySeconds: 30,
134+
PeriodSeconds: 10,
135+
TimeoutSeconds: 5,
136+
FailureThreshold: 6,
137+
}
139138
}
140139

141140
pod := &corev1.Pod{

0 commit comments

Comments
 (0)