Skip to content

Conversation

@mumoshu
Copy link
Collaborator

@mumoshu mumoshu commented Jul 22, 2020

This, in combination with #1172, allows you to use go-getter-supported URL for K8s manifests on chart, so that Helmfile automatically fetches it and then turn it into a temporary local chart, which is then installed by Helmfile as similar as standard Helm charts.

An example usecase of this is to install cert-manager CRDs which is distributed separately from the chart:

releases:
- name: cert-manager-crds
  chart: git::http://github.com/jetstack/cert-manager.git@deploy/crds?ref=v0.15.2

I'm adding this based on discussion with @lukasmrtvy. He was trying to install cert-manager and prometheus-opreator with Helmfile. This combined with #1373 should do the job. Thanks for the input!

…as chart

This, in combination with #1172, allows you to use `go-getter`-supported URL for K8s manifests on `chart`, so that Helmfile automatically fetches it and then turning it into a temporary local chart, which is then installed by Helmfile as similar as standard Helm charts.

An example usecase of this is to install cert-manager CRDs which is distributed separately from the chart:

```
releases:
- name: cert-manager-crds
  chart: git::http://github.com/jetstack/cert-manager.git@deploy/crds?ref=v0.15.2
```

I'm adding this based on discussion with @lukasmrtvy. He was trying to install cert-manager and prometheus-opreator with Helmfile, and this combined with #1373 should do the job. Thanks for the input!
@mumoshu mumoshu merged commit b5830a3 into master Jul 22, 2020
@mumoshu mumoshu deleted the go-getter-remote-dir-as-chart branch July 22, 2020 15:30
@osterman
Copy link
Contributor

@mumoshu you're on a roll! this is awesome and fixes a big painpoint for us.

@lukasmrtvy
Copy link

@mumoshu

It will probably not work for cert-manager:
https://github.com/jetstack/cert-manager/blob/master/deploy/crds/crd-challenges.yaml#L6, due to internal templating..

Here is my workaround:

  hooks:
  - events: ["presync"]
    command: "/bin/sh"
    showlogs: true
    args: ["-c", "kubectl get --request-timeout='5m' -f https://github.com/jetstack/cert-manager/releases/download/{{`{{ .Release.Version }}`}}/cert-manager.crds.yaml || kubectl apply --request-timeout='5m' --validate=false -f https://github.com/jetstack/cert-manager/releases/download/{{`{{ .Release.Version }}`}}/cert-manager.crds.yaml"] 
  - events: ["postuninstall"]
    command: "/bin/sh"
    showlogs: true
    args: ["-c","kubectl delete --request-timeout='5m' --ignore-not-found -f https://github.com/jetstack/cert-manager/releases/download/{{`{{ .Release.Version }}`}}/cert-manager.crds.yaml"]

cavetas: https://cert-manager.io/docs/installation/upgrading/upgrading-0.15-0.16/#issue-with-older-versions-of-kubectl

Isnt it possible to use something like:

releases:
- name: cert-manager-crds
  chart: file::https://github.com/jetstack/cert-manager/releases/download/v0.16.1/cert-manager.crds.yaml
  forceGoGetter: true

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants