From e1806110245aeda07132f3e29efdabc6536f9278 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 14 Jul 2020 11:02:37 +0300 Subject: [PATCH] Refactor defaults - add dedicated components flag for bootstrap/install/check - extract defaults to vars - update CLI docs --- cmd/tk/bootstrap.go | 10 +++++++--- cmd/tk/bootstrap_github.go | 2 +- cmd/tk/bootstrap_gitlab.go | 2 +- cmd/tk/check.go | 12 +++++++----- cmd/tk/install.go | 15 +++++++++------ cmd/tk/main.go | 12 +++++++----- docs/cmd/tk.md | 11 +++++------ docs/cmd/tk_bootstrap.md | 14 +++++++------- docs/cmd/tk_bootstrap_github.md | 2 +- docs/cmd/tk_bootstrap_gitlab.md | 2 +- docs/cmd/tk_check.md | 18 +++++++++--------- docs/cmd/tk_completion.md | 9 ++++----- docs/cmd/tk_create.md | 9 ++++----- docs/cmd/tk_create_kustomization.md | 13 ++++++------- docs/cmd/tk_create_source.md | 13 ++++++------- docs/cmd/tk_create_source_git.md | 13 ++++++------- docs/cmd/tk_delete.md | 9 ++++----- docs/cmd/tk_delete_kustomization.md | 11 +++++------ docs/cmd/tk_delete_source.md | 11 +++++------ docs/cmd/tk_delete_source_git.md | 11 +++++------ docs/cmd/tk_export.md | 9 ++++----- docs/cmd/tk_export_kustomization.md | 11 +++++------ docs/cmd/tk_export_source.md | 11 +++++------ docs/cmd/tk_export_source_git.md | 13 ++++++------- docs/cmd/tk_get.md | 9 ++++----- docs/cmd/tk_get_kustomizations.md | 9 ++++----- docs/cmd/tk_get_sources.md | 9 ++++----- docs/cmd/tk_get_sources_git.md | 9 ++++----- docs/cmd/tk_install.md | 24 ++++++++++++------------ docs/cmd/tk_resume.md | 9 ++++----- docs/cmd/tk_resume_kustomization.md | 9 ++++----- docs/cmd/tk_suspend.md | 9 ++++----- docs/cmd/tk_suspend_kustomization.md | 9 ++++----- docs/cmd/tk_sync.md | 9 ++++----- docs/cmd/tk_sync_kustomization.md | 9 ++++----- docs/cmd/tk_sync_source.md | 9 ++++----- docs/cmd/tk_sync_source_git.md | 9 ++++----- docs/cmd/tk_uninstall.md | 9 ++++----- 38 files changed, 184 insertions(+), 200 deletions(-) diff --git a/cmd/tk/bootstrap.go b/cmd/tk/bootstrap.go index 9f02ecfb..695383db 100644 --- a/cmd/tk/bootstrap.go +++ b/cmd/tk/bootstrap.go @@ -45,7 +45,8 @@ var bootstrapCmd = &cobra.Command{ } var ( - bootstrapVersion string + bootstrapVersion string + bootstrapComponents []string ) const ( @@ -56,7 +57,10 @@ const ( ) func init() { - bootstrapCmd.PersistentFlags().StringVar(&bootstrapVersion, "version", "master", "toolkit tag or branch") + bootstrapCmd.PersistentFlags().StringVarP(&bootstrapVersion, "version", "v", defaultVersion, + "toolkit tag or branch") + bootstrapCmd.PersistentFlags().StringSliceVar(&bootstrapComponents, "components", defaultComponents, + "list of components, accepts comma-separated values") rootCmd.AddCommand(bootstrapCmd) } @@ -69,7 +73,7 @@ func generateInstallManifests(targetPath, namespace, tmpDir string) (string, err return "", fmt.Errorf("generating manifests failed: %w", err) } - if err := genInstallManifests(bootstrapVersion, namespace, components, tkDir); err != nil { + if err := genInstallManifests(bootstrapVersion, namespace, bootstrapComponents, tkDir); err != nil { return "", fmt.Errorf("generating manifests failed: %w", err) } diff --git a/cmd/tk/bootstrap_github.go b/cmd/tk/bootstrap_github.go index cd3e5ac5..4e7f8d5f 100644 --- a/cmd/tk/bootstrap_github.go +++ b/cmd/tk/bootstrap_github.go @@ -175,7 +175,7 @@ func bootstrapGitHubCmdRun(cmd *cobra.Command, args []string) error { if isInstall { // apply install manifests logger.Actionf("installing components in %s namespace", namespace) - if err := applyInstallManifests(ctx, manifest, components); err != nil { + if err := applyInstallManifests(ctx, manifest, bootstrapComponents); err != nil { return err } logger.Successf("install completed") diff --git a/cmd/tk/bootstrap_gitlab.go b/cmd/tk/bootstrap_gitlab.go index 39635b96..d35aab4f 100644 --- a/cmd/tk/bootstrap_gitlab.go +++ b/cmd/tk/bootstrap_gitlab.go @@ -153,7 +153,7 @@ func bootstrapGitLabCmdRun(cmd *cobra.Command, args []string) error { if isInstall { // apply install manifests logger.Actionf("installing components in %s namespace", namespace) - if err := applyInstallManifests(ctx, manifest, components); err != nil { + if err := applyInstallManifests(ctx, manifest, bootstrapComponents); err != nil { return err } logger.Successf("install completed") diff --git a/cmd/tk/check.go b/cmd/tk/check.go index ca26f972..78f5cd95 100644 --- a/cmd/tk/check.go +++ b/cmd/tk/check.go @@ -35,22 +35,24 @@ var checkCmd = &cobra.Command{ Long: `The check command will perform a series of checks to validate that the local environment is configured correctly and if the installed components are healthy.`, Example: ` # Run pre-installation checks - check --pre + tk check --pre # Run installation checks - check + tk check `, RunE: runCheckCmd, } var ( - checkPre bool + checkPre bool + checkComponents []string ) func init() { checkCmd.Flags().BoolVarP(&checkPre, "pre", "", false, "only run pre-installation checks") - + checkCmd.Flags().StringSliceVar(&checkComponents, "components", defaultComponents, + "list of components, accepts comma-separated values") rootCmd.AddCommand(checkCmd) } @@ -158,7 +160,7 @@ func componentsCheck() bool { defer cancel() ok := true - for _, deployment := range components { + for _, deployment := range checkComponents { command := fmt.Sprintf("kubectl -n %s rollout status deployment %s --timeout=%s", namespace, deployment, timeout.String()) if output, err := utils.execCommand(ctx, ModeCapture, command); err != nil { diff --git a/cmd/tk/install.go b/cmd/tk/install.go index 8cbbf716..c1671152 100644 --- a/cmd/tk/install.go +++ b/cmd/tk/install.go @@ -36,13 +36,13 @@ var installCmd = &cobra.Command{ Long: `The install command deploys the toolkit components in the specified namespace. If a previous version is installed, then an in-place upgrade will be performed.`, Example: ` # Install the latest version in the gitops-systems namespace - install --version=master --namespace=gitops-systems + tk install --version=master --namespace=gitops-systems # Dry-run install for a specific version and a series of components - install --dry-run --version=0.0.1 --components="source-controller,kustomize-controller" + tk install --dry-run --version=0.0.1 --components="source-controller,kustomize-controller" # Dry-run install with manifests preview - install --dry-run --verbose + tk install --dry-run --verbose `, RunE: installCmdRun, } @@ -51,13 +51,16 @@ var ( installDryRun bool installManifestsPath string installVersion string + installComponents []string ) func init() { installCmd.Flags().BoolVarP(&installDryRun, "dry-run", "", false, "only print the object that would be applied") - installCmd.Flags().StringVarP(&installVersion, "version", "v", "master", + installCmd.Flags().StringVarP(&installVersion, "version", "v", defaultVersion, "toolkit tag or branch") + installCmd.Flags().StringSliceVar(&installComponents, "components", defaultComponents, + "list of components, accepts comma-separated values") installCmd.Flags().StringVarP(&installManifestsPath, "manifests", "", "", "path to the manifest directory, dev only") rootCmd.AddCommand(installCmd) @@ -83,7 +86,7 @@ func installCmdRun(cmd *cobra.Command, args []string) error { logger.Generatef("generating manifests") if kustomizePath == "" { - err = genInstallManifests(installVersion, namespace, components, tmpDir) + err = genInstallManifests(installVersion, namespace, installComponents, tmpDir) if err != nil { return fmt.Errorf("install failed: %w", err) } @@ -128,7 +131,7 @@ func installCmdRun(cmd *cobra.Command, args []string) error { } logger.Waitingf("verifying installation") - for _, deployment := range components { + for _, deployment := range installComponents { command = fmt.Sprintf("kubectl -n %s rollout status deployment %s --timeout=%s", namespace, deployment, timeout.String()) if _, err := utils.execCommand(ctx, applyOutput, command); err != nil { diff --git a/cmd/tk/main.go b/cmd/tk/main.go index 438cfd70..016fac7b 100644 --- a/cmd/tk/main.go +++ b/cmd/tk/main.go @@ -98,22 +98,24 @@ var ( namespace string timeout time.Duration verbose bool - components []string utils Utils pollInterval = 2 * time.Second logger tklog.Logger = printLogger{} ) +var ( + defaultComponents = []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"} + defaultVersion = "master" + defaultNamespace = "gitops-system" +) + func init() { - rootCmd.PersistentFlags().StringVarP(&namespace, "namespace", "", "gitops-system", + rootCmd.PersistentFlags().StringVar(&namespace, "namespace", defaultNamespace, "the namespace scope for this operation") rootCmd.PersistentFlags().DurationVarP(&timeout, "timeout", "", 5*time.Minute, "timeout for this operation") rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "", false, "print generated objects") - rootCmd.PersistentFlags().StringSliceVar(&components, "components", - []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"}, - "list of components, accepts comma-separated values") } func main() { diff --git a/docs/cmd/tk.md b/docs/cmd/tk.md index ad43064a..187795d5 100644 --- a/docs/cmd/tk.md +++ b/docs/cmd/tk.md @@ -67,12 +67,11 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way. ### Options ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - -h, --help help for tk - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + -h, --help help for tk + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_bootstrap.md b/docs/cmd/tk_bootstrap.md index bdebfac6..3ca6eb23 100644 --- a/docs/cmd/tk_bootstrap.md +++ b/docs/cmd/tk_bootstrap.md @@ -9,18 +9,18 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git ### Options ``` - -h, --help help for bootstrap - --version string toolkit tag or branch (default "master") + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) + -h, --help help for bootstrap + -v, --version string toolkit tag or branch (default "master") ``` ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_bootstrap_github.md b/docs/cmd/tk_bootstrap_github.md index ef58e41d..e4ebd723 100644 --- a/docs/cmd/tk_bootstrap_github.md +++ b/docs/cmd/tk_bootstrap_github.md @@ -59,7 +59,7 @@ tk bootstrap github [flags] --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) --verbose print generated objects - --version string toolkit tag or branch (default "master") + -v, --version string toolkit tag or branch (default "master") ``` ### SEE ALSO diff --git a/docs/cmd/tk_bootstrap_gitlab.md b/docs/cmd/tk_bootstrap_gitlab.md index 57fdb32a..933ec721 100644 --- a/docs/cmd/tk_bootstrap_gitlab.md +++ b/docs/cmd/tk_bootstrap_gitlab.md @@ -55,7 +55,7 @@ tk bootstrap gitlab [flags] --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) --verbose print generated objects - --version string toolkit tag or branch (default "master") + -v, --version string toolkit tag or branch (default "master") ``` ### SEE ALSO diff --git a/docs/cmd/tk_check.md b/docs/cmd/tk_check.md index b66726c2..b5e6d5d7 100644 --- a/docs/cmd/tk_check.md +++ b/docs/cmd/tk_check.md @@ -15,28 +15,28 @@ tk check [flags] ``` # Run pre-installation checks - check --pre + tk check --pre # Run installation checks - check + tk check ``` ### Options ``` - -h, --help help for check - --pre only run pre-installation checks + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) + -h, --help help for check + --pre only run pre-installation checks ``` ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_completion.md b/docs/cmd/tk_completion.md index 1aacb192..79cc46c7 100644 --- a/docs/cmd/tk_completion.md +++ b/docs/cmd/tk_completion.md @@ -33,11 +33,10 @@ To configure your bash shell to load completions for each session add to your ba ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_create.md b/docs/cmd/tk_create.md index ddbcc4cd..3cfc07d1 100644 --- a/docs/cmd/tk_create.md +++ b/docs/cmd/tk_create.md @@ -17,11 +17,10 @@ The create sub-commands generate sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md index f735b132..bdb32f95 100644 --- a/docs/cmd/tk_create_kustomization.md +++ b/docs/cmd/tk_create_kustomization.md @@ -63,13 +63,12 @@ tk create kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --export export in YAML format to stdout - --interval duration source sync interval (default 1m0s) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --export export in YAML format to stdout + --interval duration source sync interval (default 1m0s) + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_create_source.md b/docs/cmd/tk_create_source.md index 771b77c8..796c3161 100644 --- a/docs/cmd/tk_create_source.md +++ b/docs/cmd/tk_create_source.md @@ -15,13 +15,12 @@ The create source sub-commands generate sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --export export in YAML format to stdout - --interval duration source sync interval (default 1m0s) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --export export in YAML format to stdout + --interval duration source sync interval (default 1m0s) + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_create_source_git.md b/docs/cmd/tk_create_source_git.md index 933438ba..825ff472 100644 --- a/docs/cmd/tk_create_source_git.md +++ b/docs/cmd/tk_create_source_git.md @@ -70,13 +70,12 @@ tk create source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --export export in YAML format to stdout - --interval duration source sync interval (default 1m0s) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --export export in YAML format to stdout + --interval duration source sync interval (default 1m0s) + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_delete.md b/docs/cmd/tk_delete.md index c342f400..cc1c6e96 100644 --- a/docs/cmd/tk_delete.md +++ b/docs/cmd/tk_delete.md @@ -16,11 +16,10 @@ The delete sub-commands delete sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_delete_kustomization.md b/docs/cmd/tk_delete_kustomization.md index d58fee1a..f4ee3674 100644 --- a/docs/cmd/tk_delete_kustomization.md +++ b/docs/cmd/tk_delete_kustomization.md @@ -19,12 +19,11 @@ tk delete kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - -s, --silent delete resource without asking for confirmation - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + -s, --silent delete resource without asking for confirmation + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_delete_source.md b/docs/cmd/tk_delete_source.md index ce2df34c..1d81169c 100644 --- a/docs/cmd/tk_delete_source.md +++ b/docs/cmd/tk_delete_source.md @@ -15,12 +15,11 @@ The delete source sub-commands delete sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - -s, --silent delete resource without asking for confirmation - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + -s, --silent delete resource without asking for confirmation + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_delete_source_git.md b/docs/cmd/tk_delete_source_git.md index bc7d40bf..b6952af9 100644 --- a/docs/cmd/tk_delete_source_git.md +++ b/docs/cmd/tk_delete_source_git.md @@ -19,12 +19,11 @@ tk delete source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - -s, --silent delete resource without asking for confirmation - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + -s, --silent delete resource without asking for confirmation + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_export.md b/docs/cmd/tk_export.md index f3f0c2fc..1f461339 100644 --- a/docs/cmd/tk_export.md +++ b/docs/cmd/tk_export.md @@ -16,11 +16,10 @@ The export sub-commands export resources in YAML format. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_export_kustomization.md b/docs/cmd/tk_export_kustomization.md index a56f88b7..bf2eaa18 100644 --- a/docs/cmd/tk_export_kustomization.md +++ b/docs/cmd/tk_export_kustomization.md @@ -30,12 +30,11 @@ tk export kustomization [name] [flags] ### Options inherited from parent commands ``` - --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --all select all resources + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_export_source.md b/docs/cmd/tk_export_source.md index ed755896..a4067516 100644 --- a/docs/cmd/tk_export_source.md +++ b/docs/cmd/tk_export_source.md @@ -16,12 +16,11 @@ The export source sub-commands export sources in YAML format. ### Options inherited from parent commands ``` - --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --all select all resources + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_export_source_git.md b/docs/cmd/tk_export_source_git.md index dd7a2c09..0f35ae21 100644 --- a/docs/cmd/tk_export_source_git.md +++ b/docs/cmd/tk_export_source_git.md @@ -30,13 +30,12 @@ tk export source git [name] [flags] ### Options inherited from parent commands ``` - --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects - --with-credentials include credential secrets + --all select all resources + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects + --with-credentials include credential secrets ``` ### SEE ALSO diff --git a/docs/cmd/tk_get.md b/docs/cmd/tk_get.md index f679645c..49f4a280 100644 --- a/docs/cmd/tk_get.md +++ b/docs/cmd/tk_get.md @@ -15,11 +15,10 @@ The get sub-commands print the statuses of sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_get_kustomizations.md b/docs/cmd/tk_get_kustomizations.md index 59a2ed96..90ad1d4f 100644 --- a/docs/cmd/tk_get_kustomizations.md +++ b/docs/cmd/tk_get_kustomizations.md @@ -19,11 +19,10 @@ tk get kustomizations [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_get_sources.md b/docs/cmd/tk_get_sources.md index c347234c..cea416e2 100644 --- a/docs/cmd/tk_get_sources.md +++ b/docs/cmd/tk_get_sources.md @@ -15,11 +15,10 @@ The get source sub-commands print the statuses of the sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_get_sources_git.md b/docs/cmd/tk_get_sources_git.md index e969c934..cc91d54a 100644 --- a/docs/cmd/tk_get_sources_git.md +++ b/docs/cmd/tk_get_sources_git.md @@ -19,11 +19,10 @@ tk get sources git [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_install.md b/docs/cmd/tk_install.md index a53629cb..18418220 100644 --- a/docs/cmd/tk_install.md +++ b/docs/cmd/tk_install.md @@ -15,33 +15,33 @@ tk install [flags] ``` # Install the latest version in the gitops-systems namespace - install --version=master --namespace=gitops-systems + tk install --version=master --namespace=gitops-systems # Dry-run install for a specific version and a series of components - install --dry-run --version=0.0.1 --components="source-controller,kustomize-controller" + tk install --dry-run --version=0.0.1 --components="source-controller,kustomize-controller" # Dry-run install with manifests preview - install --dry-run --verbose + tk install --dry-run --verbose ``` ### Options ``` - --dry-run only print the object that would be applied - -h, --help help for install - --manifests string path to the manifest directory, dev only - -v, --version string toolkit tag or branch (default "master") + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) + --dry-run only print the object that would be applied + -h, --help help for install + --manifests string path to the manifest directory, dev only + -v, --version string toolkit tag or branch (default "master") ``` ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_resume.md b/docs/cmd/tk_resume.md index a6e6636c..e6aac38f 100644 --- a/docs/cmd/tk_resume.md +++ b/docs/cmd/tk_resume.md @@ -15,11 +15,10 @@ The resume sub-commands resume a suspended resource. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_resume_kustomization.md b/docs/cmd/tk_resume_kustomization.md index abfdb8bc..8f2d3a55 100644 --- a/docs/cmd/tk_resume_kustomization.md +++ b/docs/cmd/tk_resume_kustomization.md @@ -20,11 +20,10 @@ tk resume kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_suspend.md b/docs/cmd/tk_suspend.md index 227ecc08..1cfd236a 100644 --- a/docs/cmd/tk_suspend.md +++ b/docs/cmd/tk_suspend.md @@ -15,11 +15,10 @@ The suspend sub-commands suspend the reconciliation of a resource. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_suspend_kustomization.md b/docs/cmd/tk_suspend_kustomization.md index dfa3df16..4906678e 100644 --- a/docs/cmd/tk_suspend_kustomization.md +++ b/docs/cmd/tk_suspend_kustomization.md @@ -19,11 +19,10 @@ tk suspend kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_sync.md b/docs/cmd/tk_sync.md index 8eefc5a7..27741738 100644 --- a/docs/cmd/tk_sync.md +++ b/docs/cmd/tk_sync.md @@ -15,11 +15,10 @@ The sync sub-commands trigger a reconciliation of sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_sync_kustomization.md b/docs/cmd/tk_sync_kustomization.md index 4318b9cf..9340e9e7 100644 --- a/docs/cmd/tk_sync_kustomization.md +++ b/docs/cmd/tk_sync_kustomization.md @@ -32,11 +32,10 @@ tk sync kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_sync_source.md b/docs/cmd/tk_sync_source.md index 339fdf02..2183af59 100644 --- a/docs/cmd/tk_sync_source.md +++ b/docs/cmd/tk_sync_source.md @@ -15,11 +15,10 @@ The sync source sub-commands trigger a reconciliation of sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_sync_source_git.md b/docs/cmd/tk_sync_source_git.md index c7386f55..e4bb0e75 100644 --- a/docs/cmd/tk_sync_source_git.md +++ b/docs/cmd/tk_sync_source_git.md @@ -27,11 +27,10 @@ tk sync source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO diff --git a/docs/cmd/tk_uninstall.md b/docs/cmd/tk_uninstall.md index fef37844..a98581f5 100644 --- a/docs/cmd/tk_uninstall.md +++ b/docs/cmd/tk_uninstall.md @@ -34,11 +34,10 @@ tk uninstall [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) - --kubeconfig string path to the kubeconfig file (default "~/.kube/config") - --namespace string the namespace scope for this operation (default "gitops-system") - --timeout duration timeout for this operation (default 5m0s) - --verbose print generated objects + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + --namespace string the namespace scope for this operation (default "gitops-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects ``` ### SEE ALSO