Skip to content

Commit

Permalink
Introduce hidden flags to check subcommand (#1)
Browse files Browse the repository at this point in the history
Linkerd extensions must support a common set of subcommands and flags.

Introduce some additional check subcommand flags, but mark them hidden,
as they are unused by this extension.

Relates to linkerd/linkerd2#5692 and linkerd/linkerd2#5762

Signed-off-by: Andrew Seigner <[email protected]>
  • Loading branch information
siggy authored Feb 23, 2021
1 parent a12fa9b commit 4ba1192
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ failure and exit with a non-zero exit code.`,
// hidden and unused, to satisfy linkerd extension interface
var proxy bool
var namespace string
var impersonateGroup []string
cmd.Flags().BoolVar(&proxy, "proxy", false, "")
cmd.Flags().StringVarP(&namespace, "namespace", "n", "", "")
cmd.Flags().StringArrayVar(&impersonateGroup, "as-group", []string{}, "")
cmd.Flags().MarkHidden("proxy")
cmd.Flags().MarkHidden("namespace")
cmd.Flags().MarkHidden("as-group")

return cmd
}
Expand Down

0 comments on commit 4ba1192

Please sign in to comment.