diff --git a/docs/cmd/tk_bootstrap_github.md b/docs/cmd/tk_bootstrap_github.md index df7c34f4d5b2a1748ee1f7eef73452a311398e99..3aa71ad630d233e693777e4d9e54d942c6605773 100644 --- a/docs/cmd/tk_bootstrap_github.md +++ b/docs/cmd/tk_bootstrap_github.md @@ -21,19 +21,19 @@ tk bootstrap github [flags] export GITHUB_TOKEN=<my-token> # Run bootstrap for a private repo owned by a GitHub organization - bootstrap github --owner=<organization> --repository=<repo name> + tk bootstrap github --owner=<organization> --repository=<repo name> # Run bootstrap for a private repo and assign organization teams to it - bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug> + tk bootstrap github --owner=<organization> --repository=<repo name> --team=<team1 slug> --team=<team2 slug> # Run bootstrap for a repository path - bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster + tk bootstrap github --owner=<organization> --repository=<repo name> --path=dev-cluster # Run bootstrap for a public repository on a personal account - bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true + tk bootstrap github --owner=<user> --repository=<repo name> --private=false --personal=true # Run bootstrap for a private repo hosted on GitHub Enterprise - bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> + tk bootstrap github --owner=<organization> --repository=<repo name> --hostname=<domain> ``` diff --git a/docs/cmd/tk_bootstrap_gitlab.md b/docs/cmd/tk_bootstrap_gitlab.md index 5b0cda8b7c57df1680368e88e3e8129f3e1f45be..0502838bca0c00d97dd1d515e6177138aed84b30 100644 --- a/docs/cmd/tk_bootstrap_gitlab.md +++ b/docs/cmd/tk_bootstrap_gitlab.md @@ -21,16 +21,16 @@ tk bootstrap gitlab [flags] export GITLAB_TOKEN=<my-token> # Run bootstrap for a private repo owned by a GitLab group - bootstrap gitlab --owner=<group> --repository=<repo name> + tk bootstrap gitlab --owner=<group> --repository=<repo name> # Run bootstrap for a repository path - bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster + tk bootstrap gitlab --owner=<group> --repository=<repo name> --path=dev-cluster # Run bootstrap for a public repository on a personal account - bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true + tk bootstrap gitlab --owner=<user> --repository=<repo name> --private=false --personal=true # Run bootstrap for a private repo hosted on a GitLab server - bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> + tk bootstrap gitlab --owner=<group> --repository=<repo name> --hostname=<domain> ``` diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md index 18464d4621ac5c3369434afbe5e4ec39db551be7..0523a5f4b701b1851600607c4317653588ccdd5d 100644 --- a/docs/cmd/tk_create_kustomization.md +++ b/docs/cmd/tk_create_kustomization.md @@ -14,7 +14,7 @@ tk create kustomization [name] [flags] ``` # Create a Kustomization resource from a source at a given path - create kustomization contour \ + tk create kustomization contour \ --source=contour \ --path="./examples/contour/" \ --prune=true \ @@ -25,7 +25,7 @@ tk create kustomization [name] [flags] --health-check-timeout=3m # Create a Kustomization resource that depends on the previous one - create kustomization webapp \ + tk create kustomization webapp \ --depends-on=contour \ --source=webapp \ --path="./deploy/overlays/dev" \ @@ -34,7 +34,7 @@ tk create kustomization [name] [flags] --validation=client # Create a Kustomization resource that runs under a service account - create kustomization webapp \ + tk create kustomization webapp \ --source=webapp \ --path="./deploy/overlays/staging" \ --prune=true \ diff --git a/docs/cmd/tk_create_source.md b/docs/cmd/tk_create_source.md index 796c3161fbb016be3c17d0db2b90676fb0671423..170694c9bdd5feb72f56930dc86f78181015884e 100644 --- a/docs/cmd/tk_create_source.md +++ b/docs/cmd/tk_create_source.md @@ -27,4 +27,5 @@ The create source sub-commands generate sources. * [tk create](tk_create.md) - Create or update sources and resources * [tk create source git](tk_create_source_git.md) - Create or update a GitRepository source +* [tk create source helm](tk_create_source_helm.md) - Create or update a HelmRepository source diff --git a/docs/cmd/tk_create_source_git.md b/docs/cmd/tk_create_source_git.md index 825ff472b01f203e875a14a4b2784f4d5c106684..d7d55525a4e01692433105946586e123b14bc4aa 100644 --- a/docs/cmd/tk_create_source_git.md +++ b/docs/cmd/tk_create_source_git.md @@ -17,35 +17,35 @@ tk create source git [name] [flags] ``` # Create a source from a public Git repository master branch - create source git podinfo \ + tk create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --branch=master # Create a source from a Git repository pinned to specific git tag - create source git podinfo \ + tk create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --tag="3.2.3" # Create a source from a public Git repository tag that matches a semver range - create source git podinfo \ + tk create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --tag-semver=">=3.2.0 <3.3.0" # Create a source from a Git repository using SSH authentication - create source git podinfo \ + tk create source git podinfo \ --url=ssh://git@github.com/stefanprodan/podinfo \ --branch=master # Create a source from a Git repository using SSH authentication and an # ECDSA P-521 curve public key - create source git podinfo \ + tk create source git podinfo \ --url=ssh://git@github.com/stefanprodan/podinfo \ --branch=master \ --ssh-key-algorithm=ecdsa \ --ssh-ecdsa-curve=p521 # Create a source from a Git repository using basic authentication - create source git podinfo \ + tk create source git podinfo \ --url=https://github.com/stefanprodan/podinfo \ --username=username \ --password=password diff --git a/docs/cmd/tk_create_source_helm.md b/docs/cmd/tk_create_source_helm.md new file mode 100644 index 0000000000000000000000000000000000000000..3c7b361d062228546a509f2f8db2e5dd4c0a7712 --- /dev/null +++ b/docs/cmd/tk_create_source_helm.md @@ -0,0 +1,54 @@ +## tk create source helm + +Create or update a HelmRepository source + +### Synopsis + + +The create source helm command generates a HelmRepository resource and waits for it to fetch the index. +For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret. + +``` +tk create source helm [name] [flags] +``` + +### Examples + +``` + # Create a source from a public Helm repository + tk create source helm podinfo \ + --url=https://stefanprodan.github.io/podinfo \ + --interval=10m + + # Create a source from a Helm repository using basic authentication + tk create source helm podinfo \ + --url=https://stefanprodan.github.io/podinfo \ + --username=username \ + --password=password + +``` + +### Options + +``` + -h, --help help for helm + -p, --password string basic authentication password + --url string Helm repository address + -u, --username string basic authentication username +``` + +### Options inherited from parent commands + +``` + --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 + +* [tk create source](tk_create_source.md) - Create or update sources + diff --git a/docs/cmd/tk_delete_kustomization.md b/docs/cmd/tk_delete_kustomization.md index f4ee36744abfaf0e1b4f46dc51821e8a630495ef..12465377ba9478db8810551f7fd3d481d7627e1f 100644 --- a/docs/cmd/tk_delete_kustomization.md +++ b/docs/cmd/tk_delete_kustomization.md @@ -10,6 +10,14 @@ The delete kustomization command deletes the given Kustomization from the cluste tk delete kustomization [name] [flags] ``` +### Examples + +``` + # Delete a kustomization and the Kubernetes resources created by it + tk delete kustomization podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_delete_source.md b/docs/cmd/tk_delete_source.md index 1d81169c36907970b9f03cbdbb92244d2ca12fca..10ceb172166b9bbda1a2129145a089c9101fe41b 100644 --- a/docs/cmd/tk_delete_source.md +++ b/docs/cmd/tk_delete_source.md @@ -26,4 +26,5 @@ The delete source sub-commands delete sources. * [tk delete](tk_delete.md) - Delete sources and resources * [tk delete source git](tk_delete_source_git.md) - Delete a GitRepository source +* [tk delete source helm](tk_delete_source_helm.md) - Delete a HelmRepository source diff --git a/docs/cmd/tk_delete_source_git.md b/docs/cmd/tk_delete_source_git.md index b6952af98fdf7a9541b7b393145fc1f4c21ffe18..81447b2f35d7afb2ddce6284487d3c556363a385 100644 --- a/docs/cmd/tk_delete_source_git.md +++ b/docs/cmd/tk_delete_source_git.md @@ -10,6 +10,14 @@ The delete source git command deletes the given GitRepository from the cluster. tk delete source git [name] [flags] ``` +### Examples + +``` + # Delete a Git repository + tk delete source git podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_delete_source_helm.md b/docs/cmd/tk_delete_source_helm.md new file mode 100644 index 0000000000000000000000000000000000000000..18daa63f6b5c8d27cfaf9f723c99686afb7c4f66 --- /dev/null +++ b/docs/cmd/tk_delete_source_helm.md @@ -0,0 +1,40 @@ +## tk delete source helm + +Delete a HelmRepository source + +### Synopsis + +The delete source helm command deletes the given HelmRepository from the cluster. + +``` +tk delete source helm [name] [flags] +``` + +### Examples + +``` + # Delete a Helm repository + tk delete source helm podinfo + +``` + +### Options + +``` + -h, --help help for helm +``` + +### Options inherited from parent commands + +``` + --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 + +* [tk delete source](tk_delete_source.md) - Delete sources + diff --git a/docs/cmd/tk_export_kustomization.md b/docs/cmd/tk_export_kustomization.md index bf2eaa1861ab1412e0cb118f40bfbdb1cb9c448a..eed9414ba583e8726709fe5c6807addef4578820 100644 --- a/docs/cmd/tk_export_kustomization.md +++ b/docs/cmd/tk_export_kustomization.md @@ -14,10 +14,10 @@ tk export kustomization [name] [flags] ``` # Export all Kustomization resources - export kustomization --all > kustomizations.yaml + tk export kustomization --all > kustomizations.yaml # Export a Kustomization - export kustomization my-app > kustomization.yaml + tk export kustomization my-app > kustomization.yaml ``` diff --git a/docs/cmd/tk_export_source.md b/docs/cmd/tk_export_source.md index a40675168ffa973f0fe8e267f9f9e900a1e452d5..06aa18d576720737695e234eb9765c8e573c19ff 100644 --- a/docs/cmd/tk_export_source.md +++ b/docs/cmd/tk_export_source.md @@ -27,4 +27,5 @@ The export source sub-commands export sources in YAML format. * [tk export](tk_export.md) - Export resources in YAML format * [tk export source git](tk_export_source_git.md) - Export GitRepository sources in YAML format +* [tk export source helm](tk_export_source_helm.md) - Export HelmRepository sources in YAML format diff --git a/docs/cmd/tk_export_source_git.md b/docs/cmd/tk_export_source_git.md index 0f35ae2159cb3b1b91f7c0b84b7dc91a3b0cf4fc..cba6b379d1c32ab20deffefc16eabb04ddf7bd5a 100644 --- a/docs/cmd/tk_export_source_git.md +++ b/docs/cmd/tk_export_source_git.md @@ -14,10 +14,10 @@ tk export source git [name] [flags] ``` # Export all GitRepository sources - export source git --all > sources.yaml + tk export source git --all > sources.yaml # Export a GitRepository source including the SSH key pair or basic auth credentials - export source git my-private-repo --with-credentials > source.yaml + tk export source git my-private-repo --with-credentials > source.yaml ``` diff --git a/docs/cmd/tk_export_source_helm.md b/docs/cmd/tk_export_source_helm.md new file mode 100644 index 0000000000000000000000000000000000000000..1561ecf9dfe0df2d1b9c250b211f768ccab5bd1c --- /dev/null +++ b/docs/cmd/tk_export_source_helm.md @@ -0,0 +1,44 @@ +## tk export source helm + +Export HelmRepository sources in YAML format + +### Synopsis + +The export source git command exports on or all HelmRepository sources in YAML format. + +``` +tk export source helm [name] [flags] +``` + +### Examples + +``` + # Export all HelmRepository sources + tk export source helm --all > sources.yaml + + # Export a HelmRepository source including the basic auth credentials + tk export source helm my-private-repo --with-credentials > source.yaml + +``` + +### Options + +``` + -h, --help help for helm +``` + +### Options inherited from parent commands + +``` + --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 + +* [tk export source](tk_export_source.md) - Export sources + diff --git a/docs/cmd/tk_get.md b/docs/cmd/tk_get.md index 49f4a28064e20af63336c66ae095fc225fd714c3..fa42a9f4b49c1fc38e4248336b439ef973a159f1 100644 --- a/docs/cmd/tk_get.md +++ b/docs/cmd/tk_get.md @@ -24,6 +24,6 @@ The get sub-commands print the statuses of sources and resources. ### SEE ALSO * [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines -* [tk get kustomizations](tk_get_kustomizations.md) - Get Kustomization source statuses +* [tk get kustomizations](tk_get_kustomizations.md) - Get Kustomization statuses * [tk get sources](tk_get_sources.md) - Get source statuses diff --git a/docs/cmd/tk_get_kustomizations.md b/docs/cmd/tk_get_kustomizations.md index 90ad1d4ffa032d07a3cfe28b4c4ef639320f1586..b82d5234a5bbfd97f4d9d3cd2f58a3797c5db749 100644 --- a/docs/cmd/tk_get_kustomizations.md +++ b/docs/cmd/tk_get_kustomizations.md @@ -1,6 +1,6 @@ ## tk get kustomizations -Get Kustomization source statuses +Get Kustomization statuses ### Synopsis @@ -10,6 +10,14 @@ The get kustomizations command prints the statuses of the resources. tk get kustomizations [flags] ``` +### Examples + +``` + # List all kustomizations and their status + tk get kustomizations + +``` + ### Options ``` diff --git a/docs/cmd/tk_get_sources.md b/docs/cmd/tk_get_sources.md index cea416e2bb934c11ca74af114df0bf1659c1ae72..0d867e4a0df8cc7c2f088248369d23cd19d00a3d 100644 --- a/docs/cmd/tk_get_sources.md +++ b/docs/cmd/tk_get_sources.md @@ -25,4 +25,5 @@ The get source sub-commands print the statuses of the sources. * [tk get](tk_get.md) - Get sources and resources * [tk get sources git](tk_get_sources_git.md) - Get GitRepository source statuses +* [tk get sources helm](tk_get_sources_helm.md) - Get HelmRepository source statuses diff --git a/docs/cmd/tk_get_sources_git.md b/docs/cmd/tk_get_sources_git.md index cc91d54aa1ccfae8d54df04debdf2860adae801c..41e64fc03317620846550480322d2d264ae86079 100644 --- a/docs/cmd/tk_get_sources_git.md +++ b/docs/cmd/tk_get_sources_git.md @@ -10,6 +10,14 @@ The get sources git command prints the status of the GitRepository sources. tk get sources git [flags] ``` +### Examples + +``` + # List all Git repositories and their status + tk get sources git + +``` + ### Options ``` diff --git a/docs/cmd/tk_get_sources_helm.md b/docs/cmd/tk_get_sources_helm.md new file mode 100644 index 0000000000000000000000000000000000000000..198f3c7b860494ecc6f091562091758f1d5bfd19 --- /dev/null +++ b/docs/cmd/tk_get_sources_helm.md @@ -0,0 +1,39 @@ +## tk get sources helm + +Get HelmRepository source statuses + +### Synopsis + +The get sources helm command prints the status of the HelmRepository sources. + +``` +tk get sources helm [flags] +``` + +### Examples + +``` + # List all Helm repositories and their status + tk get sources helm + +``` + +### Options + +``` + -h, --help help for helm +``` + +### Options inherited from parent commands + +``` + --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 + +* [tk get sources](tk_get_sources.md) - Get source statuses + diff --git a/docs/cmd/tk_reconcile_source_helm.md b/docs/cmd/tk_reconcile_source_helm.md index 3f884990559aa8a8b55fecd8097d5713bb6e8ae3..b5ba734c559703d2511775cdbba4c9856e4d6ffa 100644 --- a/docs/cmd/tk_reconcile_source_helm.md +++ b/docs/cmd/tk_reconcile_source_helm.md @@ -13,7 +13,7 @@ tk reconcile source helm [name] [flags] ### Examples ``` - # Trigger a helm repo update for an existing source + # Trigger a reconciliation for an existing source tk reconcile source helm podinfo ``` diff --git a/docs/cmd/tk_resume_helmrelease.md b/docs/cmd/tk_resume_helmrelease.md index 7d5269846bd6c95e10d1cbf98dcb8c96a0037ec5..d365961bcb9f57a5726a88cfc0dbb7d49169a15b 100644 --- a/docs/cmd/tk_resume_helmrelease.md +++ b/docs/cmd/tk_resume_helmrelease.md @@ -11,6 +11,14 @@ finish the apply. tk resume helmrelease [name] [flags] ``` +### Examples + +``` + # Resume reconciliation for an existing Helm release + tk resume hr podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_resume_kustomization.md b/docs/cmd/tk_resume_kustomization.md index 8f2d3a555a70d10ec02274c31c326fddcc88723d..5f16f38798923d68e6f31f41228a4d7f93e8a727 100644 --- a/docs/cmd/tk_resume_kustomization.md +++ b/docs/cmd/tk_resume_kustomization.md @@ -11,6 +11,14 @@ finish the apply. tk resume kustomization [name] [flags] ``` +### Examples + +``` + # Resume reconciliation for an existing Kustomization + tk resume ks podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_suspend_helmrelease.md b/docs/cmd/tk_suspend_helmrelease.md index 45a2f11aade6a76f6b5f61196397c44ffbf08f2e..65029bcc330e0b107e618536b6d976e9e841a0bb 100644 --- a/docs/cmd/tk_suspend_helmrelease.md +++ b/docs/cmd/tk_suspend_helmrelease.md @@ -10,6 +10,14 @@ The suspend command disables the reconciliation of a HelmRelease resource. tk suspend helmrelease [name] [flags] ``` +### Examples + +``` + # Suspend reconciliation for an existing Helm release + tk suspend hr podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_suspend_kustomization.md b/docs/cmd/tk_suspend_kustomization.md index 4906678e264783f82575c9a372600d103d776595..0df77d106b38f4bb5d04b0e11da4a30885ddfd13 100644 --- a/docs/cmd/tk_suspend_kustomization.md +++ b/docs/cmd/tk_suspend_kustomization.md @@ -10,6 +10,14 @@ The suspend command disables the reconciliation of a Kustomization resource. tk suspend kustomization [name] [flags] ``` +### Examples + +``` + # Suspend reconciliation for an existing Kustomization + tk suspend ks podinfo + +``` + ### Options ``` diff --git a/docs/cmd/tk_uninstall.md b/docs/cmd/tk_uninstall.md index a98581f5d3999e70dd4c22e722e1c969d8de2873..c264377401e198d51a8c3b4fd33dab535864cf9b 100644 --- a/docs/cmd/tk_uninstall.md +++ b/docs/cmd/tk_uninstall.md @@ -14,10 +14,10 @@ tk uninstall [flags] ``` # Dry-run uninstall of all components - uninstall --dry-run --namespace=gitops-system + tk uninstall --dry-run --namespace=gitops-system # Uninstall all components and delete custom resource definitions - uninstall --crds --namespace=gitops-system + tk uninstall --crds --namespace=gitops-system ``` diff --git a/docs/get-started/index.md b/docs/get-started/index.md index 06a7edea653b8bd803a66e480096d54bb0799c26..8ace250dc309dee991e7cb5e6bd9646fa8964428 100644 --- a/docs/get-started/index.md +++ b/docs/get-started/index.md @@ -227,7 +227,7 @@ If you delete a kustomization from the `fleet-infra` repo, the reconciler will r were previously applied from that kustomization. If you alter the webapp deployment using `kubectl edit`, the changes will be reverted to match -the state described in git. When dealing with an incident, you can pause the recitation of a +the state described in git. When dealing with an incident, you can pause the reconciliation of a kustomization with `tk suspend kustomization <name>`. Once the debugging session is over, you can re-enable the reconciliation with `tk resume kustomization <name>`. diff --git a/mkdocs.yml b/mkdocs.yml index 299b039409f64098523c21d6fbff79fa3a21a69d..dbee6ccee925429bce6a3460b7327aa137c35c4a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,18 +75,22 @@ nav: - Create kustomization: cmd/tk_create_kustomization.md - Create source: cmd/tk_create_source.md - Create source git: cmd/tk_create_source_git.md + - Create source helm: cmd/tk_create_source_helm.md - Delete: cmd/tk_delete.md - Delete kustomization: cmd/tk_delete_kustomization.md - Delete source: cmd/tk_delete_source.md - Delete source git: cmd/tk_delete_source_git.md + - Delete source helm: cmd/tk_delete_source_helm.md - Export: cmd/tk_export.md - Export kustomization: cmd/tk_export_kustomization.md - Export source: cmd/tk_export_source.md - Export source git: cmd/tk_export_source_git.md + - Export source helm: cmd/tk_export_source_helm.md - Get: cmd/tk_get.md - Get kustomizations: cmd/tk_get_kustomizations.md - Get sources: cmd/tk_get_sources.md - Get sources git: cmd/tk_get_sources_git.md + - Get sources helm: cmd/tk_get_sources_helm.md - Install: cmd/tk_install.md - Resume: cmd/tk_resume.md - Resume kustomization: cmd/tk_resume_kustomization.md