-
Notifications
You must be signed in to change notification settings - Fork 524
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
Document charts best practices (from initiative in helm/charts) #1258
Comments
@scottrigby Thanks for pulling this issue together |
The comments on this file are interesting. If we're using these charts for testing those areas (PVC usage, StatefulSet, Operator & CustomResource), does it mean they're are good examples of each area? https://github.com/kubernetes/charts/blob/master/test/helm-test/whitelist.yaml charts:
- stable/postgresql #PVC usage
- stable/cockroachdb #StatefulSet
- stable/etcd-operator #Operator & CustomResource
- stable/prometheus
- stable/jenkins
- incubator/zookeeper |
Another note before I forget: I'd say stable/jenkins and stable/drupal have good examples of Ingress. But I think the helm create chartutil command does a better job at that. Any thoughts on this one? |
@scottrigby I see what you're saying on ingress. Did you want to write up a PR for the best practice based on chartutil? If not, I can find the time. |
Hope to get to this next week! |
Quick note to anyone who may not have seen it: there's a discussion thread on Slack for some questions about how we might approach this: https://kubernetes.slack.com/archives/C6E3XH1ED/p1513324858000143 I can summarize here if that's helpful, but maybe good to chat there then summarize once we've clarified some of the questions? Or we can chat here. I'm happy to help keep both in sync as we hammer it out. |
@mattfarina ^ I've been slightly busy but can do this w @prydonius or sketch up on my own either way - I'd just like some feedback about the above thread for higher level questions, about where the files should live in general etc. |
I updated the initial experience created with |
@scottrigby PTAL |
I'd also like to get some input on more low-level components that should or should not be part of a Chart:
I'd love to see these added to the guidelines (CONTRIBUTING.md), unless this is already stated somewhere and I'm lookin in the wrong location? |
Also, it might be good to explain versioning a bit. I'm looking at helm/charts#4453 and I'm not sure if the version of the Chart should start with 1.0.0, as I notice most Charts even in stable are versioned like 0.x.y. Or again, is this explained somewhere and I just cannot find it? |
While on the subject, there seems to be some different ideas on when to update the patch level and when to update the minor version. I personally think that patch level should be used for pure fixes, where stuff that wasn't working properly before (or documented incorrectly or something) is fixed, but any new feature, however small, would bump the minor version. Which kind of means that any additional variable should almost automatically increase the minor version of a Chart. But I'm the new guy here, so please let me know if I'm wrong. |
Thanks for bringing all these points up @timstoop, we definitely need to add guidelines about all of these things in the REVIEW_GUIDELINES doc. Here are my 2 cents:
|
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
poke, to remove stale |
This should also be referenced: helm/charts#5167 Thanks @olemarkus for reminding me about that one |
The guidelines should recommend stricter adherence to semver. For example recommend that all charts in the stable repo is +1.0.0. |
Note there may be a need to clarify RBAC best practices. See helm/charts#6407 (review) and helm/charts#6407 (comment). Will need to ask @viglesiasce about thoughts on how to clarify. |
And updating charts with auto-generated passwords as discussed in Helm call and on this issue: helm/charts#5167 |
Question maybe for our next chat… what about best practices for HPAs? It seems only |
@paulczar ^ I updated the description to add helm/charts#7562 |
Re Affinity / anti-affinity, there's a note added in helm/charts#3334, does someone want to add an example (perhaps draw from |
I added |
Should PodDisruptionBudget be added too? https://kubernetes.io/docs/tasks/run-application/configure-pdb/ . |
@davidkarlsen Good question - there's a short note about PDB in the REVIEW_GUIDELINES, with a link to the docs (from helm/charts#3334):
I'd personally love to see a canonical boilerplate example values file and template entry for all of these either within the review guidelines or linked from there to some canonical example somewhere else (some of the resources have them already, while others don't). I'd also like to see very important notes (for example your note, where certain configs are incompatible) as comments in the example values file snippet. Thoughts? |
Ah - I missed the fact that it was already mentioned. But yes - a complete example-chart would be very nice and the easiest to point to. |
Per office hours Today, we need to address changing labels. Noting here because we will also want to ensure the best practices around this are documented.
|
Here is the issue: helm/charts#7680 . |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions. |
Regarding pod annotations made by @timstoop and @prydonius : https://github.com/helm/charts/issues/3011#issuecomment-376329659, https://github.com/helm/charts/issues/3011#issuecomment-376589576, https://github.com/helm/charts/issues/3011#issuecomment-376627583 The Istio project serves as good example of why we need charts to support pod based annotation. Injection of Istio's Envoy sidecar can be controlled with an annotation. Hence, with pod based based annotation it is possible to use the standard Helm charts and at the same time control sidecar injection (in an Istio enabled namespace). The elasticsearch Helm chart has solved this nicely with the podAnnotations values. Most charts lack such configuration. |
I think this can be updated regarding at least Label immutability (done). |
Hi, This would help for https://github.com/helm/helm/blob/cb99abc963c180f941d30578259a89ddddf39bd9/pkg/chartutil/create.go#L79-L114 TIA |
Adding another topic:
|
@cpanato, see for a discussion on TL;DR |
Hi, Simply curious if it would be considered to drop the note: The motivation mostly makes sense to me. But there seems to be almost no adoption of this practice and it's been there for ~2 years? Would like to hear any thoughts. Happy to PR any changes but I don't feel too strongly on this. Edit: Is this valid? - Should this be documented? |
It is mentioned when opening a new PR that you should read: But that link doesn't exist anymore. Maybe someone should change it to: |
@scottrigby is this something you're still working on? if not, please close :) |
Most of this has made its way into the Helm docs by this point. Closing 😄 If anyone notices something missing, please open a PR in helm/helm-www. Thanks for all the love! ❤️ |
Current status
The goal of me moving this issue is to be able to archive the helm/charts repo and make sure that the work started/pinned here makes its way into helm.sh/docs.
Some of this has already made it's way into the docs, but there are other valuable things collaborated on here which have not yet. It's been in the back of my mind for a while but I just haven't spent the time to move it to the docs. It may need another round of review by Charts team maintainers and others once we do, because k8s has moved a lot since then!
Original issue
Plan
From the past few Charts dev meetings, we all planned to collaborate on clarifying Charts best practices. There have been no PRs to do that thus far (as we approached and are now recovering from KubeCon), so in Today's meeting I volunteered to sketch up an issue to provide some structure to help us do this asynchronously.
The plan is to start with the lowest hanging fruit first, and iterate from there:
REVIEW_GUIDELINES.md
about each item in the running listDomains/Topics
The idea is to break out best practices by domain/topic (or some way of thinking about grouping k8s primitives and concepts as they map to helm/charts implementation). Here's a working list, with names of volunteers so far to work on them:
StorageClassName
for PV/PVC in charts charts#1869, Add review guidelines around pvcs charts#4223)create
vsenable
keys, etc.include
andtemplate
(See https://github.com/helm/charts/issues/3011#issuecomment-457637650, https://github.com/helm/charts/issues/3011#issuecomment-457640417, "helm create" command and best practices regarding "template" and "include" helm#4092 and Migrate 'template' to 'include' in 'helm create' helm#4093)Related issues
The text was updated successfully, but these errors were encountered: