From 6fadc99b69636b470fb7aae58316235214042de5 Mon Sep 17 00:00:00 2001 From: "Jayaraman N.R" Date: Sat, 28 Oct 2023 22:26:45 +0530 Subject: [PATCH] feat(cli): example for generate-allow-list (#16136) Signed-off-by: Jayaraman N R Signed-off-by: Jayaraman N.R Co-authored-by: Jayaraman N R Signed-off-by: jmilic1 <70441727+jmilic1@users.noreply.github.com> --- cmd/argocd/commands/admin/project_allowlist.go | 2 ++ .../commands/argocd_admin_proj_generate-allow-list.md | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/cmd/argocd/commands/admin/project_allowlist.go b/cmd/argocd/commands/admin/project_allowlist.go index 57b855251daa9..460ea21d93329 100644 --- a/cmd/argocd/commands/admin/project_allowlist.go +++ b/cmd/argocd/commands/admin/project_allowlist.go @@ -41,6 +41,8 @@ func NewProjectAllowListGenCommand() *cobra.Command { var command = &cobra.Command{ Use: "generate-allow-list CLUSTERROLE_PATH PROJ_NAME", Short: "Generates project allow list from the specified clusterRole file", + Example: `# Generates project allow list from the specified clusterRole file +argocd admin proj generate-allow-list /path/to/clusterrole.yaml my-project`, Run: func(c *cobra.Command, args []string) { if len(args) != 2 { c.HelpFunc()(c, args) diff --git a/docs/user-guide/commands/argocd_admin_proj_generate-allow-list.md b/docs/user-guide/commands/argocd_admin_proj_generate-allow-list.md index a16d6468cb446..83dc00a6096b4 100644 --- a/docs/user-guide/commands/argocd_admin_proj_generate-allow-list.md +++ b/docs/user-guide/commands/argocd_admin_proj_generate-allow-list.md @@ -8,6 +8,13 @@ Generates project allow list from the specified clusterRole file argocd admin proj generate-allow-list CLUSTERROLE_PATH PROJ_NAME [flags] ``` +### Examples + +``` +# Generates project allow list from the specified clusterRole file +argocd admin proj generate-allow-list /path/to/clusterrole.yaml my-project +``` + ### Options ```