Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trident-operator helm upgrade to v22.10 fails when kubernetes version is 1.25+ #783

Open
prezhdarov opened this issue Nov 22, 2022 · 1 comment
Labels

Comments

@prezhdarov
Copy link

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.

@prezhdarov prezhdarov added the bug label Nov 22, 2022
@bert-jan
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants