From ba45d12c8993f3c52795493e90910416348a9b17 Mon Sep 17 00:00:00 2001 From: Mario Manno Date: Fri, 22 Mar 2024 14:02:14 +0100 Subject: [PATCH] Update CLI docs --- docs/cli/fleet-agent/fleet-agent.md | 23 +++++++++---- .../fleet-agent/fleet-agent_clusterstatus.md | 33 +++++++++++++++++++ docs/cli/fleet-agent/fleet-agent_register.md | 32 ++++++++++++++++++ docs/cli/fleet-cli/fleet.md | 11 ++----- docs/cli/fleet-cli/fleet_apply.md | 12 ++----- docs/cli/fleet-cli/fleet_cleanup.md | 24 +++++--------- docs/cli/fleet-cli/fleet_deploy.md | 32 ++++++++++++++++++ docs/cli/fleet-cli/fleet_target.md | 31 +++++++++++++++++ docs/cli/fleet-cli/fleet_test.md | 13 +------- docs/cli/fleet-controller/fleet-manager.md | 23 +++++++++---- .../fleet-manager_agentmanagement.md | 33 +++++++++++++++++++ .../fleet-controller/fleet-manager_cleanup.md | 32 ++++++++++++++++++ sidebars.js | 22 +++++++------ 13 files changed, 253 insertions(+), 68 deletions(-) create mode 100644 docs/cli/fleet-agent/fleet-agent_clusterstatus.md create mode 100644 docs/cli/fleet-agent/fleet-agent_register.md create mode 100644 docs/cli/fleet-cli/fleet_deploy.md create mode 100644 docs/cli/fleet-cli/fleet_target.md create mode 100644 docs/cli/fleet-controller/fleet-manager_agentmanagement.md create mode 100644 docs/cli/fleet-controller/fleet-manager_cleanup.md diff --git a/docs/cli/fleet-agent/fleet-agent.md b/docs/cli/fleet-agent/fleet-agent.md index 502616b5b..703340c95 100644 --- a/docs/cli/fleet-agent/fleet-agent.md +++ b/docs/cli/fleet-agent/fleet-agent.md @@ -13,12 +13,21 @@ fleet-agent [flags] ### Options ``` - --agent-scope string An identifier used to scope the agent bundleID names, typically the same as namespace - --checkin-interval string How often to post cluster status - --debug Turn on debug logging - --debug-level int If debugging is enabled, set klog -v=X - -h, --help help for fleet-agent - --kubeconfig string kubeconfig file - --namespace string namespace to watch + --agent-scope string An identifier used to scope the agent bundleID names, typically the same as namespace + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + -h, --help help for fleet-agent + --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. + --namespace string system namespace is the namespace, the agent runs in, e.g. cattle-fleet-system + --zap-devel Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default true) + --zap-encoder encoder Zap log encoding (one of 'json' or 'console') + --zap-log-level level Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity + --zap-stacktrace-level level Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). + --zap-time-encoding time-encoding Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'. ``` +### SEE ALSO + +* [fleet-agent clusterstatus](./fleet-agent_clusterstatus) - Continuously report resource status to the upstream cluster +* [fleet-agent register](./fleet-agent_register) - Register agent with an upstream cluster + diff --git a/docs/cli/fleet-agent/fleet-agent_clusterstatus.md b/docs/cli/fleet-agent/fleet-agent_clusterstatus.md new file mode 100644 index 000000000..4bca7856f --- /dev/null +++ b/docs/cli/fleet-agent/fleet-agent_clusterstatus.md @@ -0,0 +1,33 @@ +--- +title: "" +sidebar_label: "fleet-agent clusterstatus" +--- +## fleet-agent clusterstatus + +Continuously report resource status to the upstream cluster + +``` +fleet-agent clusterstatus [flags] +``` + +### Options + +``` + --checkin-interval string How often to post cluster status + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + -h, --help help for clusterstatus + --kubeconfig string kubeconfig file for agent's cluster + --namespace string system namespace is the namespace, the agent runs in, e.g. cattle-fleet-system +``` + +### Options inherited from parent commands + +``` + --agent-scope string An identifier used to scope the agent bundleID names, typically the same as namespace +``` + +### SEE ALSO + +* [fleet-agent](./fleet-agent) - + diff --git a/docs/cli/fleet-agent/fleet-agent_register.md b/docs/cli/fleet-agent/fleet-agent_register.md new file mode 100644 index 000000000..b8f2ae9c6 --- /dev/null +++ b/docs/cli/fleet-agent/fleet-agent_register.md @@ -0,0 +1,32 @@ +--- +title: "" +sidebar_label: "fleet-agent register" +--- +## fleet-agent register + +Register agent with an upstream cluster + +``` +fleet-agent register [flags] +``` + +### Options + +``` + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + -h, --help help for register + --kubeconfig string kubeconfig file for agent's cluster + --namespace string system namespace is the namespace, the agent runs in, e.g. cattle-fleet-system +``` + +### Options inherited from parent commands + +``` + --agent-scope string An identifier used to scope the agent bundleID names, typically the same as namespace +``` + +### SEE ALSO + +* [fleet-agent](./fleet-agent) - + diff --git a/docs/cli/fleet-cli/fleet.md b/docs/cli/fleet-cli/fleet.md index b501c2c12..828a388d8 100644 --- a/docs/cli/fleet-cli/fleet.md +++ b/docs/cli/fleet-cli/fleet.md @@ -13,18 +13,13 @@ fleet [flags] ### Options ``` - --context string kubeconfig context for authentication - --debug Turn on debug logging - --debug-level int If debugging is enabled, set klog -v=X - -h, --help help for fleet - -k, --kubeconfig string kubeconfig for authentication - -n, --namespace string namespace (default "fleet-local") - --system-namespace string System namespace of the controller (default "cattle-fleet-system") + -h, --help help for fleet ``` ### SEE ALSO * [fleet apply](./fleet_apply) - Render a bundle into a Kubernetes resource and apply it in the Fleet Manager * [fleet cleanup](./fleet_cleanup) - Clean up outdated cluster registrations -* [fleet test](./fleet_test) - Match a bundle to a target and render the output +* [fleet deploy](./fleet_deploy) - Deploy a bundledeployment/content resource to a cluster, by creating a Helm release. This will not deploy the bundledeployment/content resources directly to the cluster. +* [fleet target](./fleet_target) - Print available targets for a bundle diff --git a/docs/cli/fleet-cli/fleet_apply.md b/docs/cli/fleet-cli/fleet_apply.md index 6d343f0a9..2de4ae6fc 100644 --- a/docs/cli/fleet-cli/fleet_apply.md +++ b/docs/cli/fleet-cli/fleet_apply.md @@ -17,6 +17,7 @@ fleet apply [flags] BUNDLE_NAME PATH... --cacerts-file string Path of custom cacerts for helm repo --commit string Commit to assign to the bundle -c, --compress Force all resources to be compress + --context string kubeconfig context for authentication --correct-drift Rollback any change made from outside of Fleet --correct-drift-force Use --force when correcting drift. Resources can be deleted and recreated --correct-drift-keep-fail-history Keep helm history for failed rollbacks @@ -27,7 +28,9 @@ fleet apply [flags] BUNDLE_NAME PATH... --helm-repo-url-regex string Helm credentials will be used if the helm repo matches this regex. Credentials will always be used if this is empty or not provided -h, --help help for apply --keep-resources Keep resources created after the GitRepo or Bundle is deleted + -k, --kubeconfig string kubeconfig for authentication -l, --label strings Labels to apply to created bundles + -n, --namespace string namespace (default "fleet-local") -o, --output string Output contents to file or - for stdout --password-file string Path of file containing basic auth password for helm repo --paused Create bundles in a paused state @@ -39,15 +42,6 @@ fleet apply [flags] BUNDLE_NAME PATH... --username string Basic auth username for helm repo ``` -### Options inherited from parent commands - -``` - --context string kubeconfig context for authentication - -k, --kubeconfig string kubeconfig for authentication - -n, --namespace string namespace (default "fleet-local") - --system-namespace string System namespace of the controller (default "cattle-fleet-system") -``` - ### SEE ALSO * [fleet](./fleet) - diff --git a/docs/cli/fleet-cli/fleet_cleanup.md b/docs/cli/fleet-cli/fleet_cleanup.md index a42b7e42e..49dbe9166 100644 --- a/docs/cli/fleet-cli/fleet_cleanup.md +++ b/docs/cli/fleet-cli/fleet_cleanup.md @@ -13,21 +13,15 @@ fleet cleanup [flags] ### Options ``` - --debug Turn on debug logging - --debug-level int If debugging is enabled, set klog -v=X - --factor string Factor to increase delay between deletes (default: 1.1) - -h, --help help for cleanup - --max string Maximum delay between deletes (default: 5s) - --min string Minimum delay between deletes (default: 10ms) -``` - -### Options inherited from parent commands - -``` - --context string kubeconfig context for authentication - -k, --kubeconfig string kubeconfig for authentication - -n, --namespace string namespace (default "fleet-local") - --system-namespace string System namespace of the controller (default "cattle-fleet-system") + --context string kubeconfig context for authentication + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + --factor string Factor to increase delay between deletes (default: 1.1) + -h, --help help for cleanup + -k, --kubeconfig string kubeconfig for authentication + --max string Maximum delay between deletes (default: 5s) + --min string Minimum delay between deletes (default: 10ms) + -n, --namespace string namespace (default "fleet-local") ``` ### SEE ALSO diff --git a/docs/cli/fleet-cli/fleet_deploy.md b/docs/cli/fleet-cli/fleet_deploy.md new file mode 100644 index 000000000..7f77a1133 --- /dev/null +++ b/docs/cli/fleet-cli/fleet_deploy.md @@ -0,0 +1,32 @@ +--- +title: "" +sidebar_label: "fleet deploy" +--- +## fleet deploy + +Deploy a bundledeployment/content resource to a cluster, by creating a Helm release. This will not deploy the bundledeployment/content resources directly to the cluster. + +``` +fleet deploy [flags] +``` + +### Options + +``` + -a, --agent-namespace string Set the agent namespace, normally cattle-fleet-system. If set, fleet agent will garbage collect the helm release, i.e. delete it if the bundledeployment is missing. + -d, --dry-run Print the resources that would be deployed, but do not actually deploy them + -h, --help help for deploy + -i, --input-file string Location of the YAML file containing the content and the bundledeployment resource + --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. + -n, --namespace string Set the default namespace. Deploy helm chart into this namespace. + --zap-devel Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default true) + --zap-encoder encoder Zap log encoding (one of 'json' or 'console') + --zap-log-level level Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity + --zap-stacktrace-level level Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). + --zap-time-encoding time-encoding Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'. +``` + +### SEE ALSO + +* [fleet](./fleet) - + diff --git a/docs/cli/fleet-cli/fleet_target.md b/docs/cli/fleet-cli/fleet_target.md new file mode 100644 index 000000000..f1f6ba216 --- /dev/null +++ b/docs/cli/fleet-cli/fleet_target.md @@ -0,0 +1,31 @@ +--- +title: "" +sidebar_label: "fleet target" +--- +## fleet target + +Print available targets for a bundle + +``` +fleet target [flags] +``` + +### Options + +``` + -b, --bundle-file string Location of the Bundle resource yaml + -l, --dump-input-list Dump the live resources, which impact targeting, like clusters, as YAML + -h, --help help for target + --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. + -n, --namespace string Override the namespace of the bundle. Targeting searches this namespace for clusters. + --zap-devel Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default true) + --zap-encoder encoder Zap log encoding (one of 'json' or 'console') + --zap-log-level level Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity + --zap-stacktrace-level level Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). + --zap-time-encoding time-encoding Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'. +``` + +### SEE ALSO + +* [fleet](./fleet) - + diff --git a/docs/cli/fleet-cli/fleet_test.md b/docs/cli/fleet-cli/fleet_test.md index 5018feedb..8e8fe1d4e 100644 --- a/docs/cli/fleet-cli/fleet_test.md +++ b/docs/cli/fleet-cli/fleet_test.md @@ -4,7 +4,7 @@ sidebar_label: "fleet test" --- ## fleet test -Match a bundle to a target and render the output +Match a bundle to a target and render the output (deprecated) ``` fleet test [flags] @@ -14,8 +14,6 @@ fleet test [flags] ``` -b, --bundle-file string Location of the raw Bundle resource yaml - --debug Turn on debug logging - --debug-level int If debugging is enabled, set klog -v=X -f, --file string Location of the fleet.yaml -g, --group string Cluster group to match against -L, --group-label strings Cluster group labels to match against @@ -26,15 +24,6 @@ fleet test [flags] -t, --target string Explicit target to match ``` -### Options inherited from parent commands - -``` - --context string kubeconfig context for authentication - -k, --kubeconfig string kubeconfig for authentication - -n, --namespace string namespace (default "fleet-local") - --system-namespace string System namespace of the controller (default "cattle-fleet-system") -``` - ### SEE ALSO * [fleet](./fleet) - diff --git a/docs/cli/fleet-controller/fleet-manager.md b/docs/cli/fleet-controller/fleet-manager.md index 77849ca26..e263163ab 100644 --- a/docs/cli/fleet-controller/fleet-manager.md +++ b/docs/cli/fleet-controller/fleet-manager.md @@ -13,12 +13,21 @@ fleet-manager [flags] ### Options ``` - --debug Turn on debug logging - --debug-level int If debugging is enabled, set klog -v=X - --disable-bootstrap disable local cluster components - --disable-gitops disable gitops components - -h, --help help for fleet-manager - --kubeconfig string Kubeconfig file - --namespace string namespace to watch (default "cattle-fleet-system") + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + --disable-gitops disable gitops components + -h, --help help for fleet-manager + --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. + --namespace string namespace to watch (default "cattle-fleet-system") + --zap-devel Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn). Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error) (default true) + --zap-encoder encoder Zap log encoding (one of 'json' or 'console') + --zap-log-level level Zap Level to configure the verbosity of logging. Can be one of 'debug', 'info', 'error', or any integer value > 0 which corresponds to custom debug levels of increasing verbosity + --zap-stacktrace-level level Zap Level at and above which stacktraces are captured (one of 'info', 'error', 'panic'). + --zap-time-encoding time-encoding Zap time encoding (one of 'epoch', 'millis', 'nano', 'iso8601', 'rfc3339' or 'rfc3339nano'). Defaults to 'epoch'. ``` +### SEE ALSO + +* [fleet-manager agentmanagement](./fleet-manager_agentmanagement) - +* [fleet-manager cleanup](./fleet-manager_cleanup) - + diff --git a/docs/cli/fleet-controller/fleet-manager_agentmanagement.md b/docs/cli/fleet-controller/fleet-manager_agentmanagement.md new file mode 100644 index 000000000..b0ed2fb1b --- /dev/null +++ b/docs/cli/fleet-controller/fleet-manager_agentmanagement.md @@ -0,0 +1,33 @@ +--- +title: "" +sidebar_label: "fleet-manager agentmanagement" +--- +## fleet-manager agentmanagement + + + +``` +fleet-manager agentmanagement [flags] +``` + +### Options + +``` + --disable-bootstrap disable local cluster components + -h, --help help for agentmanagement + --kubeconfig string kubeconfig file + --namespace string namespace to watch +``` + +### Options inherited from parent commands + +``` + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + --disable-gitops disable gitops components +``` + +### SEE ALSO + +* [fleet-manager](./fleet-manager) - + diff --git a/docs/cli/fleet-controller/fleet-manager_cleanup.md b/docs/cli/fleet-controller/fleet-manager_cleanup.md new file mode 100644 index 000000000..8e61e1f26 --- /dev/null +++ b/docs/cli/fleet-controller/fleet-manager_cleanup.md @@ -0,0 +1,32 @@ +--- +title: "" +sidebar_label: "fleet-manager cleanup" +--- +## fleet-manager cleanup + + + +``` +fleet-manager cleanup [flags] +``` + +### Options + +``` + -h, --help help for cleanup + --kubeconfig string kubeconfig file + --namespace string namespace to watch +``` + +### Options inherited from parent commands + +``` + --debug Turn on debug logging + --debug-level int If debugging is enabled, set klog -v=X + --disable-gitops disable gitops components +``` + +### SEE ALSO + +* [fleet-manager](./fleet-manager) - + diff --git a/sidebars.js b/sidebars.js index 09cc4d5b9..a237fdfcd 100644 --- a/sidebars.js +++ b/sidebars.js @@ -54,17 +54,19 @@ module.exports = { collapsed: false, items:[ { - 'CLI': - [ - {type: 'doc', id: 'cli/fleet-agent/fleet-agent'}, - { - 'fleet-gitjob-cli': [ - {type: 'doc', id: 'cli/fleet-cli/fleet'}, - {type: 'doc', id: 'cli/fleet-cli/fleet_apply'}, - {type: 'doc', id: 'cli/fleet-cli/fleet_test'}, - ], - }, + 'CLI': [ + 'cli/fleet-agent/fleet-agent', + 'cli/fleet-agent/fleet-agent_clusterstatus', + 'cli/fleet-agent/fleet-agent_register', + {type: 'doc', id: 'cli/fleet-cli/fleet'}, + {type: 'doc', id: 'cli/fleet-cli/fleet_apply'}, + {type: 'doc', id: 'cli/fleet-cli/fleet_cleanup'}, + {type: 'doc', id: 'cli/fleet-cli/fleet_deploy'}, + {type: 'doc', id: 'cli/fleet-cli/fleet_target'}, + {type: 'doc', id: 'cli/fleet-cli/fleet_test'}, {type: 'doc', id: 'cli/fleet-controller/fleet-manager'}, + {type: 'doc', id: 'cli/fleet-controller/fleet-manager_agentmanagement'}, + {type: 'doc', id: 'cli/fleet-controller/fleet-manager_cleanup'}, ], }, {type:'doc', id:'cluster-bundles-state'},