If you upgrade Continuous Delivery for Puppet Enterprise from a version earlier than 4.5.0 to a later version, configuration values for upgraded installs might have been reset to the values used in new installations due to a bug. This causes upgrades to fail with an Error from server (Invalid): error when applying patch
. This issue primarily affects online legacy architecture installs that had KOTS 1.20 or earlier installed pre-upgrade.
Error messages and logs
Error from server (Invalid): error when applying patch: ... to: Resource: "apps/v1, Resource=statefulsets", GroupVersionKind: "apps/v1, Kind=StatefulSet" Name: "minio", Namespace: "default" for: "/tmp/066741647": StatefulSet.apps "minio" is invalid: spec: Forbidden:updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden Error from server (Invalid): error when applying patch: ... to: Resource: "apps/v1, Resource=statefulsets", GroupVersionKind: "apps/v1, Kind=StatefulSet" Name: "postgres", Namespace: "default" for: "/tmp/066741647": StatefulSet.apps "postgres" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'template', and 'updateStrategy' are forbidden
Version and installation information
Product: Continuous Delivery for Puppet Enterprise
Version: Upgrading from a version earlier than 4.5.0 to a version later than 4.5.0
Installation type: Online
Solution
Follow these steps to fix the issue.
-
In Puppet Application Manager (PAM), on the Config page under Advanced configuration and tuning click on We need to adjust the default settings. Set Object store capacity to 50Gi and CD4PE PostgreSQL capacity to 50Gi. Scroll down and click Save Config.
-
To update configuration, on the command line, where PAM is installed, run
kubectl kots download cd4pe --namespace default
Incd4pe/upstream/userdata/config.yaml
, set the.spec.values.high_availability.value
property to1
Before the changing the
value
,config.yaml
looks like this:apiVersion: kots.io/v1beta1 kind: ConfigValues metadata: creationTimestamp: null name: cd4pe spec: values: ... high_availability: value: "0"
After the change:
high_availability: value: "1"
-
To redeploy Continuous Delivery for PE, run
kubectl kots upload --namespace default --slug cd4pe ./cd4pe --deploy
-
In PAM, on the Version history page, verify that deployment worked, and wait for the application to update.
How can we improve this article?
0 comments
Please sign in to leave a comment.
Related articles