Fix wrong condition for bootstrap labels (#2875)

This commit is contained in:
Polina Bungina 2025-03-10 17:05:27 +01:00 committed by GitHub
parent c7a586d0f8
commit 68c4b49636
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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 {