From 39e483ddef3a63f90b268c55ae25e68a6221e824 Mon Sep 17 00:00:00 2001 From: Ishita Sequeira <46771830+ishitasequeira@users.noreply.github.com> Date: Thu, 20 Mar 2025 09:54:58 -0400 Subject: [PATCH] chore: add ApplicationSet Controller docs to clisdocsgen (#22417) Signed-off-by: Ishita Sequeira --- .../commands/applicationset_controller.go | 6 +- .../argocd-applicationset-controller.md | 63 +++++++++++++++++++ .../commands/argocd_appset_update.md | 50 --------------- docs/user-guide/commands/argocd_cli.md | 3 - tools/cmd-docs/main.go | 6 ++ 5 files changed, 74 insertions(+), 54 deletions(-) create mode 100644 docs/operator-manual/server-commands/argocd-applicationset-controller.md delete mode 100644 docs/user-guide/commands/argocd_appset_update.md delete mode 100644 docs/user-guide/commands/argocd_cli.md diff --git a/cmd/argocd-applicationset-controller/commands/applicationset_controller.go b/cmd/argocd-applicationset-controller/commands/applicationset_controller.go index 441eee488a..07d8426000 100644 --- a/cmd/argocd-applicationset-controller/commands/applicationset_controller.go +++ b/cmd/argocd-applicationset-controller/commands/applicationset_controller.go @@ -47,6 +47,10 @@ import ( var gitSubmoduleEnabled = env.ParseBoolFromEnv(common.EnvGitSubmoduleEnabled, true) +const ( + cliName = common.ApplicationSetController +) + func NewCommand() *cobra.Command { var ( clientConfig clientcmd.ClientConfig @@ -79,7 +83,7 @@ func NewCommand() *cobra.Command { _ = clientgoscheme.AddToScheme(scheme) _ = appv1alpha1.AddToScheme(scheme) command := cobra.Command{ - Use: "controller", + Use: cliName, Short: "Starts Argo CD ApplicationSet controller", RunE: func(c *cobra.Command, _ []string) error { ctx := c.Context() diff --git a/docs/operator-manual/server-commands/argocd-applicationset-controller.md b/docs/operator-manual/server-commands/argocd-applicationset-controller.md new file mode 100644 index 0000000000..aff6ab48f0 --- /dev/null +++ b/docs/operator-manual/server-commands/argocd-applicationset-controller.md @@ -0,0 +1,63 @@ +# `argocd-applicationset-controller` Command Reference + +## argocd-applicationset-controller + +Starts Argo CD ApplicationSet controller + +``` +argocd-applicationset-controller [flags] +``` + +### Options + +``` + --allowed-scm-providers strings The list of allowed custom SCM provider API URLs. This restriction does not apply to SCM or PR generators which do not accept a custom API URL. (Default: Empty = all) + --applicationset-namespaces strings Argo CD applicationset namespaces + --argocd-repo-server string Argo CD repo server address (default "argocd-repo-server:8081") + --as string Username to impersonate for the operation + --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. + --as-uid string UID to impersonate for the operation + --certificate-authority string Path to a cert file for the certificate authority + --client-certificate string Path to a client certificate file for TLS + --client-key string Path to a client key file for TLS + --cluster string The name of the kubeconfig cluster to use + --concurrent-reconciliations int Max concurrent reconciliations limit for the controller (default 10) + --context string The name of the kubeconfig context to use + --debug Print debug logs. Takes precedence over loglevel + --disable-compression If true, opt-out of response compression for all requests to the server + --dry-run Enable dry run mode + --enable-leader-election Enable leader election for controller manager. Enabling this will ensure there is only one active controller manager. + --enable-new-git-file-globbing Enable new globbing in Git files generator. + --enable-policy-override For security reason if 'policy' is set, it is not possible to override it at applicationSet level. 'allow-policy-override' allows user to define their own policy (default true) + --enable-progressive-syncs Enable use of the experimental progressive syncs feature. + --enable-scm-providers Enable retrieving information from SCM providers, used by the SCM and PR generators (Default: true) (default true) + -h, --help help for argocd-applicationset-controller + --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure + --kubeconfig string Path to a kube config. Only required if out-of-cluster + --logformat string Set the logging format. One of: json|text (default "json") + --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") + --metrics-addr string The address the metric endpoint binds to. (default ":8080") + --metrics-applicationset-labels strings List of Application labels that will be added to the argocd_applicationset_labels metric + -n, --namespace string If present, the namespace scope for this CLI request + --password string Password for basic authentication to the API server + --policy string Modify how application is synced between the generator and the cluster. Default is '' (empty), which means AppSets default to 'sync', but they may override that default. Setting an explicit value prevents AppSet-level overrides, unless --allow-policy-override is enabled. Explicit options are: 'sync' (create & update & delete), 'create-only', 'create-update' (no deletion), 'create-delete' (no update) + --preserved-annotations strings Sets global preserved field values for annotations + --preserved-labels strings Sets global preserved field values for labels + --probe-addr string The address the probe endpoint binds to. (default ":8081") + --proxy-url string If provided, this URL will be used to connect via proxy + --repo-server-plaintext Disable TLS on connections to repo server + --repo-server-strict-tls Whether to use strict validation of the TLS cert presented by the repo server + --repo-server-timeout-seconds int Repo server RPC call timeout seconds. (default 60) + --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") + --scm-root-ca-path string Provide Root CA Path for self-signed TLS Certificates + --server string The address and port of the Kubernetes API server + --tls-server-name string If provided, this name will be used to validate server certificate. If this is not provided, hostname used to contact the server is used. + --token string Bearer token for authentication to the API server + --token-ref-strict-mode Set to true to require secrets referenced by SCM providers to have the argocd.argoproj.io/secret-type=scm-creds label set (Default: false) + --user string The name of the kubeconfig user to use + --username string Username for basic authentication to the API server + --webhook-addr string The address the webhook endpoint binds to. (default ":7000") + --webhook-parallelism-limit int Number of webhook requests processed concurrently (default 50) +``` + +###### Auto generated by spf13/cobra on 20-Mar-2025 diff --git a/docs/user-guide/commands/argocd_appset_update.md b/docs/user-guide/commands/argocd_appset_update.md deleted file mode 100644 index 1b8b1c9b97..0000000000 --- a/docs/user-guide/commands/argocd_appset_update.md +++ /dev/null @@ -1,50 +0,0 @@ -## argocd appset update - -Updates the given ApplicationSet(s) - -``` -argocd appset update [flags] -``` - -### Examples - -``` - - # Update ApplicationSet - argocd appset update (...) - -``` - -### Options - -``` - -h, --help help for update -``` - -### Options inherited from parent commands - -``` - --auth-token string Authentication token; set this or the ARGOCD_AUTH_TOKEN environment variable - --client-crt string Client certificate file - --client-crt-key string Client certificate key file - --config string Path to Argo CD config (default "/home/user/.config/argocd/config") - --core If set to true then CLI talks directly to Kubernetes instead of talking to Argo CD API server - --grpc-web Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. - --grpc-web-root-path string Enables gRPC-web protocol. Useful if Argo CD server is behind proxy which does not support HTTP2. Set web root. - -H, --header strings Sets additional header to all requests made by Argo CD CLI. (Can be repeated multiple times to add multiple headers, also supports comma separated headers) - --http-retry-max int Maximum number of retries to establish http connection to Argo CD server - --insecure Skip server certificate and domain verification - --kube-context string Directs the command to the given kube-context - --logformat string Set the logging format. One of: json|text (default "json") - --loglevel string Set the logging level. One of: debug|info|warn|error (default "info") - --plaintext Disable TLS - --port-forward Connect to a random argocd-server port using port forwarding - --port-forward-namespace string Namespace name which should be used for port forwarding - --server string Argo CD server address - --server-crt string Server certificate file -``` - -### SEE ALSO - -* [argocd appset](argocd_appset.md) - Manage ApplicationSets - diff --git a/docs/user-guide/commands/argocd_cli.md b/docs/user-guide/commands/argocd_cli.md deleted file mode 100644 index 52f96a1ffd..0000000000 --- a/docs/user-guide/commands/argocd_cli.md +++ /dev/null @@ -1,3 +0,0 @@ -# ArgoCD Command Reference - -Argo CD command reference can be found [here](./argocd.md). \ No newline at end of file diff --git a/tools/cmd-docs/main.go b/tools/cmd-docs/main.go index 54398c184d..786ed14bae 100644 --- a/tools/cmd-docs/main.go +++ b/tools/cmd-docs/main.go @@ -10,6 +10,7 @@ import ( "github.com/spf13/cobra/doc" controller "github.com/argoproj/argo-cd/v3/cmd/argocd-application-controller/commands" + argocdappsetcontroller "github.com/argoproj/argo-cd/v3/cmd/argocd-applicationset-controller/commands" argocddex "github.com/argoproj/argo-cd/v3/cmd/argocd-dex/commands" reposerver "github.com/argoproj/argo-cd/v3/cmd/argocd-repo-server/commands" argocdserver "github.com/argoproj/argo-cd/v3/cmd/argocd-server/commands" @@ -54,4 +55,9 @@ func main() { if err != nil { log.Fatal(err) } + + err = doc.GenMarkdownTreeCustom(argocdappsetcontroller.NewCommand(), "./docs/operator-manual/server-commands", headerPrepender, identity) + if err != nil { + log.Fatal(err) + } }