I have been using Zalando Postgres operator for deploying Postgres databases on DigitalOcean. I want to upgrade my postgres operator but I don't seem to know what I should be doing.
I do the following to get operator deployed:
NAME READY STATUS RESTARTS AGE
postgres-operator-58b75c5587-wsl8m 1/1 Running 5 (60m ago) 15d
I tried the following but I get errors:
helm upgrade postgres-operator charts/postgres-operator/postgres-operator-1.10.0.tgz -f charts/postgres-operator/values.yaml
Error: UPGRADE FAILED: error validating "": error validating data:
[ValidationError(OperatorConfiguration.configuration): unknown field "crd_categories" in
do.zalan.acid.v1.OperatorConfiguration.configuration, ValidationError(OperatorConfiguration.configuration): unknown field
"enable_crd_registration" in do.zalan.acid.v1.OperatorConfiguration.configuration,
ValidationError(OperatorConfiguration.configuration): unknown field
"enable_team_id_clustername_prefix" in
do.zalan.acid.v1.OperatorConfiguration.configuration,
ValidationError(OperatorConfiguration.configuration.kubernetes): unknown field
"enable_readiness_probe" in do.zalan.acid.v1.OperatorConfiguration.configuration.kubernetes,
ValidationError(OperatorConfiguration.configuration.kubernetes): unknown field
"persistent_volume_claim_retention_policy" in do.zalan.acid.v1.OperatorConfiguration.configuration.kubernetes,
ValidationError(OperatorConfiguration.configuration.kubernetes): unknown field
"pod_antiaffinity_preferred_during_scheduling" in do.zalan.acid.v1.OperatorConfiguration.configuration.kubernetes,
ValidationError(OperatorConfiguration.configuration.kubernetes): unknown field
"share_pgsocket_with_sidecars" in do.zalan.acid.v1.OperatorConfiguration.configuration.kubernetes, ValidationError(OperatorConfiguration.configuration.load_balancer): unknown field
"enable_master_pooler_load_balancer" in do.zalan.acid.v1.OperatorConfiguration.configuration.load_balancer,
ValidationError(OperatorConfiguration.configuration.load_balancer): unknown field "enable_replica_pooler_load_balancer" in do.zalan.acid.v1.OperatorConfiguration.configuration.load_balancer, ValidationError(OperatorConfiguration.configuration.load_balancer): unknown field
"master_legacy_dns_name_format" in do.zalan.acid.v1.OperatorConfiguration.configuration.load_balancer,
ValidationError(OperatorConfiguration.configuration.load_balancer): unknown field
"replica_legacy_dns_name_format" in do.zalan.acid.v1.OperatorConfiguration.configuration.load_balancer,
ValidationError(OperatorConfiguration.configuration.logical_backup): unknown field
"logical_backup_s3_retention_time" in do.zalan.acid.v1.OperatorConfiguration.configuration.logical_backup, ValidationError(OperatorConfiguration.configuration): unknown field "patroni" in
do.zalan.acid.v1.OperatorConfiguration.configuration,
ValidationError(OperatorConfiguration.configuration.timeouts): unknown field
"patroni_api_check_interval" in do.zalan.acid.v1.OperatorConfiguration.configuration.timeouts, ValidationError(OperatorConfiguration.configuration.timeouts): unknown field
"patroni_api_check_timeout" in do.zalan.acid.v1.OperatorConfiguration.configuration.timeouts, ValidationError(OperatorConfiguration.configuration.users): unknown field
"enable_password_rotation" in do.zalan.acid.v1.OperatorConfiguration.configuration.users, ValidationError(OperatorConfiguration.configuration.users): unknown field
"password_rotation_interval" in do.zalan.acid.v1.OperatorConfiguration.configuration.users, ValidationError(OperatorConfiguration.configuration.users): unknown field
"password_rotation_user_retention" in do.zalan.acid.v1.OperatorConfiguration.configuration.users]
How am I supposed to upgrade the postgres operator? Any help?
I had to apply the crds first like it was mentioned here :
you need to install crd-s first
They also mentioned:
When using helm, be aware that installing the new chart will not update the Postgresql and OperatorConfiguration CRD. Make sure to update them before with the provided manifests in the crds folder. Otherwise, you might face errors about new Postgres manifest or configuration options being unknown to the CRD schema validation.
K is an alias for kubectl. Create
alias k=kubectl
like this. Then the upgrade worked.