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

Remove CLI default values #1554

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/crictl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ CRICTL OPTIONS:
Flags: []cli.Flag{
&cli.StringFlag{
Name: "get",
Usage: "show the option value",
Usage: "Show the option value",
},
&cli.StringSliceFlag{
Name: "set",
Usage: "set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)",
Usage: "Set option (can specify multiple or separate values with commas: opt1=val1,opt2=val2)",
},
&cli.BoolFlag{
Name: "list",
Usage: "show all option value",
Usage: "Show all option value",
},
},
Action: func(c *cli.Context) error {
Expand Down
13 changes: 1 addition & 12 deletions cmd/crictl/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,14 @@ var createPullFlags = []cli.Flag{
},
&cli.StringFlag{
Name: "creds",
Value: "",
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
},
&cli.StringFlag{
Name: "auth",
Value: "",
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
},
&cli.StringFlag{
Name: "username",
Value: "",
Usage: "Use `USERNAME` for accessing the registry. The password will be requested on the command line",
},
&cli.DurationFlag{
Expand All @@ -139,17 +136,14 @@ var runPullFlags = []cli.Flag{
},
&cli.StringFlag{
Name: "creds",
Value: "",
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
},
&cli.StringFlag{
Name: "auth",
Value: "",
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
},
&cli.StringFlag{
Name: "username",
Value: "",
Usage: "Use `USERNAME` for accessing the registry. password will be requested",
},
&cli.StringFlag{
Expand Down Expand Up @@ -544,29 +538,24 @@ var listContainersCommand = &cli.Command{
},
&cli.StringFlag{
Name: "id",
Value: "",
Usage: "Filter by container id",
},
&cli.StringFlag{
Name: "name",
Value: "",
Usage: "filter by container name regular expression pattern",
Usage: "Filter by container name regular expression pattern",
},
&cli.StringFlag{
Name: "pod",
Aliases: []string{"p"},
Value: "",
Usage: "Filter by pod id",
},
&cli.StringFlag{
Name: "image",
Value: "",
Usage: "Filter by container image",
},
&cli.StringFlag{
Name: "state",
Aliases: []string{"s"},
Value: "",
Usage: "Filter by container state",
},
&cli.StringSliceFlag{
Expand Down
2 changes: 0 additions & 2 deletions cmd/crictl/container_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,11 @@ var statsCommand = &cli.Command{
},
&cli.StringFlag{
Name: "id",
Value: "",
Usage: "Filter by container id",
},
&cli.StringFlag{
Name: "pod",
Aliases: []string{"p"},
Value: "",
Usage: "Filter by pod id",
},
&cli.StringSliceFlag{
Expand Down
1 change: 0 additions & 1 deletion cmd/crictl/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ var runtimeExecCommand = &cli.Command{
},
&cli.Int64Flag{
Name: "timeout",
Value: 0,
Usage: "Timeout in seconds",
},
&cli.BoolFlag{
Expand Down
4 changes: 0 additions & 4 deletions cmd/crictl/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,25 +57,21 @@ var pullImageCommand = &cli.Command{
Flags: []cli.Flag{
&cli.StringFlag{
Name: "creds",
Value: "",
Usage: "Use `USERNAME[:PASSWORD]` for accessing the registry",
EnvVars: []string{"CRICTL_CREDS"},
},
&cli.StringFlag{
Name: "auth",
Value: "",
Usage: "Use `AUTH_STRING` for accessing the registry. AUTH_STRING is a base64 encoded 'USERNAME[:PASSWORD]'",
EnvVars: []string{"CRICTL_AUTH"},
},
&cli.StringFlag{
Name: "username",
Aliases: []string{"u"},
Value: "",
Usage: "Use `USERNAME` for accessing the registry. The password will be requested on the command line",
},
&cli.StringFlag{
Name: "pod-config",
Value: "",
Usage: "Use `pod-config.[json|yaml]` to override the pull c",
TakesFile: true,
},
Expand Down
1 change: 0 additions & 1 deletion cmd/crictl/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ var logsCommand = &cli.Command{
},
&cli.StringFlag{
Name: "since",
Value: "",
Usage: "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)",
},
&cli.BoolFlag{
Expand Down
1 change: 0 additions & 1 deletion cmd/crictl/pod_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ var podStatsCommand = &cli.Command{
Flags: []cli.Flag{
&cli.StringFlag{
Name: "id",
Value: "",
Usage: "Filter by pod id",
},
&cli.StringSliceFlag{
Expand Down
5 changes: 0 additions & 5 deletions cmd/crictl/sandbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ var runPodCommand = &cli.Command{
&cli.DurationFlag{
Name: "cancel-timeout",
Aliases: []string{"T"},
Value: 0,
Usage: "Seconds to wait for a run pod sandbox request to complete before cancelling the request",
},
},
Expand Down Expand Up @@ -250,23 +249,19 @@ var listPodCommand = &cli.Command{
Flags: []cli.Flag{
&cli.StringFlag{
Name: "id",
Value: "",
Usage: "filter by pod id",
},
&cli.StringFlag{
Name: "name",
Value: "",
Usage: "filter by pod name regular expression pattern",
},
&cli.StringFlag{
Name: "namespace",
Value: "",
Usage: "filter by pod namespace regular expression pattern",
},
&cli.StringFlag{
Name: "state",
Aliases: []string{"s"},
Value: "",
Usage: "filter by pod state",
},
&cli.StringSliceFlag{
Expand Down