From 4ba1192bf3d383600c12a154e43a91f647a91493 Mon Sep 17 00:00:00 2001 From: Andrew Seigner Date: Tue, 23 Feb 2021 09:53:14 -0800 Subject: [PATCH] Introduce hidden flags to check subcommand (#1) 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 --- cmd/check.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/check.go b/cmd/check.go index d62c740..af4ae73 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -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 }