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

feat(tool/charts): add repo cmd #455

Merged
merged 3 commits into from
Dec 30, 2020
Merged

feat(tool/charts): add repo cmd #455

merged 3 commits into from
Dec 30, 2020

Conversation

sh0rez
Copy link
Member

@sh0rez sh0rez commented Dec 30, 2020

Adds tk tool charts add-repo for adding a repository using the CLI

Fixes #417

Adds tk tool charts add-repo for adding a repository using the CLI
@sh0rez sh0rez added kind/feature Something new should be added component/tooling labels Dec 30, 2020
Copy link
Contributor

@malcolmholmes malcolmholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neither the add nor the addRepo cmds are idempotent. Can we make them so? i.e. check if the entry is already present, and only add it if it is? Same goes for adding a chart. (There's also an issue I've noted where if a chart add fails to vendor, it can still end up in the chart file then block you from re-adding it without editing the chartfile).

@sh0rez
Copy link
Member Author

sh0rez commented Dec 30, 2020

I'm pretty sure tk tool charts add is already idempotent:

tanka/pkg/helm/charts.go

Lines 161 to 164 in 26ffb4c

if c.Manifest.Requires.Has(*r) {
skip(s, fmt.Errorf("already exists"))
continue
}

Sure, we can make that for add-repo as well

@sh0rez sh0rez requested a review from malcolmholmes December 30, 2020 16:14
Copy link
Contributor

@malcolmholmes malcolmholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks useful to me!

@sh0rez sh0rez merged commit 411b929 into master Dec 30, 2020
@sh0rez sh0rez deleted the helm-repo-add branch December 30, 2020 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tooling kind/feature Something new should be added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tanka not add repo to chartfile
2 participants