Skip to content
Snippets Groups Projects
Unverified Commit c7a586d0 authored by Polina Bungina's avatar Polina Bungina Committed by GitHub
Browse files

Configure (upcoming) Patroni bootstrap labels feature (#2872)

Set the value from the critical-operation-pdb's selector if PDBs are enabled
parent 746df0d3
No related branches found
No related tags found
No related merge requests found
......@@ -1010,6 +1010,9 @@ 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) {
envVars = append(envVars, v1.EnvVar{Name: "KUBERNETES_BOOTSTRAP_LABELS", Value: "{\"critical-operation\":\"true\"}"})
}
} else {
envVars = append(envVars, v1.EnvVar{Name: "ETCD_HOST", Value: c.OpConfig.EtcdHost})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment