trident-operator helm upgrade to v22.10 fails when kubernetes version is 1.25+
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:
- template trident upgrade with helm template and grab TridentOrchestrator crd definition from the template - this will be needed in last step.
- delete trident-operator installation with helm uninstall - not sure if this step is necessary at all.
- delete trident-operator deployment - this will delete only the operator and will keep trident-csi intact.
- delete any helm release secrets in the namespace - these will begin with sh.helm.release.X.X...
- install new trident-operator using helm - this will add the operator, but will not upgrade trident-csi.
- apply TridentOrchestrator definition saved in the first step - that will tell the trident-operator to redeploy trident-csi using the new version.
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.
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
Hi @bert-jan This issue should have been addressed with Trident Release v23.04. Please let us know if this issue still exists after upgrading.
Closing. Please re-open if you notice this issue with newer versions of Trident.