Open prezhdarov opened 1 year ago
For anyone running into this issue. Please take notice off the following KB article: https://kb.netapp.com/data-mgmt/SnapCenter/SC_KBs/Helm_upgrade_fails%2C_unable_to_build_kubernetes_objects_from_current_release_manifest
In the rare cases when trident-operator 22.07.0 runs on kubernetes 1.25 (with PodSecurityPolicies deprecated), helm upgrade to 22.10 fails with the following message: 'Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: "tridentoperatorpods" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "policy/v1beta1" ensure CRDs are installed first"'
Not sure fix for this will be worth it as I doubt there are many people running trident-csi 22.07 on kubernetes 1.25 (perhaps I am the only one), but there is a workaround.
To circumvent the issue, but this workaround will delete all helm history for trident-operator. In order to upgrade trident-operator to 22.10 using helm chart on kubernetes 1.25 the following steps are necessary:
This will bring trident-csi to v22.10 and will allow future upgrades. The problem with the upgrades seem to be in that sh.helm.release.x.x... secret, which contains a compressed and base64 encoded json with all the manifests in the deployment including a declaration of a PodSecurtyPolicy which is no longer available with kubernetes 1.25.