Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helmfile should pass --args to "helm repo add" #1898

Closed
almed4 opened this issue Jun 29, 2021 · 4 comments · Fixed by #1899
Closed

Helmfile should pass --args to "helm repo add" #1898

almed4 opened this issue Jun 29, 2021 · 4 comments · Fixed by #1899

Comments

@almed4
Copy link
Contributor

almed4 commented Jun 29, 2021

Summary

When adding a repo, default args are not passed to the command helm repo add.

Expected Behavior

With helmfile.yaml configured with the following:

helmDefaults:
  args:
    - "--pass-credentials"

helm repo add should be called with --pass-credentials

Expected

exec: helm repo add repo https://raw.githubusercontent.com/owner/repo/ref/dir --force-update --username *** --password *** --pass-credentials

Actual Behavior

With helmfile.yaml configured with the following:

helmDefaults:
  args:
    - "--pass-credentials"

helm repo add is called without --pass-credentials

Actual

exec: helm repo add repo https://raw.githubusercontent.com/owner/repo/ref/dir --force-update --username *** --password ***

Feature Request/Bug

helmfile should pass default helm arguments to helm repo add or allow arguments to be included in a repositories object.

@mumoshu
Copy link
Collaborator

mumoshu commented Jun 30, 2021

@almed4 Hey! Helmfile doesn't have a map of which helm command supports which args so it currently passes it to a "primary" helm command that corresponds to the helmfile command you're running. For helmfile apply it is helm upgrade --install and for helmfile diff it's helm diff.

That said, adding passCredentials field to repositories entry would be better.

Would you mind submitting a PR for that?

@almed4
Copy link
Contributor Author

almed4 commented Jun 30, 2021

Yes, I would love to! Thanks so much for your quick response. Please bare with me since I am not familiar with Go, but I'm super excited to contribute. This is my first open-source contribution lol.

Will open PR with personal account @ameddin73

ameddin73 pushed a commit to ameddin73/helmfile that referenced this issue Jun 30, 2021
This adds the ability to include the --pass-credentials flag to the helm add repo command by:

- Adding repo.passCredentials to the helmfile yaml
- Changing state, helmexec, and app to include RepositorySpec.PassCredentials

Resolves roboll#1898
@ameddin73
Copy link
Contributor

@mumoshu please review

@mumoshu
Copy link
Collaborator

mumoshu commented Jul 1, 2021

Let me note that I learned this flag was added I learned pass-credentials has been added in helm 3.6.1 https://github.com/helm/helm/releases/tag/v3.6.1

mumoshu pushed a commit that referenced this issue Jul 1, 2021
This adds the ability to include the --pass-credentials flag to the helm add repo command by:

- Adding repo.passCredentials to the helmfile yaml
- Changing state, helmexec, and app to include RepositorySpec.PassCredentials

Resolves #1898

Co-authored-by: almed4 <alexandre.meddin@ingka.ikea.com>
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 a pull request may close this issue.

3 participants