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

helm fsGroupPolicy patch fails with immutable field #1390

Closed
bcha opened this issue Sep 16, 2022 · 4 comments
Closed

helm fsGroupPolicy patch fails with immutable field #1390

bcha opened this issue Sep 16, 2022 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@bcha
Copy link

bcha commented Sep 16, 2022

/kind bug

What happened?

Upgrading with helm..

-     helm.sh/chart: aws-ebs-csi-driver-2.10.1
-     app.kubernetes.io/version: "1.11.2"
+     helm.sh/chart: aws-ebs-csi-driver-2.11.0
+     app.kubernetes.io/version: "1.11.3"

...results in Error: UPGRADE FAILED: cannot patch "ebs.csi.aws.com" with kind CSIDriver: CSIDriver.storage.k8s.io "ebs.csi.aws.com" is invalid: spec.fsGroupPolicy: Invalid value: "File": field is immutable

What you expected to happen?
Smooth upgrade.

How to reproduce it (as minimally and precisely as possible)?
Upgrade from helm chart 2.10.1 to 2.11.0

Anything else we need to know?:

Environment

  • Kubernetes version (use kubectl version): 1.21
  • Driver version: 1.11.3
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 16, 2022
@z0rc
Copy link

z0rc commented Sep 16, 2022

Caused by #1377

@ConnorJC3
Copy link
Contributor

Hi all, sorry we didn't catch this!

Firstly, if you want to upgrade to helm chart 1.11.0, you can do so by pre-deleting the CSIDriver object, for example with kubectl delete csidriver ebs.csi.aws.com. This won't affect existing volumes, but it will prevent the driver from responding to future requests (similar to if the driver container had crashed), so follow it with an upgrade.

If you can't delete the CSIDriver object for any reason, I'm pushing an additional parameter useOldCSIDriver that can be set to true to use the old object. This will allow an upgrade from an old version without needing to recreate the CSIDriver object. You can track that change in #1391. That PR also adds a note to the helm chart changelog about this issue.

@ConnorJC3
Copy link
Contributor

cc @olemarkus I know you were going to update the kops version of the addon soon, you'll either need custom logic to replace the CSIDriver or opt to use the old version on existing clusters.

@gtxu gtxu unpinned this issue Sep 26, 2022
@gtxu gtxu pinned this issue Sep 26, 2022
@gtxu gtxu unpinned this issue Sep 28, 2022
@gtxu gtxu pinned this issue Sep 28, 2022
@torredil
Copy link
Member

If you run into this while upgrading please read @ConnorJC3's comment above and take a look at the Helm chart release notes, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants