From 6b7b08f35e5df643c578bfc279ee17f8a310a818 Mon Sep 17 00:00:00 2001 From: Ratan Gulati Date: Wed, 18 Oct 2023 08:17:55 +0530 Subject: [PATCH] feat: Add examples to --help output for remaining "get APPNAME" (#15862) * feat: Add examples to --help output for get APPNAME Signed-off-by: Ratan Gulati * feat: Add examples to --help output for get APPNAME Signed-off-by: Ratan Gulati * Update app.go Signed-off-by: Ratan Gulati * Update argocd_app_get.md Signed-off-by: Ratan Gulati * Update argocd_app_get.md Signed-off-by: Ratan Gulati * updated app.go Signed-off-by: Ratan Gulati * Update app.go Signed-off-by: Ratan Gulati * Update argocd_app_get.md Signed-off-by: Ratan Gulati * Update app.go Signed-off-by: Ratan Gulati * docs: clarify health inheritance (#15799) * docs: resource health inheritance Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * write more better Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Ratan Gulati * updated file Signed-off-by: Ratan Gulati * Update app.go Signed-off-by: Ratan Gulati * updated get-APPNAME Signed-off-by: Ratan Gulati * updated get-APPNAME Signed-off-by: Ratan Gulati --------- Signed-off-by: Ratan Gulati Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- cmd/argocd/commands/app.go | 29 ++++++++++++++++++++ docs/user-guide/commands/argocd_app_get.md | 31 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/cmd/argocd/commands/app.go b/cmd/argocd/commands/app.go index 55ed2ee8790f3..a8872ffc9774c 100644 --- a/cmd/argocd/commands/app.go +++ b/cmd/argocd/commands/app.go @@ -318,6 +318,35 @@ func NewApplicationGetCommand(clientOpts *argocdclient.ClientOptions) *cobra.Com var command = &cobra.Command{ Use: "get APPNAME", Short: "Get application details", + Example: templates.Examples(` + # Get basic details about the application "my-app" in wide format + argocd app get my-app -o wide + + # Get detailed information about the application "my-app" in YAML format + argocd app get my-app -o yaml + + # Get details of the application "my-app" in JSON format + argocd get my-app -o json + + # Get application details and include information about the current operation + argocd app get my-app --show-operation + + # Show application parameters and overrides + argocd app get my-app --show-params + + # Refresh application data when retrieving + argocd app get my-app --refresh + + # Perform a hard refresh, including refreshing application data and target manifests cache + argocd app get my-app --hard-refresh + + # Get application details and display them in a tree format + argocd app get my-app --output tree + + # Get application details and display them in a detailed tree format + argocd app get my-app --output tree=detailed + `), + Run: func(c *cobra.Command, args []string) { ctx := c.Context() if len(args) == 0 { diff --git a/docs/user-guide/commands/argocd_app_get.md b/docs/user-guide/commands/argocd_app_get.md index 33787d8083f22..cf766ed9eb0d7 100644 --- a/docs/user-guide/commands/argocd_app_get.md +++ b/docs/user-guide/commands/argocd_app_get.md @@ -8,6 +8,37 @@ Get application details argocd app get APPNAME [flags] ``` +### Examples + +``` + # Get basic details about the application "my-app" in wide format + argocd app get my-app -o wide + + # Get detailed information about the application "my-app" in YAML format + argocd app get my-app -o yaml + + # Get details of the application "my-app" in JSON format + argocd get my-app -o json + + # Get application details and include information about the current operation + argocd app get my-app --show-operation + + # Show application parameters and overrides + argocd app get my-app --show-params + + # Refresh application data when retrieving + argocd app get my-app --refresh + + # Perform a hard refresh, including refreshing application data and target manifests cache + argocd app get my-app --hard-refresh + + # Get application details and display them in a tree format + argocd app get my-app --output tree + + # Get application details and display them in a detailed tree format + argocd app get my-app --output tree=detailed +``` + ### Options ```