owhelm is for when you're overwhelmed with Helm.
Helm is missing several critical features:
- calculated values
- post-renderers that are shipped together with the chart
Getting them into Helm itself is worthwhile, but it might not be easy - and that is understandable for a piece of Open Source Software (OSS) which has a huge user base. Large OSS projects have huge inertia and they also have serious responsibilities to maintain compatibility for a very diverse set of edge cases. Moreover, both of the above features can change the threat model and enlarge the vulnerability surface.
owhelm could try to implement these features as a plugin/layer/wrapper of Helm, making it opt-in, and with time and luck permitting - grow into a standard via proof of usefulness by adoption and battle testing to uncover edge cases.
- simplified value re-use - having variables is the cornerstone of all software engineering, yet Helm does not have that. Helm does allow some code re-use via Go template helpers, however this is limited - it is only usable in templates - and so it requires developers to use template helpers (i.e. functions) for nearly everything.
- e.g. a chart uses multiple images. For a typical deployment, one might want to override the registry (to go via local proxy). A chart could still accept a
.Values.specificComponent.image.registry, which falls back to.Values.image.registry(specific to the chart), which could further fall back to.Values.global.image.registry(share-able across all sub-charts). - e.g.
tolerationsandaffinitymay need to be both specified for aPod. They typically reference the same node selectors and could re-use a single value to reference them.
- e.g. a chart uses multiple images. For a typical deployment, one might want to override the registry (to go via local proxy). A chart could still accept a
- as a chart developer, reduce the need to call
tplfor every use.Valuesin a chart.- e.g. sharing a domain name across multiple contexts when the user of the chart needs to have it set as a label/annotation as well as a primary configuration value.
- passing the values downstream, to sub-charts.
- e.g. as a parent chart consumer, setting the domain name only once.
- for cross-cutting concerns in wrapper charts
- e.g. to be able to set
tolerationsandaffinity, the sub-chart needs to expose them as acceptable values and the consumer needs to make sure to set these values as many times as there are different Pods. A post-renderer could set them based on a single value instead without requiring a sub-chart to expose the primitives.
- e.g. to be able to set
- for keeping the logic encapsulated and the same as it moves across environments
- e.g. continuing with the
tolerations/affinityexample, if post-renderer is baked into the same tarball of the chart, then the logic can change with the application version, allowing the same logic to be re-used in all environments without deploying additional software.
- e.g. continuing with the
- admission hooks allow mutation of resources
- con: requires a cluster-wide deployment of something like Kyverno or an implementation of an HTTP server
- con: does not leverage (and plays against) the diffing functionality of tools like Argo CD
--post-renderer- con: Helm only passes through the final rendered resources as a stream/buffer (i.e. a string), but not the original values or context (e.g. command or release information)
- con: the tool itself needs to be pre-installed wherever
helmis running
Helmfile- con: no distribution mechanism; external to the chart itself
- Using a tool to generate the
values.yaml- con: no common standard, in-house domain specific software
- con: external to the chart, and therefore has a different release cycle, which is potentially incompatible with supporting multiple release lines of the same chart
- Using a custom operator and abstracting the API via a CRD
- con: significantly higher complexity over declarative approaches, requires thinking about asynchronous events and race conditions, requires serious software engineering chops
- A Helm plugin
- con: the necessary extension points to not yet exist in Helm
- A CLI which calls Helm as a CLI or as library
- con: installation/setup complexity?
- con: would likely need to download/unzip the charts twice (once for owhelm, once for helm)
- flow:
- inspect the tarball/chart for owhelm specific configuration (
owhelm/?owhelm.yaml?) - calculate the final values
- automatically inject a custom
owhelmspecific resource into the final output, it should include all the values so that we can read them during post-rendering and all the supportedowhelminstructions - call
helmwith the final values (either by passing them in as a temp file or as a explicit values in CLI) - use
owhelmas a--post-renderer - as part of post-rendering, process the chart output and first remove the
owhelmspecific custom resources, while performing the processing of instructions for other resources (incl.kustomizewhere appropriate)
- inspect the tarball/chart for owhelm specific configuration (