-
Notifications
You must be signed in to change notification settings - Fork 26
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
Check storage class #98
base: main
Are you sure you want to change the base?
Conversation
(i.e. errors if `ReadWriteMany` is asked for, but using a known bad class like `gp2`)
It's hard for me to give a credible line-by-line review of the YAML changes, but I'll make the following comments:
As an aside: this is a really painful example of Helm's limitations. It's not really a programming language, so when you want do stuff like this it ends up being really opaque. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whew! I can tell I've been away from Helm templates for a while. This looks good to me, although I really have very little knowledge in this arena.
As a follow up: I looked through the (deprecated, but still useful) This makes me think there isn't an obvious, accepted solution in the Helm community for this problem, so that's even more of an argument for this hack. |
Thanks for the awesome feedback, y'all! @atheriel do you know off-hand what the exact / default Also TOTALLY agree about helm's limitations 😢 It wants to be a programming language. I feel like I always just want a EDIT: also - nice find on the helm chart examples!! We have such a warning and have noticed that nobody reads it 🤣 |
From the linked docs in my comment it appears the |
Could this check be done with a |
Close #90
The motivation: if a user deploys our chart directly onto an EKS cluster setting
homeStorage.create=true
, they will get a not functioning server, a hard to debug situation (have to see that PVC provisioning failed and why), and a hard to fix situation (have to basically delete everything and start over once you have a storage class that supports ReadWriteMany or have setaccessModes
properly - both of which are immutable b/c PVCs cannot be changed once created).It would be much nicer to give the user an error at install time when they go to use this storage class.
Unfortunately, Kubernetes does not "store" whether a given storage class supports a given access mode. This is documented here, but not able to be "looked up" in the Kbuernetes API
As a result, I do a name lookup for ones that we know cause trouble (i.e.
gp2
), as well as provisioners that we know cause trouble (i.e.kubernetes.io/aws-ebs
).It's possible that these storage classes change over time, and with different renamings / etc., it is impossible that we catch everything. However, I have seen enough users get tripped up by this to think that it would do us well to catch as many as we can.
Thoughts?
Examples:
EDIT: Plan is to refactor into the
rstudio-library
chart, although only rolling out for rstudio-workbench for now, so that we can test a bit before integrating with Connect and RSPM.