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 chart should not upgrade Storage classes and snapshot classes #11398

Open
travisn opened this issue Dec 7, 2022 · 15 comments
Open

Helm chart should not upgrade Storage classes and snapshot classes #11398

travisn opened this issue Dec 7, 2022 · 15 comments
Assignees

Comments

@travisn
Copy link
Member

travisn commented Dec 7, 2022

Is this a bug report or feature request?

  • Bug Report

Deviation from expected behavior:
The cluster helm chart attempts to upgrade storage classes when their properties change, which causes a failure such as:

StorageClass.storage.k8s.io "ceph-filesystem" is invalid: parameters: 
Forbidden: updates to parameters are forbidden.

Expected behavior:
Storage classes and snapshot classes are immutable. If their properties change, they should not be updated with the helm chart upgrade.

We should be able to accomplish this with the lookup function. If the lookup of the storage class says it doesn't exist, then we create it. Otherwise, we skip the update. Here is an example of using the lookup to see if a resource exists.

How to reproduce it (minimal and precise):

  1. Install the cluster helm chart with a storage class
  2. Change a helm property that causes and update in the storage class
  3. Upgrade the helm chart
  4. See the helm chart failure since the storage class is immutable
@travisn travisn added the bug label Dec 7, 2022
@travisn travisn added the helm label Dec 7, 2022
@travisn travisn added this to To do in v1.11 via automation Dec 7, 2022
@travisn travisn added this to To do in v1.10 via automation Dec 7, 2022
@travisn travisn removed this from To do in v1.11 Dec 7, 2022
@BlaineEXE
Copy link
Member

Counterpoint: it seems to me that it's little beyond the appropriate scope of the Rook Helm charts to create storageclasses at all.

@parth-gr
Copy link
Member

parth-gr commented Dec 7, 2022

I can take it up if it's not urgent,
Would be a great start to get my hands dirty with Helm

@travisn
Copy link
Member Author

travisn commented Dec 7, 2022

Counterpoint: it seems to me that it's little beyond the appropriate scope of the Rook Helm charts to create storageclasses at all.

Just from the perspective that storage classes are immutable? Otherwise, it seems very nice to parameterize the storage classes with the few fields that anyone ever needs to change such as the namespace.

@parth-gr
Copy link
Member

parth-gr commented Jan 9, 2023

@travisn
The doc says Keep in mind that Helm is not supposed to contact the Kubernetes API Server during a helm template or a helm install|upgrade|delete|rollback --dry-run, so the lookup function will return an empty list (i.e. dict) in such a case.

We should not use it while upgrading but this sc setting would need to be checked while helm upgrade.right?

@parth-gr
Copy link
Member

@parth-gr
Copy link
Member

Alternatives that can be used,

--reuse-values                               when upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored

While doing helm upgrade,

Or maybe using post-upgrae Hooks https://helm.sh/docs/topics/charts_hooks/#the-available-hooks

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@travisn travisn removed the wontfix label Mar 15, 2023
@travisn travisn removed this from To do in v1.10 Apr 4, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions
Copy link

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 22, 2023
@parth-gr parth-gr reopened this Sep 25, 2023
@github-actions github-actions bot removed the wontfix label Sep 26, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added wontfix and removed wontfix labels Nov 27, 2023
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

Copy link

github-actions bot commented Feb 7, 2024

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
@parth-gr
Copy link
Member

Still good to investigate

@parth-gr parth-gr reopened this Mar 28, 2024
@github-actions github-actions bot removed the wontfix label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants