What are Helm charts

Helm is a tool for managing Kubernetes charts. Helm charts are packages of pre-configured Kubernetes resources.

What are the community charts

Helm community charts are curated applications for Kubernetes. They are a set of charts that is maintained by the helm community and reviewed for integrity. Many common applications and Kubernetes components are available through the charts repo such as nginx-ingress, jenkins, sonarqube, and many more.

Where are the community charts

The community charts can be found at https://github.com/helm/charts. They recently moved from the Kubernetes organization. You can also browse all the community charts on https://hub.kubeapps.com.

How to contribute

Step 1: Find a problem

Find an open-sourced application without a chart or find a chart that needs some work. There are always lots of open issues: https://git.io/vpKLH.

Step 2: Solve the problem

Once you have identified the application you are creating a chart for, let’s create the basic plumbing for the chart. The following steps will give a basic chart for you to modify for the application :

  1. Fork the charts repo: https://github.com/helm/charts
  2. Clone your forked repo
  3. Install helm locally: https://docs.helm.sh/using_helm/#installing-helm
  4. From the charts/stable directory:
    1. helm create my-new-chart
  5. Modify the chart to deploy your application of choice. Most of the values can be left default. Common changes are as follows:
    1. In the my-new-chart/values.yaml
      1. image.repository
      2. image.tag
      3. Service.port
    2. In my-new-chart/Chart.yaml
      1. All fields should be updated to reflect the app being deployed
    3. In my-new-chart/templates/deployment
      1. spec.template.spec.containers.ports.containerPort
      2. spec.template.spec.containers.livenessProbe.httpGet.path
      3. spec.template.spec.containers.readinessProbe.httpGet.path
    4. Add a Readme.md
      1. This should explain how to install the chart and what overrides are available.
      2. Here is a good example of a chart Readme: https://git.io/fAnFh
    5. Test your chart (All commands from the charts directory)
      1. Lint the chart to ensure you have the basic formatting:
        1. helm lint stable/my-new-chart
      2. Do a dry run to see if the template compiles
        1. helm install –debug –dry-run stable/my-new-chart
      3. Finally, if you have a kubernetes cluster with helm initialized (I usually use minikube ):
        1. helm install stable/my-new-chart

Now that you have the basic chart running, you can add  secrets, persistent volume claims, etc. See “Tips and Tricks” (below) for helm templates on the various kubernetes components.

Step 3: Contribute to the Charts repo

  1. Ensure to sign your commits: https://www.helm.sh/blog/helm-dco/index.html
  2. Create the pull request
  3. Be responsive to comments and change requests. Pull requests are much quicker when comments and concerns are responded to quickly.
  4. In the pull request, pay close attention to the block below. The details links on the right will show you why something has failed. No pull request can be merged until all tests are passing.

Pull request

Step 4: Keep contributing

If you find a bug, try and fix it. If there isn’t a chart for your open sourced tool, create one. If you find yourself contributing frequently, reach out to one of the maintainer’s to see how you can help.

Tips and Tricks

Community Charts resources

There are a lot of great resources to look through when working on a chart:

Other resources:

  • Kubernetes.io –
    • At the end of the day, helm is just a templating engine on top of Kubernetes
  • Sprig: https://github.com/Masterminds/sprig
    • Helm uses go templates and sprig within the charts

Finally, if you get stuck, reach out on the #charts channel on http://slack.k8s.io/

Wrap up

The helm community charts are a great place to get familiar with helm. Find a feature that doesn’t exist or a chart that needs some work and contribute back. Be patient with the review process, it is all community driven and can take time. A tool is only as good as the community around it, and helm has a pretty great community.