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(helm): add create command to 'helm dependency' #2041
Conversation
This is really great, gave it a quick try. Couple of things I noticed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks pretty good. I agree with all of @prydonius' points above. I definitely think the behavior should be to update the version of a chart instead of adding an extra one before we merge. Let me know what you think about the other feedback as well.
cmd/helm/dependency_create.go
Outdated
} | ||
|
||
f := cmd.Flags() | ||
f.StringVarP(&dcc.version, "version", "v", "0.1.0", "set the version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be better to have this get the latest version (like what helm get
does)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, after some thought, I agree with you @thomastaylor312. Defaulting 'version' to a value that may not exist in the repository could result in unexpected behavior. I think latest does make sense here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think latest can be defined here by > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to suggest not using -v
for the short flag. Here are all the other cases where we define a --version
:
⇒ ag "version" | grep String
fetch.go:87: f.StringVar(&fch.version, "version", "", "specific version of a chart. Without this, the latest version is fetched")
inspect.go:135: inspectCommand.Flags().StringVar(&insp.version, verflag, "", verdesc)
inspect.go:136: valuesSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc)
inspect.go:137: chartSubCmd.Flags().StringVar(&insp.version, verflag, "", verdesc)
install.go:173: f.StringVar(&inst.version, "version", "", "specify the exact chart version to install. If this is not specified, the latest version is installed")
package.go:98: f.StringVar(&pkg.version, "version", "", "set the version on the chart to this semver version")
upgrade.go:114: f.StringVar(&upgrade.version, "version", "", "specify the exact chart version to use. If this is not specified, the latest version is used")
We chose not to use -v
as a short notation because so many other programs use -v
to mean verbose. If we collectively think using -v
for version is a good idea, we should change it in all the above places too.
I agree with the updating an existing dependency - i'll add that. With regards to the default version, I chose |
4d7f1fe
to
11622b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great @larryrensing. Just one comment inline
cmd/helm/dependency_create.go
Outdated
} | ||
|
||
f := cmd.Flags() | ||
f.StringVarP(&dcc.version, "version", "v", "0.1.0", "set the version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, after some thought, I agree with you @thomastaylor312. Defaulting 'version' to a value that may not exist in the repository could result in unexpected behavior. I think latest does make sense here.
Are we just waiting on the minor change to the |
When 'helm dependency create <DEP NAME> <REPO>' is run, it will create a new dependency in the requirements.yaml of the current chart path. If there is no requirements.yaml found, it will create the file and add the provided dependency to the file. Users can specify a version 'v' (default: 0.1.0) and a chart path -c (default: current directory) Closes: helm#1947
11622b6
to
1b10423
Compare
Any thoughts on changing this to |
I think |
|
@larryrensing Any update on this? |
We're down to the wire on the 2.3.0 release, so I am going to bump this to 2.4.0. |
Any word on this one? |
Can we get a quick rebase of this before 2.4.0? |
Bumped to 2.5.0. Should I close this out? Is anyone still working on it? |
@technosophos There hasn't been any motion on this for more than 30 days, so I am closing. @larryrensing if you come back to this, feel free to reopen |
helm-diff 3.3.1 adds a new option `HELM_DIFF_THREE_WAY_MERGE=true` which enables the use of there-way merge for diff, which is expected to fix helm#2013
When 'helm dependency create ' is run, it will create a new dependency in the requirements.yaml of the current chart path. If there is no requirements.yaml found, it will create the file and add the provided dependency to the file. Users can specify a version -v (default: 0.1.0) and a chart path -c (default: current directory)
Closes: #1947