From badd2a102f694f0ee65ad06af516a64689847c73 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 18 Jun 2020 12:03:49 +0300 Subject: [PATCH] Generate bootstrap docs --- docs/cmd/tk.md | 2 +- docs/cmd/tk_bootstrap.md | 3 +- docs/cmd/tk_bootstrap_github.md | 10 ++++- docs/cmd/tk_bootstrap_gitlab.md | 66 ++++++++++++++++++++++++++++ docs/cmd/tk_check.md | 2 +- docs/cmd/tk_completion.md | 2 +- docs/cmd/tk_create.md | 2 +- docs/cmd/tk_create_kustomization.md | 2 +- docs/cmd/tk_create_source.md | 2 +- docs/cmd/tk_create_source_git.md | 4 +- docs/cmd/tk_delete.md | 2 +- docs/cmd/tk_delete_kustomization.md | 2 +- docs/cmd/tk_delete_source.md | 2 +- docs/cmd/tk_delete_source_git.md | 2 +- docs/cmd/tk_export.md | 2 +- docs/cmd/tk_export_kustomization.md | 2 +- docs/cmd/tk_export_source.md | 2 +- docs/cmd/tk_export_source_git.md | 2 +- docs/cmd/tk_get.md | 2 +- docs/cmd/tk_get_kustomizations.md | 2 +- docs/cmd/tk_get_sources.md | 2 +- docs/cmd/tk_get_sources_git.md | 2 +- docs/cmd/tk_install.md | 2 +- docs/cmd/tk_resume.md | 2 +- docs/cmd/tk_resume_kustomization.md | 2 +- docs/cmd/tk_suspend.md | 2 +- docs/cmd/tk_suspend_kustomization.md | 2 +- docs/cmd/tk_sync.md | 2 +- docs/cmd/tk_sync_kustomization.md | 2 +- docs/cmd/tk_sync_source.md | 2 +- docs/cmd/tk_sync_source_git.md | 2 +- docs/cmd/tk_uninstall.md | 11 ++--- docs/internal/release.md | 7 +-- 33 files changed, 113 insertions(+), 42 deletions(-) create mode 100644 docs/cmd/tk_bootstrap_gitlab.md diff --git a/docs/cmd/tk.md b/docs/cmd/tk.md index a957dea0..4381649d 100644 --- a/docs/cmd/tk.md +++ b/docs/cmd/tk.md @@ -90,4 +90,4 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way. * [tk sync](tk_sync.md) - Synchronize commands * [tk uninstall](tk_uninstall.md) - Uninstall the toolkit components -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_bootstrap.md b/docs/cmd/tk_bootstrap.md index 7d0990d7..09227700 100644 --- a/docs/cmd/tk_bootstrap.md +++ b/docs/cmd/tk_bootstrap.md @@ -27,5 +27,6 @@ Bootstrap commands * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [tk bootstrap github](tk_bootstrap_github.md) - Bootstrap GitHub repository +* [tk bootstrap gitlab](tk_bootstrap_gitlab.md) - Bootstrap GitLab repository -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_bootstrap_github.md b/docs/cmd/tk_bootstrap_github.md index 2210f60c..80c4bf65 100644 --- a/docs/cmd/tk_bootstrap_github.md +++ b/docs/cmd/tk_bootstrap_github.md @@ -24,6 +24,12 @@ tk bootstrap github [flags] # Run bootstrap for a private repo owned by a GitHub organization bootstrap github --owner= --repository= + # Run bootstrap for a private repo and assign organization teams to it + bootstrap github --owner= --repository= --team= --team= + + # Run bootstrap for a repository path + bootstrap github --owner= --repository= --path=dev-cluster + # Run bootstrap for a public repository on a personal account bootstrap github --owner= --repository= --private=false --personal=true @@ -39,9 +45,11 @@ tk bootstrap github [flags] --hostname string GitHub hostname (default "github.com") --interval duration sync interval (default 1m0s) --owner string GitHub user or organization name + --path string repository path, when specified the cluster sync will be scoped to this path --personal is personal repository --private is private repository (default true) --repository string GitHub repository name + --team stringArray GitHub team to be given maintainer access ``` ### Options inherited from parent commands @@ -59,4 +67,4 @@ tk bootstrap github [flags] * [tk bootstrap](tk_bootstrap.md) - Bootstrap commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_bootstrap_gitlab.md b/docs/cmd/tk_bootstrap_gitlab.md new file mode 100644 index 00000000..983ede4c --- /dev/null +++ b/docs/cmd/tk_bootstrap_gitlab.md @@ -0,0 +1,66 @@ +## tk bootstrap gitlab + +Bootstrap GitLab repository + +### Synopsis + + +The bootstrap command creates the GitHub repository if it doesn't exists and +commits the toolkit components manifests to the master branch. +Then it configure the target cluster to synchronize with the repository. +If the toolkit components are present on the cluster, +the bootstrap command will perform an upgrade if needed. + +``` +tk bootstrap gitlab [flags] +``` + +### Examples + +``` + # Create a GitLab API token and export it as an env var + export GITLAB_TOKEN= + + # Run bootstrap for a private repo owned by a GitLab group + bootstrap gitlab --owner= --repository= + + # Run bootstrap for a repository path + bootstrap gitlab --owner= --repository= --path=dev-cluster + + # Run bootstrap for a public repository on a personal account + bootstrap gitlab --owner= --repository= --private=false --personal=true + + # Run bootstrap for a private repo hosted on GitLab server + bootstrap gitlab --owner= --repository= --hostname= + +``` + +### Options + +``` + -h, --help help for gitlab + --hostname string GitLab hostname (default "gitlab.com") + --interval duration sync interval (default 1m0s) + --owner string GitLab user or organization name + --path string repository path, when specified the cluster sync will be scoped to this path + --personal is personal repository + --private is private repository (default true) + --repository string GitLab repository name +``` + +### Options inherited from parent commands + +``` + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 + --version string toolkit tag or branch (default "master") +``` + +### SEE ALSO + +* [tk bootstrap](tk_bootstrap.md) - Bootstrap commands + +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_check.md b/docs/cmd/tk_check.md index 3f065592..de378dc8 100644 --- a/docs/cmd/tk_check.md +++ b/docs/cmd/tk_check.md @@ -44,4 +44,4 @@ tk check [flags] * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_completion.md b/docs/cmd/tk_completion.md index 14f7c146..904dbedf 100644 --- a/docs/cmd/tk_completion.md +++ b/docs/cmd/tk_completion.md @@ -44,4 +44,4 @@ To configure your bash shell to load completions for each session add to your ba * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_create.md b/docs/cmd/tk_create.md index 286a204c..4441d63d 100644 --- a/docs/cmd/tk_create.md +++ b/docs/cmd/tk_create.md @@ -30,4 +30,4 @@ Create commands * [tk create kustomization](tk_create_kustomization.md) - Create or update a kustomization resource * [tk create source](tk_create_source.md) - Create source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md index 6cfb8f84..1242decb 100644 --- a/docs/cmd/tk_create_kustomization.md +++ b/docs/cmd/tk_create_kustomization.md @@ -78,4 +78,4 @@ tk create kustomization [name] [flags] * [tk create](tk_create.md) - Create commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_create_source.md b/docs/cmd/tk_create_source.md index 4d2559a6..e4566e02 100644 --- a/docs/cmd/tk_create_source.md +++ b/docs/cmd/tk_create_source.md @@ -29,4 +29,4 @@ Create source commands * [tk create](tk_create.md) - Create commands * [tk create source git](tk_create_source_git.md) - Create or update a git source -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_create_source_git.md b/docs/cmd/tk_create_source_git.md index b6d2687b..2ab78045 100644 --- a/docs/cmd/tk_create_source_git.md +++ b/docs/cmd/tk_create_source_git.md @@ -58,7 +58,7 @@ tk create source git [name] [flags] --branch string git branch (default "master") -h, --help help for git -p, --password string basic authentication password - --ssh-ecdsa-curve ecdsaCurve SSH ECDSA public key curve (p521, p256, p384) (default p384) + --ssh-ecdsa-curve ecdsaCurve SSH ECDSA public key curve (p256, p384, p521) (default p384) --ssh-key-algorithm publicKeyAlgorithm SSH public key algorithm (rsa, ecdsa, ed25519) (default rsa) --ssh-rsa-bits rsaKeyBits SSH RSA public key bit size (multiplies of 8) (default 2048) --tag string git tag @@ -83,4 +83,4 @@ tk create source git [name] [flags] * [tk create source](tk_create_source.md) - Create source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_delete.md b/docs/cmd/tk_delete.md index 09d149fc..438aaf65 100644 --- a/docs/cmd/tk_delete.md +++ b/docs/cmd/tk_delete.md @@ -29,4 +29,4 @@ Delete commands * [tk delete kustomization](tk_delete_kustomization.md) - Delete kustomization * [tk delete source](tk_delete_source.md) - Delete sources commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_delete_kustomization.md b/docs/cmd/tk_delete_kustomization.md index be27ba4a..4cc8db77 100644 --- a/docs/cmd/tk_delete_kustomization.md +++ b/docs/cmd/tk_delete_kustomization.md @@ -31,4 +31,4 @@ tk delete kustomization [name] [flags] * [tk delete](tk_delete.md) - Delete commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_delete_source.md b/docs/cmd/tk_delete_source.md index 0aaac494..78184fac 100644 --- a/docs/cmd/tk_delete_source.md +++ b/docs/cmd/tk_delete_source.md @@ -28,4 +28,4 @@ Delete sources commands * [tk delete](tk_delete.md) - Delete commands * [tk delete source git](tk_delete_source_git.md) - Delete git source -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_delete_source_git.md b/docs/cmd/tk_delete_source_git.md index 45b5c40e..57b315fd 100644 --- a/docs/cmd/tk_delete_source_git.md +++ b/docs/cmd/tk_delete_source_git.md @@ -31,4 +31,4 @@ tk delete source git [name] [flags] * [tk delete source](tk_delete_source.md) - Delete sources commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_export.md b/docs/cmd/tk_export.md index b9675062..fe894afa 100644 --- a/docs/cmd/tk_export.md +++ b/docs/cmd/tk_export.md @@ -29,4 +29,4 @@ Export commands * [tk export kustomization](tk_export_kustomization.md) - Export kustomization in YAML format * [tk export source](tk_export_source.md) - Export source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_export_kustomization.md b/docs/cmd/tk_export_kustomization.md index b1383578..f855247a 100644 --- a/docs/cmd/tk_export_kustomization.md +++ b/docs/cmd/tk_export_kustomization.md @@ -42,4 +42,4 @@ tk export kustomization [name] [flags] * [tk export](tk_export.md) - Export commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_export_source.md b/docs/cmd/tk_export_source.md index c9fed0ab..638dbea3 100644 --- a/docs/cmd/tk_export_source.md +++ b/docs/cmd/tk_export_source.md @@ -29,4 +29,4 @@ Export source commands * [tk export](tk_export.md) - Export commands * [tk export source git](tk_export_source_git.md) - Export git sources in YAML format -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_export_source_git.md b/docs/cmd/tk_export_source_git.md index 222aca9e..5d41f1bb 100644 --- a/docs/cmd/tk_export_source_git.md +++ b/docs/cmd/tk_export_source_git.md @@ -43,4 +43,4 @@ tk export source git [name] [flags] * [tk export source](tk_export_source.md) - Export source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_get.md b/docs/cmd/tk_get.md index 4ed527cf..afcf9f31 100644 --- a/docs/cmd/tk_get.md +++ b/docs/cmd/tk_get.md @@ -28,4 +28,4 @@ Get commands * [tk get kustomizations](tk_get_kustomizations.md) - Get kustomizations status * [tk get sources](tk_get_sources.md) - Get sources commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_get_kustomizations.md b/docs/cmd/tk_get_kustomizations.md index e41c66e5..c7386fa0 100644 --- a/docs/cmd/tk_get_kustomizations.md +++ b/docs/cmd/tk_get_kustomizations.md @@ -31,4 +31,4 @@ tk get kustomizations [flags] * [tk get](tk_get.md) - Get commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_get_sources.md b/docs/cmd/tk_get_sources.md index c5a31c8c..b70d4224 100644 --- a/docs/cmd/tk_get_sources.md +++ b/docs/cmd/tk_get_sources.md @@ -27,4 +27,4 @@ Get sources commands * [tk get](tk_get.md) - Get commands * [tk get sources git](tk_get_sources_git.md) - Get git sources status -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_get_sources_git.md b/docs/cmd/tk_get_sources_git.md index 630ab8c6..6a26f86b 100644 --- a/docs/cmd/tk_get_sources_git.md +++ b/docs/cmd/tk_get_sources_git.md @@ -31,4 +31,4 @@ tk get sources git [flags] * [tk get sources](tk_get_sources.md) - Get sources commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_install.md b/docs/cmd/tk_install.md index 0da21720..7b077b31 100644 --- a/docs/cmd/tk_install.md +++ b/docs/cmd/tk_install.md @@ -49,4 +49,4 @@ tk install [flags] * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_resume.md b/docs/cmd/tk_resume.md index 5127bb75..81c23458 100644 --- a/docs/cmd/tk_resume.md +++ b/docs/cmd/tk_resume.md @@ -27,4 +27,4 @@ Resume commands * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [tk resume kustomization](tk_resume_kustomization.md) - Resume kustomization -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_resume_kustomization.md b/docs/cmd/tk_resume_kustomization.md index a0de59ba..180bc8d1 100644 --- a/docs/cmd/tk_resume_kustomization.md +++ b/docs/cmd/tk_resume_kustomization.md @@ -30,4 +30,4 @@ tk resume kustomization [name] [flags] * [tk resume](tk_resume.md) - Resume commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_suspend.md b/docs/cmd/tk_suspend.md index b15f0e89..d99a4ddf 100644 --- a/docs/cmd/tk_suspend.md +++ b/docs/cmd/tk_suspend.md @@ -27,4 +27,4 @@ Suspend commands * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines * [tk suspend kustomization](tk_suspend_kustomization.md) - Suspend kustomization -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_suspend_kustomization.md b/docs/cmd/tk_suspend_kustomization.md index 50844a5f..eaaf8c60 100644 --- a/docs/cmd/tk_suspend_kustomization.md +++ b/docs/cmd/tk_suspend_kustomization.md @@ -30,4 +30,4 @@ tk suspend kustomization [name] [flags] * [tk suspend](tk_suspend.md) - Suspend commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_sync.md b/docs/cmd/tk_sync.md index 25351c40..df50a411 100644 --- a/docs/cmd/tk_sync.md +++ b/docs/cmd/tk_sync.md @@ -28,4 +28,4 @@ Synchronize commands * [tk sync kustomization](tk_sync_kustomization.md) - Synchronize kustomization * [tk sync source](tk_sync_source.md) - Synchronize source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_sync_kustomization.md b/docs/cmd/tk_sync_kustomization.md index 24b06fc8..47c2a65d 100644 --- a/docs/cmd/tk_sync_kustomization.md +++ b/docs/cmd/tk_sync_kustomization.md @@ -43,4 +43,4 @@ tk sync kustomization [name] [flags] * [tk sync](tk_sync.md) - Synchronize commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_sync_source.md b/docs/cmd/tk_sync_source.md index 35ba621f..7343d584 100644 --- a/docs/cmd/tk_sync_source.md +++ b/docs/cmd/tk_sync_source.md @@ -27,4 +27,4 @@ Synchronize source commands * [tk sync](tk_sync.md) - Synchronize commands * [tk sync source git](tk_sync_source_git.md) - Synchronize git source -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_sync_source_git.md b/docs/cmd/tk_sync_source_git.md index a08420c8..cf4cf226 100644 --- a/docs/cmd/tk_sync_source_git.md +++ b/docs/cmd/tk_sync_source_git.md @@ -39,4 +39,4 @@ tk sync source git [name] [flags] * [tk sync source](tk_sync_source.md) - Synchronize source commands -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/cmd/tk_uninstall.md b/docs/cmd/tk_uninstall.md index 467ddeb3..1e7e5f25 100644 --- a/docs/cmd/tk_uninstall.md +++ b/docs/cmd/tk_uninstall.md @@ -26,10 +26,11 @@ tk uninstall [flags] ### Options ``` - --crds removes all CRDs previously installed - --dry-run only print the object that would be deleted - -h, --help help for uninstall - -s, --silent delete components without asking for confirmation + --crds removes all CRDs previously installed + --dry-run only print the object that would be deleted + -h, --help help for uninstall + --kustomizations removes all kustomizations previously installed + -s, --silent delete components without asking for confirmation ``` ### Options inherited from parent commands @@ -46,4 +47,4 @@ tk uninstall [flags] * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines -###### Auto generated by spf13/cobra on 9-Jun-2020 +###### Auto generated by spf13/cobra on 18-Jun-2020 diff --git a/docs/internal/release.md b/docs/internal/release.md index 987c2e3c..fde81cae 100644 --- a/docs/internal/release.md +++ b/docs/internal/release.md @@ -2,11 +2,6 @@ To release a new version the following steps should be followed: -1. Create a new branch from `master` i.e. `release-`. This - will function as your release preparation branch. -1. Change the `VERSION` value in `cmd/tk/main.go` to that of the - semver release you are going to make. Commit and push your changes. -1. Create a PR for your release branch and get it merged into `master`. -1. Create a `` tag for the merge commit in `master` and +1. Create a `` tag form `master` and push it to remote. 1. Confirm CI builds and releases the newly tagged version.