jenkins-x, kubernetes

Bitnami Helm Charts Index Issues

Bitnami Helm Charts Index Issues

Several months ago, we noticed that our Jenkins-X pipeline is failing at promotion stage due to Bitnami’s helm chart repo index being trimmed. There was a one-liner fix but because the full index is too large, we get intermittent failures and I decided to fix it once and for all.

This is how our helmfile.yaml originally looks like:

filepath: ""
environments:
  default:
    values:
    - jx-values.yaml
repositories:
- name: bitnami
  url: https://raw.githubusercontent.com/bitnami/charts/index/bitnami
releases:
- chart: bitnami/mongodb
  version: 11.1.10
  name: user-service-mongodb
  namespace: jx-staging
  values:
  - user-service-mongodb-values.yaml
  - jx-values.yaml

Because Bitnami is hosting so many helm charts and versions being added almost every day, the index grows significantly over time and the one-liner fix is not enough anymore. I decided to just host the index file using our own Github repo and just include the chart and version that we need, that is, the mongodb helm chart v11.1.10.

Upgrading mongodb helm chart is not an option as it is too much work and we will eventually have to migrate again since the index is still growing. Below is the example repo to show the changes we’ve made.

https://github.com/lysender/bitnami-old-mongodb-helm-charts

Since we are only interested with mongodb and its specific version, the resulting index.yaml file is small that it loads blazingly fast! Below is our updated helmfile.yaml.

filepath: ""
environments:
  default:
    values:
    - jx-values.yaml
repositories:
- name: lysender-mongodb
  url: https://raw.githubusercontent.com/lysender/bitnami-old-mongodb-helm-charts/master/mongodb
releases:
- chart: lysender-mongodb/mongodb
  version: 11.1.10
  name: user-service-mongodb
  namespace: jx-staging
  values:
  - user-service-mongodb-values.yaml
  - jx-values.yaml

We changed the repo alias from bitnami to something else like lysender-mongodb to avoid conflicts with other hemlfile.yaml since Jenkins-X also use bitnami for helm charts like external-dns.

Working with Kubernetes and Jenkins-X has given me a lot of opportunities to learn but they tend to move too fast and break things. Luckily we can afford when things break and we usually are able to recover quickly due to the experience that we had.

Featured image by Miguel Á. Padriñán.

Leave a reply

Your email address will not be published. Required fields are marked *