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

Field is immutable error when Helm updates CSIDriver #2620

Closed
Aetf opened this issue Oct 21, 2023 · 1 comment
Closed

Field is immutable error when Helm updates CSIDriver #2620

Aetf opened this issue Oct 21, 2023 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/wont-fix This issue won't be fixed
Milestone

Comments

@Aetf
Copy link

Aetf commented Oct 21, 2023

What happened?

I'm deploying juicefs-csi-driver via helm, When running a new deployment Pulumi is issuing an update to the CSIDriver definition and k8s responds with podInfoOnMount field is immutable error. This should be fixable by using a replace.

Example

Run pulumi up --yes

Output of pulumi about

  kubernetes:storage.k8s.io/v1:CSIDriver (csi.juicefs.com):
    error: 1 error occurred:
        * the Kubernetes API server reported that "csi.juicefs.com" failed to fully initialize or become live: CSIDriver.storage.k8s.io "csi.juicefs.com" is invalid: spec.podInfoOnMount: Invalid value: true: field is immutable

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@Aetf Aetf added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 21, 2023
@EronWright EronWright added this to the 0.95 milestone Oct 24, 2023
@rquitales
Copy link
Member

Hello @Aetf,

Thank you for bringing this issue to our attention. It seems that you are using the kubernetes.helm.v3.Chart resource in your scenario. It's important to note that the Chart resource does not support Helm lifecycle hooks. These hooks are essential for the juicefs Helm chart to manage resource replacement due to field immutability. The error you are encountering when trying to update to version v0.18.1 is a result of this, as the Chart resource converts Kubernetes resources into individual resources within the Pulumi program.

To address this issue, we recommend considering the use of the kubernetes.helm.v3.Release resource instead. This resource will enable you to upgrade from v0.13.5 to v0.18.1 without running into the immutability error. I have personally tested both resources and can confirm that using the Release resource helps mitigate this problem.

For more information about these two resources, you can refer to this discussion on GitHub: GH Issue response and this informative blog post that provides additional details about the Release resource: Blog Post.

If you have further questions or need additional assistance, please don't hesitate to reach out.

@rquitales rquitales added resolution/wont-fix This issue won't be fixed and removed needs-triage Needs attention from the triage team labels Oct 25, 2023
@rquitales rquitales self-assigned this Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/wont-fix This issue won't be fixed
Projects
None yet
Development

No branches or pull requests

3 participants