diff --git a/docs/cmd/tk_bootstrap_github.md b/docs/cmd/tk_bootstrap_github.md index df7c34f4..3aa71ad6 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= # Run bootstrap for a private repo owned by a GitHub organization - bootstrap github --owner= --repository= + tk bootstrap github --owner= --repository= # Run bootstrap for a private repo and assign organization teams to it - bootstrap github --owner= --repository= --team= --team= + tk bootstrap github --owner= --repository= --team= --team= # Run bootstrap for a repository path - bootstrap github --owner= --repository= --path=dev-cluster + tk 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 + tk bootstrap github --owner= --repository= --private=false --personal=true # Run bootstrap for a private repo hosted on GitHub Enterprise - bootstrap github --owner= --repository= --hostname= + tk bootstrap github --owner= --repository= --hostname= ``` diff --git a/docs/cmd/tk_bootstrap_gitlab.md b/docs/cmd/tk_bootstrap_gitlab.md index 5b0cda8b..0502838b 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= # Run bootstrap for a private repo owned by a GitLab group - bootstrap gitlab --owner= --repository= + tk bootstrap gitlab --owner= --repository= # Run bootstrap for a repository path - bootstrap gitlab --owner= --repository= --path=dev-cluster + tk 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 + tk bootstrap gitlab --owner= --repository= --private=false --personal=true # Run bootstrap for a private repo hosted on a GitLab server - bootstrap gitlab --owner= --repository= --hostname= + tk bootstrap gitlab --owner= --repository= --hostname= ``` diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md index 18464d46..0523a5f4 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 796c3161..170694c9 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 825ff472..d7d55525 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 00000000..3c7b361d --- /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 f4ee3674..12465377 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 1d81169c..10ceb172 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 b6952af9..81447b2f 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 00000000..18daa63f --- /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 bf2eaa18..eed9414b 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 a4067516..06aa18d5 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 0f35ae21..cba6b379 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 00000000..1561ecf9 --- /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 49f4a280..fa42a9f4 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 90ad1d4f..b82d5234 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 cea416e2..0d867e4a 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 cc91d54a..41e64fc0 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 00000000..198f3c7b --- /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 3f884990..b5ba734c 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 7d526984..d365961b 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 8f2d3a55..5f16f387 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 45a2f11a..65029bcc 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 4906678e..0df77d10 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 a98581f5..c2643774 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 06a7edea..8ace250d 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 `. Once the debugging session is over, you can re-enable the reconciliation with `tk resume kustomization `. diff --git a/mkdocs.yml b/mkdocs.yml index 299b0394..dbee6cce 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