From 910c7ee51659d8b0a96c5ab2a771f6765d43a730 Mon Sep 17 00:00:00 2001 From: inovindasari Date: Wed, 27 Nov 2024 15:40:30 +0100 Subject: [PATCH] remove standby leader configurable variable --- charts/postgres-operator/crds/operatorconfigurations.yaml | 3 --- charts/postgres-operator/values.yaml | 1 - delivery.yaml | 3 --- docs/reference/operator_parameters.md | 4 ---- manifests/configmap.yaml | 1 - manifests/operatorconfiguration.crd.yaml | 3 --- manifests/postgresql-operator-default-configuration.yaml | 1 - pkg/apis/acid.zalan.do/v1/crds.go | 3 --- pkg/apis/acid.zalan.do/v1/operator_configuration_type.go | 1 - pkg/cluster/k8sres.go | 2 +- 10 files changed, 1 insertion(+), 21 deletions(-) diff --git a/charts/postgres-operator/crds/operatorconfigurations.yaml b/charts/postgres-operator/crds/operatorconfigurations.yaml index a2436b894..d71f1b067 100644 --- a/charts/postgres-operator/crds/operatorconfigurations.yaml +++ b/charts/postgres-operator/crds/operatorconfigurations.yaml @@ -330,9 +330,6 @@ spec: pod_leader_label_value: type: string default: "master" - pod_standby_leader_label_value: - type: string - default: "master" pod_service_account_definition: type: string default: "" diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index d88660862..27630843c 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -195,7 +195,6 @@ configKubernetes: # label assigned to the Postgres pods (and services/endpoints) pod_role_label: spilo-role pod_leader_label_value: master - pod_standby_leader_label_value: master # service account definition as JSON/YAML string to be used by postgres cluster pods # pod_service_account_definition: "" diff --git a/delivery.yaml b/delivery.yaml index 3320a9c29..1bd1cbad9 100644 --- a/delivery.yaml +++ b/delivery.yaml @@ -14,9 +14,6 @@ pipeline: - desc: Run unit tests cmd: | make deps mocks test - - desc: 'Run e2e tests' - cmd: | - make e2e - desc: Build Docker image cmd: | IS_PR_BUILD=${CDP_PULL_REQUEST_NUMBER+"true"} diff --git a/docs/reference/operator_parameters.md b/docs/reference/operator_parameters.md index a72c776e0..ae8b164a1 100644 --- a/docs/reference/operator_parameters.md +++ b/docs/reference/operator_parameters.md @@ -441,10 +441,6 @@ configuration they are grouped under the `kubernetes` key. value of the pod label if Postgres role is primary when running on Kubernetes. The default is 'master'. -* **pod_standby_leader_label_value** - value of the pod label if Postgres role is standby_leader when running on Kubernetes. - The default is 'master'. - * **cluster_labels** list of `name:value` pairs for additional labels assigned to the cluster objects. The default is `application:spilo`. diff --git a/manifests/configmap.yaml b/manifests/configmap.yaml index b9ce21084..70e3328f2 100644 --- a/manifests/configmap.yaml +++ b/manifests/configmap.yaml @@ -135,7 +135,6 @@ data: # pod_priority_class_name: "postgres-pod-priority" pod_role_label: spilo-role pod_leader_label_value: master - pod_standby_leader_label_value: master pod_service_account_definition: "" pod_service_account_name: "postgres-pod" pod_service_account_role_binding_definition: "" diff --git a/manifests/operatorconfiguration.crd.yaml b/manifests/operatorconfiguration.crd.yaml index 3f1444f62..996729696 100644 --- a/manifests/operatorconfiguration.crd.yaml +++ b/manifests/operatorconfiguration.crd.yaml @@ -328,9 +328,6 @@ spec: pod_leader_label_value: type: string default: "master" - pod_standby_leader_label_value: - type: string - default: "master" pod_service_account_definition: type: string default: "" diff --git a/manifests/postgresql-operator-default-configuration.yaml b/manifests/postgresql-operator-default-configuration.yaml index f702b3c83..d67132dab 100644 --- a/manifests/postgresql-operator-default-configuration.yaml +++ b/manifests/postgresql-operator-default-configuration.yaml @@ -100,7 +100,6 @@ configuration: # pod_priority_class_name: "postgres-pod-priority" pod_role_label: spilo-role pod_leader_label_value: master - pod_standby_leader_label_value: master # pod_service_account_definition: "" pod_service_account_name: postgres-pod # pod_service_account_role_binding_definition: "" diff --git a/pkg/apis/acid.zalan.do/v1/crds.go b/pkg/apis/acid.zalan.do/v1/crds.go index 27b7057b8..01b38d97b 100644 --- a/pkg/apis/acid.zalan.do/v1/crds.go +++ b/pkg/apis/acid.zalan.do/v1/crds.go @@ -1500,9 +1500,6 @@ var OperatorConfigCRDResourceValidation = apiextv1.CustomResourceValidation{ "pod_leader_label_value": { Type: "string", }, - "pod_standby_leader_label_value": { - Type: "string", - }, "pod_service_account_definition": { Type: "string", }, diff --git a/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go b/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go index 65506313e..a0b0ada1b 100644 --- a/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go +++ b/pkg/apis/acid.zalan.do/v1/operator_configuration_type.go @@ -82,7 +82,6 @@ type KubernetesMetaConfiguration struct { InfrastructureRolesDefs []*config.InfrastructureRole `json:"infrastructure_roles_secrets,omitempty"` PodRoleLabel string `json:"pod_role_label,omitempty"` PodLeaderLabelValue string `json:"pod_leader_label_value,omitempty"` - PodStandbyLeaderLabelValue string `json:"pod_standby_leader_label_value,omitempty"` ClusterLabels map[string]string `json:"cluster_labels,omitempty"` InheritedLabels []string `json:"inherited_labels,omitempty"` InheritedAnnotations []string `json:"inherited_annotations,omitempty"` diff --git a/pkg/cluster/k8sres.go b/pkg/cluster/k8sres.go index b8aa8d7fa..2a19b438d 100644 --- a/pkg/cluster/k8sres.go +++ b/pkg/cluster/k8sres.go @@ -956,7 +956,7 @@ func (c *Cluster) generateSpiloPodEnvVars( }, { Name: "KUBERNETES_STANDBY_LEADER_LABEL_VALUE", - Value: c.OpConfig.PodStandbyLeaderLabelValue, + Value: c.OpConfig.PodLeaderLabelValue, }, { Name: "PGPASSWORD_SUPERUSER",