Open houshym opened 3 years ago
See ##1346 and #1440. It's a new field (for v1.7.0, which isn't released yet) which does not exist in your CRD.
Hi @houshym You should delete the old CustomResourceDefinitions
it is brand new cluster
helm upgrade should update any custom CRDs, but:
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
manifest_sorter.go:192: info: skipping unknown hook: "crd-install"
Error: UPGRADE FAILED: error validating "": error validating data: [ValidationError(OperatorConfiguration.configuration.kubernetes): unknown field "enable_cross_namespace_secret" in do.zalan.acid.v1.OperatorConfiguration.configuration.kubernetes, ValidationError(OperatorConfiguration.configuration.teams_api): unknown field "enable_team_member_deprecation" in do.zalan.acid.v1.OperatorConfiguration.configuration.teams_api, ValidationError(OperatorConfiguration.configuration.teams_api): unknown field "role_deletion_suffix" in do.zalan.acid.v1.OperatorConfiguration.configuration.teams_api]
Im running into the same issue after upgrading from 1.6.2 to 1.7.0.
How am i supposed to update in an environment where there is existing Postgres "Clusters"? If i delete the crd, i need to basicly reinstall the operator via Helm. But that should AFAIK also delete the existing Postgres "clusters".
What is the right way to do this upgrade in a live environment?
In general Helm does not yet have a recommended way to upgrade CRDs. In my case, after verifying that the new CRDs were compatible with my existing resources (no fields renamed, for example), I was able to simply kubectl apply -f path/to/new/crd.yaml
each of the CRDs to update them. Requiring manual intervention via kubectl
isn't ideal, especially if you're using some kind of GitOps-based workflow, but since Helm doesn't yet have a solution this may be your best option.
Thanks for the input, i will try that
I have the same issue, trying to install helm chart for the first time into k8s cluster, i.e. there are no CRDs yet:
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [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]
Using latest helm repo
$ helm repo add postgres-operator https://opensource.zalando.com/postgres-operator/charts/postgres-operator/
$ helm repo update postgres-operator
$ helm show chart postgres-operator/postgres-operator
apiVersion: v1
appVersion: 1.7.1
version: 1.7.1
.....
Using custom helm values ( postgres-operator-helm-values.yaml
, adopted from latest values.yaml ):
configLoadBalancer:
# DNS zone for cluster DNS name when load balancer is configured for cluster
#db_hosted_zone: db.example.com
# toggles service type load balancer pointing to the master pod of the cluster
enable_master_load_balancer: true
# toggles service type load balancer pointing to the master pooler pod of the cluster
enable_master_pooler_load_balancer: true
# toggles service type load balancer pointing to the replica pod of the cluster
enable_replica_load_balancer: true
# toggles service type load balancer pointing to the replica pooler pod of the cluster
enable_replica_pooler_load_balancer: true
Installing with
helm upgrade --wait --install --namespace postgres-operator \
--values postgres-operator-helm-values.yaml \
postgres-operator postgres-operator/postgres-operator
After the helm install failed, I see the following CRDs in my k8s cluster:
Looks like the latest values.yaml
doesn't match the latest Chart.yaml
.
I.e. although the values.yaml
has breaking changes, the Chart.yaml
still claims to be version 1.7.1
.
I'm having this issue also, the chart version hasn't been upgraded but the chart has been modified
Fixed by deleting uninstalling the operator, deleting the zalando operator CRD and installing again
Like @yevon said, after uninstalling the operator and running these commands, it worked:
kubectl delete crd operatorconfigurations.acid.zalan.do
kubectl delete crd postgresqls.acid.zalan.do
kubectl delete crd postgresteams.acid.zalan.do
Hi I did: 1- git clone https://github.com/zalando/postgres-operator.git 2- helm install postgres-operator ./charts/postgres-operator
I got following error