Conditional Toggle on Helm Charts

Great question from today:

I would like to know if it is possible to template the chart.name, for example, if we package multiple charts into kots CRDs, will it be possible to render the chart name in a way that we can decide using the kots-config which of the charts we want to deploy

After some conversation, I’d rephrase this to:

I’d like to deliver two helm charts with my application, and use a configuration toggle to deploy one or both of them. E.g. if enable_chart_1 is set, then deploy Chart 1, if enable_chart_2 is set, then Deploy Chart 2, etc etc

Another detail we got later as well that’s worth noting:

Further, my chart has a lot of values so I’m interested in figuring out if there’s a way to preserve that set of values without having to duplicate the injection of {{repl ConfigOption "..." }} into our HelmChart CRD kind