chore: graceful startup probe

Give more time to the startup probe to wait for the plugin to start.

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
This commit is contained in:
Leonardo Cecchi 2024-12-11 13:28:13 +01:00
parent b7daaac075
commit 3b5cb4edb5
3 changed files with 5 additions and 5 deletions

View File

@ -312,7 +312,8 @@ func reconcilePodSpec(
envs = append(envs, additionalEnvs...)
baseProbe := &corev1.Probe{
FailureThreshold: 3,
FailureThreshold: 10,
TimeoutSeconds: 10,
ProbeHandler: corev1.ProbeHandler{
Exec: &corev1.ExecAction{
Command: []string{"/manager", "healthcheck", "unix"},
@ -324,7 +325,6 @@ func reconcilePodSpec(
sidecarConfig.Name = "plugin-barman-cloud"
sidecarConfig.Image = viper.GetString("sidecar-image")
sidecarConfig.ImagePullPolicy = cluster.Spec.ImagePullPolicy
sidecarConfig.LivenessProbe = baseProbe.DeepCopy()
sidecarConfig.StartupProbe = baseProbe.DeepCopy()
// merge the main container envs if they aren't already set

View File

@ -75,7 +75,7 @@ var _ = Describe("Backup and restore", func() {
},
src)).To(Succeed())
g.Expect(cluster2.IsReady(*src)).To(BeTrue())
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
}).WithTimeout(15 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Adding data to PostgreSQL")
clientSet, cfg, err := internalClient.NewClientSet()
@ -144,7 +144,7 @@ var _ = Describe("Backup and restore", func() {
types.NamespacedName{Name: dst.Name, Namespace: dst.Namespace},
dst)).To(Succeed())
g.Expect(cluster2.IsReady(*dst)).To(BeTrue())
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
}).WithTimeout(15 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Verifying the data exists in the restored instance")
output, _, err := command.ExecuteInContainer(ctx,

View File

@ -123,7 +123,7 @@ var _ = Describe("Replica cluster", func() {
},
replica)).To(Succeed())
g.Expect(cluster2.IsReady(*replica)).To(BeTrue())
}).WithTimeout(5 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
}).WithTimeout(15 * time.Minute).WithPolling(5 * time.Second).Should(Succeed())
By("Checking the data in the replica cluster")
output, _, err := command.ExecuteInContainer(ctx,