-
Notifications
You must be signed in to change notification settings - Fork 609
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
chore(cli): improve flag help descriptions to show allowed values instead of type names #5067
base: main
Are you sure you want to change the base?
Conversation
…type names Signed-off-by: h3nryc0ding <hr.richterhenry@gmail.com>
Signed-off-by: h3nryc0ding <hr.richterhenry@gmail.com>
4acb77b
to
64739b4
Compare
Signed-off-by: h3nryc0ding <hr.richterhenry@gmail.com>
a655858
to
4404634
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.
I've found some places where I'm unsure if shortening the descriptions, as done elsewhere, is a good idea. I'd really appreciate any feedback on this.
"where kind must be one of: (%s)", | ||
strings.Join(supportedHelmChartSourceKinds, ", "), | ||
) | ||
return "source that contains the chart in the format '<kind>/<name>.<namespace>'" |
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.
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.
At present (not with this change), this looks like
--source helmChartSource source that contains the chart in the format '<kind>/<name>.<namespace>', where kind must be one of: (HelmRepository, GitRepository, Bucket)
I think the following may be better
--source <kind>/<name>.<namespace> source that contains the chart, source kind must be one of: (HelmRepository, GitRepository, Bucket)
I'm afraid that something like HelmRepository|GitRepository|Bucket/<name>.<namespace>
could become more confusing as it's a mix of all the allowed values and placeholders. It may be better to just provide the template and list the supported kind values in description.
We can even leave this out of this change as the values are not fixed. But I still think the new format is relatively better than an undefined helmChartSource
value.
"where kind must be one of: (%s), if kind is not specified it defaults to GitRepository", | ||
strings.Join(supportedKustomizationSourceKinds, ", "), | ||
) | ||
return "source that contains the Kubernetes manifests in the format '[<kind>/]<name>.<namespace>', if kind is not specified it defaults to GitRepository" |
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.
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.
Same reasoning as for chart source. Something like
--source [<kind>/]<name>.<namespace> source that contains the Kubernetes manifests, kind must be one of: (OCIRepository, GitRepository, Bucket), if kind is not specified it defaults to GitRepository
seems like an improvement to me.
"where kind must be one of: (%s)", | ||
strings.Join(supportedHelmChartSourceKinds, ", "), | ||
) | ||
return "source that contains the chart in the format '<kind>/<name>'" |
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.
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.
Same as for chart source mentioned above, just without namespace.
Closes #5066