-
Notifications
You must be signed in to change notification settings - Fork 7k
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
distinguish unset and empty values for storageClassName #2600
Comments
While I agree that
You can imagine many more. What if you chose one of them and said that that's the value an release uses to choose the default provisioner? |
That's a very reasonable solution for my own charts, but it's fairly hacky to get adopted as the right way to do things for public charts. I'll try a PR for the prometheus chart using:
|
Yes, Bryan, I wasn't trying to knock your proposed enhancement. I was just trying to help you make progress in the meantime. |
Thanks for the request here @bryanlarsen. I'll tag it as a feature. If you wanted to submit something for this, please let us know! |
Ditching the alpha storage class annotation and using the 1.6 style specification instead brings the following benefits: - a standard way to specify the default provisioner - a mechanism to disble the dynamic provisioner Unfortunately, go template makes the second one hacky. See helm/helm#2600 for more details. So instead of using an empty string to disable the dynamic provisioner, this PR uses "-".
* prometheus: switch to Kubernetes 1.6 storage class specification Ditching the alpha storage class annotation and using the 1.6 style specification instead brings the following benefits: - a standard way to specify the default provisioner - a mechanism to disble the dynamic provisioner Unfortunately, go template makes the second one hacky. See helm/helm#2600 for more details. So instead of using an empty string to disable the dynamic provisioner, this PR uses "-". * Bump major version
A PR on Sprig would be the best way to do this. I'll be rolling a new Sprig release for the upcoming Helm update. |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
I think using the default storage class is a more sane default value for the `storageclass`. Also, since the empty string as storage class has a special meaning we use "-" to denote the absence of storageclass (resulting to selecting the default storageclass) [1] [1] helm/helm#2600
* prometheus: switch to Kubernetes 1.6 storage class specification Ditching the alpha storage class annotation and using the 1.6 style specification instead brings the following benefits: - a standard way to specify the default provisioner - a mechanism to disble the dynamic provisioner Unfortunately, go template makes the second one hacky. See helm/helm#2600 for more details. So instead of using an empty string to disable the dynamic provisioner, this PR uses "-". * Bump major version
In a Kubernetes 1.6 PVC, storageClassName has different behaviour when passed an empty string versus not specified. An empty string means disable dynamic provisioning, not specified means use the default provisioner.
Charts should enable this behaviour, but I can't figure out how to make it happen using the go template syntax. go template's if treats the empty string as falsy, and everything i try to use to distinguish an empty string either works the same on an undefined value (len), or crashes (eq nil).
Perhaps this is why Hugo added the 'isset' function. Something like this would likely work if we had isset:
Is there any way to do this? If not can we pull in Hugo's isset or some other way to do it?
The text was updated successfully, but these errors were encountered: