fix: improve set and values flags help message (#724)

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-03-07 09:21:13 +09:00
committed by GitHub
parent 939ae409c3
commit c21958557c
8 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
}
f := cmd.Flags()
f.StringArrayVar(&applyOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&applyOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&applyOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&applyOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.IntVar(&applyOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
f.BoolVar(&applyOptions.Validate, "validate", false, "validate your manifests against the Kubernetes cluster you are currently pointing at. Note that this requires access to a Kubernetes cluster to obtain information necessary for validating, like the list of available API versions")
f.IntVar(&applyOptions.Context, "context", 0, "output NUM lines of context around changes")
+2 -2
View File
@@ -33,8 +33,8 @@ func NewChartsCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm exec")
f.StringArrayVar(&chartsOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&chartsOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&chartsOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&chartsOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.IntVar(&chartsOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
return cmd
+2 -2
View File
@@ -32,8 +32,8 @@ func NewDiffCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm diff")
f.StringArrayVar(&diffOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&diffOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&diffOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&diffOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.IntVar(&diffOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
f.BoolVar(&diffOptions.Validate, "validate", false, "validate your manifests against the Kubernetes cluster you are currently pointing at. Note that this requires access to a Kubernetes cluster to obtain information necessary for validating, like the diff of available API versions")
f.BoolVar(&diffOptions.SkipNeeds, "skip-needs", true, `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided. Defaults to true when --include-needs or --include-transitive-needs is not provided`)
+2 -2
View File
@@ -34,8 +34,8 @@ func NewLintCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f.IntVar(&lintOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
f.BoolVar(&lintOptions.SkipDeps, "skip-deps", false, `skip running "helm repo update" and "helm dependency build"`)
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm exec")
f.StringArrayVar(&lintOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&lintOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&lintOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&lintOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.BoolVar(&lintOptions.SkipNeeds, "skip-needs", true, `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided. Defaults to true when --include-needs or --include-transitive-needs is not provided`)
f.BoolVar(&lintOptions.IncludeNeeds, "include-needs", false, `automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided`)
f.BoolVar(&lintOptions.IncludeTransitiveNeeds, "include-transitive-needs", false, `like --include-needs, but also includes transitive needs (needs of needs). Does nothing when --selector/-l flag is not provided. Overrides exclusions of other selectors and conditions.`)
+2 -2
View File
@@ -32,8 +32,8 @@ func NewSyncCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm sync")
f.StringArrayVar(&syncOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&syncOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&syncOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&syncOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.IntVar(&syncOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
f.BoolVar(&syncOptions.Validate, "validate", false, "validate your manifests against the Kubernetes cluster you are currently pointing at. Note that this requires access to a Kubernetes cluster to obtain information necessary for validating, like the sync of available API versions")
f.BoolVar(&syncOptions.SkipNeeds, "skip-needs", true, `do not automatically include releases from the target release's "needs" when --selector/-l flag is provided. Does nothing when --selector/-l flag is not provided. Defaults to true when --include-needs or --include-transitive-needs is not provided`)
+2 -2
View File
@@ -32,8 +32,8 @@ func NewTemplateCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.StringVar(&globalCfg.GlobalOptions.Args, "args", "", "pass args to helm template")
f.StringArrayVar(&templateOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&templateOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&templateOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&templateOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.StringVar(&templateOptions.OutputDir, "output-dir", "", "output directory to pass to helm template (helm template --output-dir)")
f.StringVar(&templateOptions.OutputDirTemplate, "output-dir-template", "", "go text template for generating the output directory. Default: {{ .OutputDir }}/{{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}-{{ .Release.Name}}")
f.IntVar(&templateOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
+2 -2
View File
@@ -33,8 +33,8 @@ func NewWriteValuesCmd(globalCfg *config.GlobalImpl) *cobra.Command {
f := cmd.Flags()
f.IntVar(&writeValuesOptions.Concurrency, "concurrency", 0, "maximum number of concurrent helm processes to run, 0 is unlimited")
f.BoolVar(&writeValuesOptions.SkipDeps, "skip-deps", false, `skip running "helm repo update" and "helm dependency build"`)
f.StringArrayVar(&writeValuesOptions.Set, "set", nil, "additional values to be merged into the command")
f.StringArrayVar(&writeValuesOptions.Values, "values", nil, "additional value files to be merged into the command")
f.StringArrayVar(&writeValuesOptions.Set, "set", nil, "additional values to be merged into the helm command --set flag")
f.StringArrayVar(&writeValuesOptions.Values, "values", nil, "additional value files to be merged into the helm command --values flag")
f.StringVar(&writeValuesOptions.OutputFileTemplate, "output-file-template", "", "go text template for generating the output file. Default: {{ .State.BaseName }}-{{ .State.AbsPathSHA1 }}/{{ .Release.Name}}.yaml")
return cmd
+2 -2
View File
@@ -3,9 +3,9 @@ package config
// ChartsOptions is the options for the build command
type ChartsOptions struct {
// Set is the additional values to be merged into the command
// Set is the additional values to be merged into the helm command --set flag
Set []string
// Values is the additional value files to be merged into the command
// Values is the additional value files to be merged into the helm command --values flag
Values []string
// Concurrency is the maximum number of concurrent helm processes to run, 0 is unlimited
Concurrency int