Skip to content

Commit e869c8b

Browse files
committed
While at it, also rename the deprecated enable_crd_validation param
1 parent 506d484 commit e869c8b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const (
5858
storageClassFlg = "storage-class"
5959
postgresImageFlg = "postgres-image"
6060
etcdHostFlg = "etcd-host"
61-
crdValidationFlg = "enable-crd-validation"
61+
crdRegistrationFlg = "enable-crd-registration"
6262
operatorImageFlg = "operator-image"
6363
pgParamBlockListFlg = "postgres-param-blocklist" // nolint
6464
majorVersionUpgradeModeFlg = "major-version-upgrade-mode"
@@ -136,7 +136,7 @@ func main() {
136136
tlsSubDomain string
137137

138138
enableLeaderElection bool
139-
enableCRDValidation bool
139+
enableCRDRegistration bool
140140
enableNetPol bool
141141
enablePodAntiaffinity bool
142142
enableStandbyLeaderSelector bool
@@ -214,8 +214,8 @@ func main() {
214214

215215
etcdHost = viper.GetString(etcdHostFlg)
216216

217-
viper.SetDefault(crdValidationFlg, true)
218-
enableCRDValidation = viper.GetBool(crdValidationFlg)
217+
viper.SetDefault(crdRegistrationFlg, true)
218+
enableCRDRegistration = viper.GetBool(crdRegistrationFlg)
219219

220220
// read the (space-separated) list of configured blocked params
221221
blockedPgParams := viper.GetStringSlice(pgParamBlockListFlg)
@@ -330,7 +330,7 @@ func main() {
330330
operatorImageFlg, operatorImage,
331331
postgresImageFlg, postgresImage,
332332
etcdHostFlg, etcdHost,
333-
crdValidationFlg, enableCRDValidation,
333+
crdRegistrationFlg, enableCRDRegistration,
334334
pgParamBlockListFlg, pgParamBlockList,
335335
majorVersionUpgradeModeFlg, majorVersionUpgradeMode,
336336
standbyClustersSourceRangesFlg, standbyClusterSourceRanges,
@@ -424,7 +424,7 @@ func main() {
424424
OperatorImage: operatorImage,
425425
DockerImage: postgresImage,
426426
EtcdHost: etcdHost,
427-
CRDValidation: enableCRDValidation,
427+
CRDRegistration: enableCRDRegistration,
428428
MajorVersionUpgradeMode: majorVersionUpgradeMode,
429429
PostgresletNamespace: postgresletNamespace,
430430
SidecarsConfigMapName: sidecarsCMName,

pkg/operatormanager/operatormanager.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ type Options struct {
6363
OperatorImage string
6464
DockerImage string
6565
EtcdHost string
66-
CRDValidation bool
66+
CRDRegistration bool
6767
MajorVersionUpgradeMode string
6868
PostgresletNamespace string
6969
SidecarsConfigMapName string
@@ -425,7 +425,7 @@ func (m *OperatorManager) editConfigMap(cm *corev1.ConfigMap, namespace string,
425425
cm.Data["etcd_host"] = options.EtcdHost
426426
}
427427

428-
cm.Data["enable_crd_validation"] = strconv.FormatBool(options.CRDValidation)
428+
cm.Data["enable_crd_registration"] = strconv.FormatBool(options.CRDRegistration)
429429
cm.Data["major_version_upgrade_mode"] = options.MajorVersionUpgradeMode
430430

431431
// we specifically refer to those two users in the cloud-api, so we hardcode them here as well to be on the safe side.

0 commit comments

Comments
 (0)