Closed locomoco28 closed 2 years ago
@locomoco28 Hey. You should be able to use go-getter URL in the `chart field like https://github.com/roboll/helmfile/issues/2106
@mumoshu Thanks for your quick response. How would that look like e.g. for the kube-prometheus-stack
I have to install multiple YAML files
You'd need to repeat release
within helmfile.yaml for each remote YAML file.
So a little bit like this?
helmfile.yaml
I wish there was an option to specify an array of charts. Maybe something similar to this would be feasible to implement?
releases:
- name: prometheus-crds
namespace: monitoring
charts:
# Release names like <releases[i].name>-<releases[i].chart[j].name or filename>
# examples:
# Release name: prometheus-crds-alertmanagerconfigs
- name: alertmanagerconfigs
chart: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagerconfigs.yaml
# Release name: prometheus-crds-monitoring-coreos-com-alertmanagers-yaml
- chart: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.55.0/example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
# ...
version: v1.0.0
installed: true
Yeah it should work. If you really need to make it DRY, use go templates within the helmfile.yaml.
Ooh that's a good idea, I didn't think of using go templates for the helmfiles. Thank you :)
hmm entering urls to yaml files doesn't seem to work for me tho. It expects a gzipped archive :/
@locomoco28 JFYI, I had similar use case and ended up adopting the following way referring to this example:
releases:
- name: prometheus-operator-crds
chart: git::https://github.com/prometheus-operator/prometheus-operator.git@example/prometheus-operator-crd?ref=v0.55.0
Ah good catch, yep that might be the limitation due to helmfile uses thedirectory
mode of go-getter
. I hope it isn't a deal breaker but if it is, a feature request to add support for specifying a single remote yaml file to chart
by leveraging go-getter's file
mode would definitely be valid.
I've seen that you can specify remote URLs for Helm charts, but I couldn't find a way to download .yaml files directly which would be useful to install CRDs. Did I miss something in the documentation about it, or is there currently no way of doing this without creating a chart custom chart using Helm hooks to
wget
the files like in Gitlab's cluster management template?