Skip to content

Commit

Permalink
flag renaming/housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed Jul 16, 2019
1 parent db84b23 commit 3212a65
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions pkg/kapp/cmd/app/deploy_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func (s *DeployFlags) Set(cmd *cobra.Command) {
cmd.Flags().StringVar(&s.IntoNamespace, "into-ns", "", "Place resources into namespace")
cmd.Flags().StringSliceVar(&s.MapNamespaces, "map-ns", nil, "Map resources from one namespace into another (could be specified multiple times)")

cmd.Flags().BoolVarP(&s.Patch, "patch", "p", false, "Add or update provided resource")
cmd.Flags().BoolVar(&s.AllowEmpty, "allow-empty", false, "Allow to apply empty set of resources (which results in deletion of all cluster resources)")
cmd.Flags().BoolVarP(&s.Patch, "patch", "p", false, "Add or update provided resources")
cmd.Flags().BoolVar(&s.AllowEmpty, "dangerous-allow-empty-list-of-resources", false, "Allow to apply empty set of resources (same as running kapp delete)")

cmd.Flags().BoolVar(&s.OverrideOwnershipOfExistingResources, "dangerous-override-ownership-of-existing-resources",
false, "Override ownership of existing resources. This option is useful to 'steal' existing resources from another app")
false, "Steal existing resources from another app")
}
2 changes: 1 addition & 1 deletion pkg/kapp/cmd/app/label_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type LabelFlags struct {
}

func (s *LabelFlags) Set(cmd *cobra.Command) {
cmd.Flags().StringSliceVar(&s.Labels, "labels", nil, "Set app label (format: key=val, key=) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.Labels, "labels", nil, "Set app label (format: key=val, key=) (can repeat)")
}

func (s *LabelFlags) AsMap() (map[string]string, error) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/kapp/cmd/tools/diff_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ func (s *DiffFlags) SetWithPrefix(prefix string, cmd *cobra.Command) {
cmd.Flags().BoolVarP(&s.Changes, prefix+"changes", "c", false, "Show changes")

cmd.Flags().IntVar(&s.Context, prefix+"context", 2, "Show number of lines around changed lines")
cmd.Flags().BoolVar(&s.AgainstLastApplied, prefix+"against-last-applied", true, "Show changes against last applied copy when possible (if set to false, always use live copy from the server)")
cmd.Flags().BoolVar(&s.AgainstLastApplied, prefix+"against-last-applied", true, "Show changes against last applied copy when possible")
}
4 changes: 2 additions & 2 deletions pkg/kapp/cmd/tools/file_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type FileFlags struct {
}

func (s *FileFlags) Set(cmd *cobra.Command) {
cmd.Flags().StringSliceVarP(&s.Files, "file", "f", nil, "Set file (format: /tmp/foo, https://..., -) (can be specified multiple times)")
cmd.Flags().StringSliceVarP(&s.Files, "file", "f", nil, "Set file (format: /tmp/foo, https://..., -) (can repeat)")
cmd.Flags().BoolVarP(&s.Recursive, "recursive", "R", true, "Process directory used in -f recursively (deprecated; set to true by default)")
cmd.Flags().BoolVar(&s.Sort, "sort", true, "Sort by namespace, name, etc.")
}
Expand All @@ -22,6 +22,6 @@ type FileFlags2 struct {
}

func (s *FileFlags2) Set(cmd *cobra.Command) {
cmd.Flags().StringSliceVar(&s.Files, "file2", nil, "Set second file (format: /tmp/foo, https://..., -) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.Files, "file2", nil, "Set second file (format: /tmp/foo, https://..., -) (can repeat)")
cmd.Flags().BoolVar(&s.Recursive, "file2-recursive", true, "Process directory used in --file2 recursively (deprecated; set to true by default)")
}
10 changes: 5 additions & 5 deletions pkg/kapp/cmd/tools/resource_filter_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ type ResourceFilterFlags struct {
func (s *ResourceFilterFlags) Set(cmd *cobra.Command) {
cmd.Flags().StringVar(&s.age, "filter-age", "", "Set age filter (example: 5m)")

cmd.Flags().StringSliceVar(&s.rf.Kinds, "filter-kind", nil, "Set kinds filter (example: CustomResourceDefinition) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.rf.Namespaces, "filter-ns", nil, "Set namespace filter (example: knative-serving) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.rf.Names, "filter-name", nil, "Set name filter (example: controller) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.rf.KindNamespaces, "filter-kind-ns", nil, "Set kind-namespace filter (example: CustomResourceDefinition/, CustomResourceDefinition/knative-serving) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.rf.KindNsNames, "filter-kind-ns-name", nil, "Set kind-namespace-name filter (example: Deployment/knative-serving/controller) (can be specified multiple times)")
cmd.Flags().StringSliceVar(&s.rf.Kinds, "filter-kind", nil, "Set kinds filter (example: Pod) (can repeat)")
cmd.Flags().StringSliceVar(&s.rf.Namespaces, "filter-ns", nil, "Set namespace filter (example: knative-serving) (can repeat)")
cmd.Flags().StringSliceVar(&s.rf.Names, "filter-name", nil, "Set name filter (example: controller) (can repeat)")
cmd.Flags().StringSliceVar(&s.rf.KindNamespaces, "filter-kind-ns", nil, "Set kind-namespace filter (example: Pod/, Pod/knative-serving) (can repeat)")
cmd.Flags().StringSliceVar(&s.rf.KindNsNames, "filter-kind-ns-name", nil, "Set kind-namespace-name filter (example: Deployment/knative-serving/controller) (can repeat)")

cmd.Flags().StringVar(&s.bf, "filter", "", `Set filter (example: {"and":[{"not":{"match":{kind":"foo%"}}},{"kind":"!foo"}]})`)
}
Expand Down

0 comments on commit 3212a65

Please sign in to comment.