aws-ebs-csi-driver
aws-ebs-csi-driver copied to clipboard
helm fsGroupPolicy patch fails with immutable field
/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
Caused by https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/1377
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.
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.
If you run into this while upgrading please read @ConnorJC3's comment above and take a look at the Helm chart release notes, thanks.