Skip to content

Commit

Permalink
Revert "Handle nil probe"
Browse files Browse the repository at this point in the history
This reverts commit 8f083d5.
  • Loading branch information
devkmsg committed Mar 7, 2023
1 parent 8f083d5 commit 2ea8fca
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions k8sutils/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,27 +438,21 @@ func getVolumeMount(name string, persistenceEnabled *bool, externalConfig *strin

// getProbeInfo generate probe for Redis StatefulSet
func getProbeInfo(probe *redisv1beta1.Probe) *corev1.Probe {
var p *corev1.Probe
if probe != nil {
p = &corev1.Probe{
InitialDelaySeconds: probe.InitialDelaySeconds,
PeriodSeconds: probe.PeriodSeconds,
FailureThreshold: probe.FailureThreshold,
TimeoutSeconds: probe.TimeoutSeconds,
SuccessThreshold: probe.SuccessThreshold,
}
} else {
p = &corev1.Probe{}
}
p.ProbeHandler = corev1.ProbeHandler{
Exec: &corev1.ExecAction{
Command: []string{
"bash",
"/usr/bin/healthcheck.sh",
return &corev1.Probe{
InitialDelaySeconds: probe.InitialDelaySeconds,
PeriodSeconds: probe.PeriodSeconds,
FailureThreshold: probe.FailureThreshold,
TimeoutSeconds: probe.TimeoutSeconds,
SuccessThreshold: probe.SuccessThreshold,
ProbeHandler: corev1.ProbeHandler{
Exec: &corev1.ExecAction{
Command: []string{
"bash",
"/usr/bin/healthcheck.sh",
},
},
},
}
return p
}

// getEnvironmentVariables returns all the required Environment Variables
Expand Down

0 comments on commit 2ea8fca

Please sign in to comment.