From a2328b9ec89755d84b07581bcc4681753c2704b7 Mon Sep 17 00:00:00 2001 From: inovindasari Date: Mon, 25 Nov 2024 14:56:45 +0100 Subject: [PATCH] more configurable variables --- pkg/cluster/k8sres.go | 4 ++-- pkg/controller/operator_config.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index cbcbb897a..9cb8419ae 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -955,9 +955,9 @@ func (c *Cluster) generateSpiloPodEnvVars( Value: c.OpConfig.PodLeaderLabelValue, }, { - Name: "KUBERNETES_STANDBY_LEADER_LABEL_VALUE", + Name: "KUBERNETES_STANDBY_LEADER_LABEL_VALUE", Value: c.OpConfig.PodStandbyLeaderLabelValue, - } + }, { Name: "PGPASSWORD_SUPERUSER", ValueFrom: &v1.EnvVarSource{ diff --git a/pkg/controller/operator_config.go b/pkg/controller/operator_config.go index 78e752f1d..90583216f 100644 --- a/pkg/controller/operator_config.go +++ b/pkg/controller/operator_config.go @@ -110,6 +110,8 @@ func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigur } result.PodRoleLabel = util.Coalesce(fromCRD.Kubernetes.PodRoleLabel, "spilo-role") + result.PodLeaderLabelValue = util.Coalesce(fromCRD.Kubernetes.PodLeaderLabelValue, "master") + result.PodStandbyLeaderLabelValue = util.Coalesce(fromCRD.Kubernetes.PodStandbyLeaderLabelValue, "master") result.ClusterLabels = util.CoalesceStrMap(fromCRD.Kubernetes.ClusterLabels, map[string]string{"application": "spilo"}) result.InheritedLabels = fromCRD.Kubernetes.InheritedLabels result.InheritedAnnotations = fromCRD.Kubernetes.InheritedAnnotations