getporter / helm2-mixin

Helm mixin for Porter
https://porter.sh/mixins/helm
Apache License 2.0
13 stars 7 forks source link

Enhancement: add helm repo support #8

Closed vdice closed 4 years ago

vdice commented 5 years ago

I'm wondering if we can add helm repo support to this mixin.

Currently, to fetch non-default helm repos, I have an exec step in my porter.yaml under the install action:

  - exec:
      description: "Add Helm repos"
      command: bash
      arguments:
        - -c
        - "helm repo add brigade https://azure.github.io/brigade-charts"

It would be neat if this mixin added first-class support for helm repo add/upgrade.

I could see this being either via standalone stanza:

  - helm:
      description: "Add Helm repos"
      repos:
        brigade: https://azure.github.io/brigade-charts
        ...

or paired with the chart that requires it:

  - helm:
      description: "Helm install Brigade"
      name: brigade
      chart: brigade/brigade
      repo: 
        brigade: https://azure.github.io/brigade-charts
        ...

Thoughts?

carolynvs commented 5 years ago

I vote for option 1 since it's closest to what people know already from using helm. Less to learn.

vdice commented 5 years ago

This seems like a great candidate for a good first issue. To that end, after talking with @carolynvs , we've decided to pursue implementing for the first option above:

  - helm:
      description: "Add Helm repos"
      repos:
        brigade: https://azure.github.io/brigade-charts
        ...

Here are some pointers for the implementation:

At this time, I think we should be good with just adding/amending the install-related files, since once the repos have been added to the local helm repository listing, they will be available on the system for any further actions.

jdolitsky commented 5 years ago

Take a look at what Helmfile project is doing for this: https://github.com/roboll/helmfile

repositories:
  - name: roboll
    url: http://roboll.io/charts
    certFile: optional_client_cert
    keyFile: optional_client_key
    username: optional_username
    password: optional_password
jdolitsky commented 5 years ago

May want to either mimic what they do, or make it closer to something like

repos:
  brigade:
    url: https://azure.github.io/brigade-charts

for the case where we might need to pass in extra fields, such as repo basic auth credentials etc.

vdice commented 4 years ago

Closing to defer to an updated design in https://github.com/deislabs/porter-helm/issues/60