Reconsidering Helm Sub-charts
• Mark Eschbach
At this point I feel like I might have a better understanding of Helm and thus might be able to return to my original problem of figuring out how to work with subcharts. Based on the Helm docs to provide values to subcharts one uses the chart name as root. Time to give it a spin.
dependencies: - name: stable/postgresql alias: pg-monolith
helm fetch failed with
Error: need at least one argument, url or repo/name of the chart. Hidden at the bottom
helm repo. Typing this in resulted in a magical table which divulges the repository.
NAME URL stable https://kubernetes-charts.storage.googleapis.com
Or, ya know,
helm fetch is not deigned to work with
helm dependencies is the correct
helm dependencies build actually retrieves the dependencies. This correctly points out the correct
expression for the repository is:
dependencies: - name: stable/postgresql alias: pg-monolith repository: "@stable"
However this still leaves the complaint regarding a version:
Error: dependency "postgresql" has an invalid version/constraint format: improper constraint:.
Rather unfortunate they require a specific version. According to StackOverflow
we can use
helm search -l stable/<some_chart> to list the versions. This yielded
3.15.0. Once added like the
following it worked like a charm:
dependencies: - name: postgresql alias: pg-monolith repository: "@stable" version: 3.15.0
Alrighty then. A little
helm package && helm upgrade legacy legacy-0.1.0.tgz and it works. Next up is getting the
correct version of the database up and running. In theory this should be as easy as the following in the
pg-monolith: image: tag: 9.6
I made the assumption the image is
postsgres however it’s actually
bitnami/postgresql. The tags
are significantly different. I will have to figure out the migrations some other time.