From 1988fa135e83b461d55c58498cf7412eccf6e56e Mon Sep 17 00:00:00 2001 From: Polina Bungina Date: Mon, 10 Mar 2025 16:00:26 +0100 Subject: [PATCH] Fix wrong condition for bootstrap labels --- pkg/cluster/k8sres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index 6b82efd1a..fedd6a917 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -1010,7 +1010,7 @@ func (c *Cluster) generateSpiloPodEnvVars( if c.patroniUsesKubernetes() { envVars = append(envVars, v1.EnvVar{Name: "DCS_ENABLE_KUBERNETES_API", Value: "true"}) - if c.OpConfig.EnablePodDisruptionBudget != nil && !(*c.OpConfig.EnablePodDisruptionBudget) { + if c.OpConfig.EnablePodDisruptionBudget != nil && *c.OpConfig.EnablePodDisruptionBudget { envVars = append(envVars, v1.EnvVar{Name: "KUBERNETES_BOOTSTRAP_LABELS", Value: "{\"critical-operation\":\"true\"}"}) } } else {