Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Create Best Practices doc #44

Closed
Closed

Description

@viglesiasce

We need a place where we can establish and document best practices for chart creation. This should then be reference from the README in order to point users to this repositories conventions.

Activity

  1. viglesiasce commented on Aug 25, 2016

    @viglesiasce
    ContributorAuthor

    Things that need to be discussed:

    • Upgrading
    • Configuration files
    • Command line flags
  2. prydonius commented on Aug 25, 2016

    @prydonius
    Member

    Thanks for capturing this @viglesiasce. @sameersbn put together a great set of kubernetes manifest and helm chart authoring guides (https://github.com/bitnami/charts/tree/master/_docs) that could provide a base for something.

  3. chrislovecnm commented on Sep 6, 2016

    @chrislovecnm
    Contributor

    The one thing that has been bugging me is docker standards. @viglesiasce we probably need to get together with a couple of people to discuss, or we can hijack a sig apps.

  4. chrislovecnm commented on Sep 9, 2016

    @chrislovecnm
    Contributor

    I know I am beating this dead horse just a bit, but we need to go through the existing charts and get http://kubernetes.io/docs/user-guide/compute-resources/ laid out. Probably should update any standards docs / guidelines that we have.

  5. chrislovecnm commented on Oct 26, 2016

    @chrislovecnm
    Contributor

    @michelleN should we set 15 min in the helm sig or sig-apps to knock this out? I am knee deep in writing the HA upgrade guide, so I am not sure how we can knock this out.

  6. viglesiasce commented on Oct 26, 2016

    @viglesiasce
    ContributorAuthor

    @chrislovecnm have a look at the technical requirements that I bolstered today. I think it will be best to just build out that section in the docs:
    https://github.com/kubernetes/charts/blob/master/CONTRIBUTING.md#technical-requirements

  7. chrislovecnm commented on Oct 26, 2016

    @chrislovecnm
    Contributor

    Nice! Added a bunch of notes to the doc.

  8. chrislovecnm commented on Oct 26, 2016

    @chrislovecnm
    Contributor

    We need a linter to check for that stuff btw

  9. chrislovecnm commented on Oct 26, 2016

    @chrislovecnm
    Contributor

    For ease of reading

    • camel case vs uppercase for vars
    • Helper templates and other toyaml kungfu
    • Use docker's from main product? Redis maintains there own docker
    • Where do we put Dockerfiles in the repo?
    • Break up docker name and version number
    • Sections for the Readme - template?
    • How are we going to name charts that have multiple variants
      For example Redis without ha, redis with slaves, redis clustered
      Do we have one massive nasty chart or three charts?

    Also upgrades are not supported by Petsets... Just a note to the section

  10. gtaylor commented on Oct 26, 2016

    @gtaylor
    Collaborator

    My pet list of things to consistify, after reading through a good number of these charts:

    • values.yaml flat vs nested/grouped
    • yaml list indention or flat
    • standard ways to define resource limits (I like what we're seeing with the toYaml method, subjectively)
    • comment style (two hashes vs 1)
    • documenting things in values.yaml and/or README.md. afraid to duplicate right now.
    • outlined expectations on when ConfigMaps are expected.
    • guidance on standard PVC usage patterns
    • since AWS ELBs can't forward UDP, we should have a standard pattern for Services and a blurb for NOTES.txt (NodePort?)
  11. mgoodness commented on Nov 3, 2016

    @mgoodness
    Contributor

    My best practice recs:

    • static container names
      • if one container, use {{ template name . }}
      • if multiple, use {{ template name . }}-{{ .Values.container1.name }}, {{ template name . }}-{{ .Values.container2.name }}, etc.
    • app labels on resources should also use {{ template name . }} instead of current {{ template fullname . }} pattern
    • charts that consist of multiple "components" should assign static component labels to the respective resources
      • component services should also have component as a selector

    I explained my reasoning for the first two items in #168 (specifically here, here, and here).

    The last item is a pattern I use at work, explained here.

  12. sputnick commented on Nov 16, 2016

    @sputnick
    Contributor

    I would like to add a best practice item request... I would love to see the recommendation and practice of using a global property

    persistence:
      enabled: true/false
    

    in all official stable charts that completely disables PVs/PVCs in the main Chart and Dependent charts.

    Why?
    On k8s clusters with no PVs you have to go figure out what non standard parameters disable the PVC for each snowflake chart values and then also for the its dependencies. This is true e.g. for existing charts like WordPress in K8s Stable (you need to turn off PVs for MariaDB specifically).

    In my view, this is a UX problem for newbies using the official Stable charts because on a cluster like "kube-solo" or "minikube", that many start on, there are no PVs and in those cases there will never be a mixed situation where part of the chart should have PVs. If this became a standard (you should also be able to individually turn chart PVCs off or on) it will undoubtedly mean less grief for users and chart maintainers...

    Also, if this became a best practice standard then perhaps this could be added as a Helm install option (further improving UX).

  13. gtaylor commented on Nov 16, 2016

    @gtaylor
    Collaborator

    I would like to add a best practice item request... I would love to see the recommendation and practice of using a global property

    I'm -1 on this, as outlined in the matching discussion on the gitlab-ce PR:

    #202 (comment)

    tl;dr: Some charts like factorio, gitlab, and even Cassandra store various bits of data in different places. There are cases when some of your users might want persistence for one, but not the other. For example, we'd be actively wasting money/quota/resources for many of our factorio users, since the default install doesn't come with any mods to persist.

    I think our policy of sane defaults covers the split, in that users with special needs will read the chart README/values and adjust as needed.

    On k8s clusters with no PVs you have to go figure out what non standard parameters disable the PVC for each snowflake chart values and then also for the its dependencies

    What percentage of our userbase do we think will be put in a situation like this? Is it enough to warrant the loss of flexibility?

    Part of this is requiring 1.4+, which it looks like we may be leaning towards (based on @prydonius last comment and the thumbs ups): helm/helm#1528

  14. sputnick commented on Nov 16, 2016

    @sputnick
    Contributor

    @gtaylor did you read my answer on #202? The use case is clusters with no persistent storage which right now are pretty much all out of the box do-it-yourself dev cluster like minikube, kube-solo, kube-cluster and I'm suggesting having both flags per dependency and a global, not either or. So more flexible.

  15. 36 remaining items

  16. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Feb 7, 2018
  17. kfox1111 commented on Feb 7, 2018

    @kfox1111
    Collaborator

    /remove-lifecycle rotten
    /remove-lifecycle stale

  18. removed
    lifecycle/rotten
    on Feb 7, 2018
  19. fejta-bot commented on May 9, 2018

    @fejta-bot

    Issues go stale after 90d of inactivity.
    Mark the issue as fresh with /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle stale

  20. added
    lifecycle/stale
    on May 9, 2018
  21. fejta-bot commented on Jun 8, 2018

    @fejta-bot

    Stale issues rot after 30d of inactivity.
    Mark the issue as fresh with /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.

    If this issue is safe to close now please do so with /close.

    Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
    /lifecycle rotten
    /remove-lifecycle stale

  22. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Jun 8, 2018
  23. Starefossen commented on Jun 10, 2018

    @Starefossen
    Contributor

    /remove-lifecycle rotten

  24. removed
    lifecycle/rotten
    on Jun 10, 2018
  25. stale commented on Aug 19, 2018

    @stale

    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.

  26. added
    lifecycle/stale
    on Aug 19, 2018
  27. stale commented on Sep 2, 2018

    @stale

    This issue is being automatically closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions