From 28101c809d5322481a7cb61f71a92271f234f8c4 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 30 Apr 2020 17:24:11 +0300 Subject: [PATCH 1/3] manifests: update source-controller to v0.0.1-alpha.5 --- manifests/bases/source-controller/kustomization.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/bases/source-controller/kustomization.yaml b/manifests/bases/source-controller/kustomization.yaml index 16b39be1..1913029c 100644 --- a/manifests/bases/source-controller/kustomization.yaml +++ b/manifests/bases/source-controller/kustomization.yaml @@ -1,5 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- github.com/fluxcd/source-controller/config//crd?ref=v0.0.1-alpha.3 -- github.com/fluxcd/source-controller/config//manager?ref=v0.0.1-alpha.3 +- github.com/fluxcd/source-controller/config//crd?ref=v0.0.1-alpha.5 +- github.com/fluxcd/source-controller/config//manager?ref=v0.0.1-alpha.5 From be3f65d800ffd809db2e501848567d6e51f6b333 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 30 Apr 2020 17:24:45 +0300 Subject: [PATCH 2/3] docs: add CLI help --- README.md | 7 ++- docs/cmd/tk.md | 92 ++++++++++++++++++++++++++++ docs/cmd/tk_check.md | 47 ++++++++++++++ docs/cmd/tk_create.md | 32 ++++++++++ docs/cmd/tk_create_kustomization.md | 70 +++++++++++++++++++++ docs/cmd/tk_create_source.md | 31 ++++++++++ docs/cmd/tk_create_source_git.md | 74 ++++++++++++++++++++++ docs/cmd/tk_delete.md | 32 ++++++++++ docs/cmd/tk_delete_kustomization.md | 34 ++++++++++ docs/cmd/tk_delete_source.md | 31 ++++++++++ docs/cmd/tk_delete_source_git.md | 34 ++++++++++ docs/cmd/tk_export.md | 32 ++++++++++ docs/cmd/tk_export_kustomization.md | 45 ++++++++++++++ docs/cmd/tk_export_source.md | 32 ++++++++++ docs/cmd/tk_export_source_git.md | 46 ++++++++++++++ docs/cmd/tk_get.md | 31 ++++++++++ docs/cmd/tk_get_kustomizations.md | 34 ++++++++++ docs/cmd/tk_get_sources.md | 30 +++++++++ docs/cmd/tk_get_sources_git.md | 34 ++++++++++ docs/cmd/tk_install.md | 52 ++++++++++++++++ docs/cmd/tk_resume.md | 30 +++++++++ docs/cmd/tk_resume_kustomization.md | 33 ++++++++++ docs/cmd/tk_suspend.md | 30 +++++++++ docs/cmd/tk_suspend_kustomization.md | 33 ++++++++++ docs/cmd/tk_sync.md | 31 ++++++++++ docs/cmd/tk_sync_kustomization.md | 46 ++++++++++++++ docs/cmd/tk_sync_source.md | 30 +++++++++ docs/cmd/tk_sync_source_git.md | 42 +++++++++++++ docs/cmd/tk_uninstall.md | 49 +++++++++++++++ docs/internal/release.md | 12 ++++ 30 files changed, 1153 insertions(+), 3 deletions(-) create mode 100644 docs/cmd/tk.md create mode 100644 docs/cmd/tk_check.md create mode 100644 docs/cmd/tk_create.md create mode 100644 docs/cmd/tk_create_kustomization.md create mode 100644 docs/cmd/tk_create_source.md create mode 100644 docs/cmd/tk_create_source_git.md create mode 100644 docs/cmd/tk_delete.md create mode 100644 docs/cmd/tk_delete_kustomization.md create mode 100644 docs/cmd/tk_delete_source.md create mode 100644 docs/cmd/tk_delete_source_git.md create mode 100644 docs/cmd/tk_export.md create mode 100644 docs/cmd/tk_export_kustomization.md create mode 100644 docs/cmd/tk_export_source.md create mode 100644 docs/cmd/tk_export_source_git.md create mode 100644 docs/cmd/tk_get.md create mode 100644 docs/cmd/tk_get_kustomizations.md create mode 100644 docs/cmd/tk_get_sources.md create mode 100644 docs/cmd/tk_get_sources_git.md create mode 100644 docs/cmd/tk_install.md create mode 100644 docs/cmd/tk_resume.md create mode 100644 docs/cmd/tk_resume_kustomization.md create mode 100644 docs/cmd/tk_suspend.md create mode 100644 docs/cmd/tk_suspend_kustomization.md create mode 100644 docs/cmd/tk_sync.md create mode 100644 docs/cmd/tk_sync_kustomization.md create mode 100644 docs/cmd/tk_sync_source.md create mode 100644 docs/cmd/tk_sync_source_git.md create mode 100644 docs/cmd/tk_uninstall.md create mode 100644 docs/internal/release.md diff --git a/README.md b/README.md index 9a2d2859..1ff3b168 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ [![e2e](https://github.com/fluxcd/toolkit/workflows/e2e/badge.svg)](https://github.com/fluxcd/toolkit/actions) -Experimental toolkit for assembling CD pipelines. +Experimental toolkit for assembling CD pipelines the GitOps way. Components: -* [source-controller](https://github.com/fluxcd/source-controller) -* [kustomize-controller](https://github.com/fluxcd/kustomize-controller) +* [Toolkit CLI](docs/cmd/tk.md) +* [Source Controller](https://github.com/fluxcd/source-controller) +* [Kustomize Controller](https://github.com/fluxcd/kustomize-controller) diff --git a/docs/cmd/tk.md b/docs/cmd/tk.md new file mode 100644 index 00000000..160a7641 --- /dev/null +++ b/docs/cmd/tk.md @@ -0,0 +1,92 @@ +## tk + +Command line utility for assembling Kubernetes CD pipelines + +### Synopsis + +Command line utility for assembling Kubernetes CD pipelines the GitOps way. + +### Examples + +``` + # Check prerequisites + tk check --pre + + # Install the latest version of the toolkit + tk install --version=master + + # Create a source from a public Git repository + tk create source git webapp-latest \ + --url=https://github.com/stefanprodan/podinfo \ + --branch=master \ + --interval=3m + + # List git sources and their status + tk get sources git + + # Trigger a git sync + tk sync source git webapp-latest + + # Export git sources in YAML format + tk export source git --all > sources.yaml + + # Create a kustomization for deploying a series of microservices + tk create kustomization webapp-dev \ + --source=webapp-latest \ + --path="./deploy/webapp/" \ + --prune="instance=webapp" \ + --generate=true \ + --interval=5m \ + --validate=client \ + --health-check="Deployment/backend.webapp" \ + --health-check="Deployment/frontend.webapp" \ + --health-check-timeout=2m + + # Trigger a git sync and apply changes if any + tk sync kustomization webapp-dev --with-source + + # Suspend a kustomization reconciliation + tk suspend kustomization webapp-dev + + # Export kustomizations in YAML format + tk export kustomization --all > kustomizations.yaml + + # Resume a kustomization reconciliation + tk resume kustomization webapp-dev + + # Delete a kustomization + tk delete kustomization webapp-dev + + # Delete a git source + tk delete source git webapp-latest + + # Uninstall the toolkit and delete CRDs + tk uninstall --crds + +``` + +### Options + +``` + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 +``` + +### SEE ALSO + +* [tk check](tk_check.md) - Check requirements and installation +* [tk create](tk_create.md) - Create commands +* [tk delete](tk_delete.md) - Delete commands +* [tk export](tk_export.md) - Export commands +* [tk get](tk_get.md) - Get commands +* [tk install](tk_install.md) - Install the toolkit components +* [tk resume](tk_resume.md) - Resume commands +* [tk suspend](tk_suspend.md) - Suspend commands +* [tk sync](tk_sync.md) - Synchronize commands +* [tk uninstall](tk_uninstall.md) - Uninstall the toolkit components + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_check.md b/docs/cmd/tk_check.md new file mode 100644 index 00000000..4a3b006e --- /dev/null +++ b/docs/cmd/tk_check.md @@ -0,0 +1,47 @@ +## tk check + +Check requirements and installation + +### Synopsis + + +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. + +``` +tk check [flags] +``` + +### Examples + +``` + # Run pre-installation checks + check --pre + + # Run installation checks + check + +``` + +### Options + +``` + -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]) + --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](tk.md) - Command line utility for assembling Kubernetes CD pipelines + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_create.md b/docs/cmd/tk_create.md new file mode 100644 index 00000000..8802511b --- /dev/null +++ b/docs/cmd/tk_create.md @@ -0,0 +1,32 @@ +## tk create + +Create commands + +### Synopsis + +Create commands + +### Options + +``` + -h, --help help for create + --interval duration source sync interval (default 1m0s) +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md new file mode 100644 index 00000000..3c17838d --- /dev/null +++ b/docs/cmd/tk_create_kustomization.md @@ -0,0 +1,70 @@ +## tk create kustomization + +Create or update a kustomization resource + +### Synopsis + + +The kustomization source command generates a kustomization.kustomize.fluxcd.io resource for a given GitRepository source. +API spec: https://github.com/fluxcd/kustomize-controller/tree/master/docs/spec/v1alpha1 + +``` +tk create kustomization [name] [flags] +``` + +### Examples + +``` + # Create a kustomization from a source at a given path + create kustomization contour \ + --source=contour \ + --path="./examples/contour/" \ + --prune="instance=contour" \ + --generate=true \ + --interval=10m \ + --validate=client \ + --health-check="Deployment/contour.projectcontour" \ + --health-check="DaemonSet/envoy.projectcontour" \ + --health-check-timeout=3m + + # Create a kustomization that depends on the previous one + create kustomization webapp \ + --depends-on=contour \ + --source=webapp \ + --path="./deploy/overlays/dev" \ + --prune="env=dev,instance=webapp" \ + --interval=5m \ + --validate=client + +``` + +### Options + +``` + --depends-on stringArray kustomization that must be ready before this kustomization can be applied + --generate generate the kustomization.yaml for all the Kubernetes manifests in the specified path and sub-directories + --health-check stringArray workload to be included in the health assessment, in the format '/.' + --health-check-timeout duration timeout of health checking operations (default 2m0s) + -h, --help help for kustomization + --path string path to the directory containing the kustomization file (default "./") + --prune string label selector used for garbage collection + --source string GitRepository name + --validate string validate the manifests before applying them on the cluster, can be 'client' or 'server' +``` + +### Options inherited from parent commands + +``` + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller]) + --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](tk_create.md) - Create commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_create_source.md b/docs/cmd/tk_create_source.md new file mode 100644 index 00000000..df355e66 --- /dev/null +++ b/docs/cmd/tk_create_source.md @@ -0,0 +1,31 @@ +## tk create source + +Create source commands + +### Synopsis + +Create source commands + +### Options + +``` + -h, --help help for source +``` + +### Options inherited from parent commands + +``` + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller]) + --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](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 30-Apr-2020 diff --git a/docs/cmd/tk_create_source_git.md b/docs/cmd/tk_create_source_git.md new file mode 100644 index 00000000..bb9484b6 --- /dev/null +++ b/docs/cmd/tk_create_source_git.md @@ -0,0 +1,74 @@ +## tk create source git + +Create or update a git source + +### Synopsis + + +The create source command generates a GitRepository resource and waits for it to sync. +For Git over SSH, host and SSH keys are automatically generated and stored in a Kubernetes secret. +For private Git repositories, the basic authentication credentials are stored in a Kubernetes secret. + +``` +tk create source git [name] [flags] +``` + +### Examples + +``` + # Create a source from a public Git repository master branch + 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 \ + --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 \ + --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 \ + --url=ssh://git@github.com/stefanprodan/podinfo \ + --branch=master + + # Create a source from a Git repository using basic authentication + create source git podinfo \ + --url=https://github.com/stefanprodan/podinfo \ + --username=username \ + --password=password + +``` + +### Options + +``` + --branch string git branch (default "master") + -h, --help help for git + -p, --password string basic authentication password + --tag string git tag + --tag-semver string git tag semver range + --url string git address, e.g. ssh://git@host/org/repository + -u, --username string basic authentication username +``` + +### Options inherited from parent commands + +``` + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller]) + --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 source commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_delete.md b/docs/cmd/tk_delete.md new file mode 100644 index 00000000..3e1ee2c9 --- /dev/null +++ b/docs/cmd/tk_delete.md @@ -0,0 +1,32 @@ +## tk delete + +Delete commands + +### Synopsis + +Delete commands + +### Options + +``` + -h, --help help for delete + --silent delete resource without asking for confirmation +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_delete_kustomization.md b/docs/cmd/tk_delete_kustomization.md new file mode 100644 index 00000000..dd115e8d --- /dev/null +++ b/docs/cmd/tk_delete_kustomization.md @@ -0,0 +1,34 @@ +## tk delete kustomization + +Delete kustomization + +### Synopsis + +Delete kustomization + +``` +tk delete kustomization [name] [flags] +``` + +### Options + +``` + -h, --help help for kustomization +``` + +### 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") + --silent delete resource without asking for confirmation + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects +``` + +### SEE ALSO + +* [tk delete](tk_delete.md) - Delete commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_delete_source.md b/docs/cmd/tk_delete_source.md new file mode 100644 index 00000000..073f5f09 --- /dev/null +++ b/docs/cmd/tk_delete_source.md @@ -0,0 +1,31 @@ +## tk delete source + +Delete sources commands + +### Synopsis + +Delete sources commands + +### Options + +``` + -h, --help help for source +``` + +### 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") + --silent delete resource without asking for confirmation + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_delete_source_git.md b/docs/cmd/tk_delete_source_git.md new file mode 100644 index 00000000..f024b3da --- /dev/null +++ b/docs/cmd/tk_delete_source_git.md @@ -0,0 +1,34 @@ +## tk delete source git + +Delete git source + +### Synopsis + +Delete git source + +``` +tk delete source git [name] [flags] +``` + +### Options + +``` + -h, --help help for git +``` + +### 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") + --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 commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_export.md b/docs/cmd/tk_export.md new file mode 100644 index 00000000..a47d31b4 --- /dev/null +++ b/docs/cmd/tk_export.md @@ -0,0 +1,32 @@ +## tk export + +Export commands + +### Synopsis + +Export commands + +### Options + +``` + --all select all resources + -h, --help help for export +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_export_kustomization.md b/docs/cmd/tk_export_kustomization.md new file mode 100644 index 00000000..5f7d807d --- /dev/null +++ b/docs/cmd/tk_export_kustomization.md @@ -0,0 +1,45 @@ +## tk export kustomization + +Export kustomization in YAML format + +### Synopsis + +Export kustomization in YAML format + +``` +tk export kustomization [name] [flags] +``` + +### Examples + +``` + # Export all kustomizations + export kustomization --all > kustomizations.yaml + + # Export a kustomization + export kustomization my-app > kustomization.yaml + +``` + +### Options + +``` + -h, --help help for kustomization +``` + +### Options inherited from parent commands + +``` + --all select all resources + --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 +``` + +### SEE ALSO + +* [tk export](tk_export.md) - Export commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_export_source.md b/docs/cmd/tk_export_source.md new file mode 100644 index 00000000..40582eb3 --- /dev/null +++ b/docs/cmd/tk_export_source.md @@ -0,0 +1,32 @@ +## tk export source + +Export source commands + +### Synopsis + +Export source commands + +### Options + +``` + -h, --help help for source + --with-credentials include credential secrets +``` + +### Options inherited from parent commands + +``` + --all select all resources + --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 +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_export_source_git.md b/docs/cmd/tk_export_source_git.md new file mode 100644 index 00000000..daee6488 --- /dev/null +++ b/docs/cmd/tk_export_source_git.md @@ -0,0 +1,46 @@ +## tk export source git + +Export git sources in YAML format + +### Synopsis + +Export git sources in YAML format + +``` +tk export source git [name] [flags] +``` + +### Examples + +``` + # Export all git sources + export source git --all > sources.yaml + + # Export a git source including the SSH keys or basic auth credentials + export source git my-private-repo --with-credentials > source.yaml + +``` + +### Options + +``` + -h, --help help for git +``` + +### Options inherited from parent commands + +``` + --all select all resources + --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 + --with-credentials include credential secrets +``` + +### SEE ALSO + +* [tk export source](tk_export_source.md) - Export source commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_get.md b/docs/cmd/tk_get.md new file mode 100644 index 00000000..d2a81f40 --- /dev/null +++ b/docs/cmd/tk_get.md @@ -0,0 +1,31 @@ +## tk get + +Get commands + +### Synopsis + +Get commands + +### Options + +``` + -h, --help help for get +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_get_kustomizations.md b/docs/cmd/tk_get_kustomizations.md new file mode 100644 index 00000000..d636c2ac --- /dev/null +++ b/docs/cmd/tk_get_kustomizations.md @@ -0,0 +1,34 @@ +## tk get kustomizations + +Get kustomizations status + +### Synopsis + + +The get kustomizations command prints the status of the resources. + +``` +tk get kustomizations [flags] +``` + +### Options + +``` + -h, --help help for kustomizations +``` + +### 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 +``` + +### SEE ALSO + +* [tk get](tk_get.md) - Get commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_get_sources.md b/docs/cmd/tk_get_sources.md new file mode 100644 index 00000000..c964eed8 --- /dev/null +++ b/docs/cmd/tk_get_sources.md @@ -0,0 +1,30 @@ +## tk get sources + +Get sources commands + +### Synopsis + +Get sources commands + +### Options + +``` + -h, --help help for sources +``` + +### 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 +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_get_sources_git.md b/docs/cmd/tk_get_sources_git.md new file mode 100644 index 00000000..654c5b0b --- /dev/null +++ b/docs/cmd/tk_get_sources_git.md @@ -0,0 +1,34 @@ +## tk get sources git + +Get git sources status + +### Synopsis + + +The get sources command prints the status of the git resources. + +``` +tk get sources git [flags] +``` + +### Options + +``` + -h, --help help for git +``` + +### 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 +``` + +### SEE ALSO + +* [tk get sources](tk_get_sources.md) - Get sources commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_install.md b/docs/cmd/tk_install.md new file mode 100644 index 00000000..285012ca --- /dev/null +++ b/docs/cmd/tk_install.md @@ -0,0 +1,52 @@ +## tk install + +Install the toolkit components + +### Synopsis + + +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. + +``` +tk install [flags] +``` + +### Examples + +``` + # Install the latest version in the gitops-systems namespace + 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" + + # Dry-run install with manifests preview + 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") +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_resume.md b/docs/cmd/tk_resume.md new file mode 100644 index 00000000..acca85e9 --- /dev/null +++ b/docs/cmd/tk_resume.md @@ -0,0 +1,30 @@ +## tk resume + +Resume commands + +### Synopsis + +Resume commands + +### Options + +``` + -h, --help help for resume +``` + +### 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 +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_resume_kustomization.md b/docs/cmd/tk_resume_kustomization.md new file mode 100644 index 00000000..b8791852 --- /dev/null +++ b/docs/cmd/tk_resume_kustomization.md @@ -0,0 +1,33 @@ +## tk resume kustomization + +Resume kustomization + +### Synopsis + +The resume command marks a previously suspended Kustomization resource for reconciliation and waits for it to finish the apply. + +``` +tk resume kustomization [name] [flags] +``` + +### Options + +``` + -h, --help help for kustomization +``` + +### 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 +``` + +### SEE ALSO + +* [tk resume](tk_resume.md) - Resume commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_suspend.md b/docs/cmd/tk_suspend.md new file mode 100644 index 00000000..45ca28bb --- /dev/null +++ b/docs/cmd/tk_suspend.md @@ -0,0 +1,30 @@ +## tk suspend + +Suspend commands + +### Synopsis + +Suspend commands + +### Options + +``` + -h, --help help for suspend +``` + +### 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 +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_suspend_kustomization.md b/docs/cmd/tk_suspend_kustomization.md new file mode 100644 index 00000000..c22709bb --- /dev/null +++ b/docs/cmd/tk_suspend_kustomization.md @@ -0,0 +1,33 @@ +## tk suspend kustomization + +Suspend kustomization + +### Synopsis + +The suspend command disables the reconciliation of a Kustomization resource. + +``` +tk suspend kustomization [name] [flags] +``` + +### Options + +``` + -h, --help help for kustomization +``` + +### 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 +``` + +### SEE ALSO + +* [tk suspend](tk_suspend.md) - Suspend commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_sync.md b/docs/cmd/tk_sync.md new file mode 100644 index 00000000..7a5fa75d --- /dev/null +++ b/docs/cmd/tk_sync.md @@ -0,0 +1,31 @@ +## tk sync + +Synchronize commands + +### Synopsis + +Synchronize commands + +### Options + +``` + -h, --help help for sync +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_sync_kustomization.md b/docs/cmd/tk_sync_kustomization.md new file mode 100644 index 00000000..1c188a2f --- /dev/null +++ b/docs/cmd/tk_sync_kustomization.md @@ -0,0 +1,46 @@ +## tk sync kustomization + +Synchronize kustomization + +### Synopsis + + +The sync kustomization command triggers a reconciliation of a Kustomization resource and waits for it to finish. + +``` +tk sync kustomization [name] [flags] +``` + +### Examples + +``` + # Trigger a kustomization apply outside of the reconciliation interval + sync kustomization podinfo + + # Trigger a git sync of the kustomization source and apply changes + sync kustomization podinfo --with-source + +``` + +### Options + +``` + -h, --help help for kustomization + --with-source synchronize kustomization source +``` + +### 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 +``` + +### SEE ALSO + +* [tk sync](tk_sync.md) - Synchronize commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_sync_source.md b/docs/cmd/tk_sync_source.md new file mode 100644 index 00000000..af73f2d5 --- /dev/null +++ b/docs/cmd/tk_sync_source.md @@ -0,0 +1,30 @@ +## tk sync source + +Synchronize source commands + +### Synopsis + +Synchronize source commands + +### Options + +``` + -h, --help help for source +``` + +### 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 +``` + +### SEE ALSO + +* [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 30-Apr-2020 diff --git a/docs/cmd/tk_sync_source_git.md b/docs/cmd/tk_sync_source_git.md new file mode 100644 index 00000000..38be98e0 --- /dev/null +++ b/docs/cmd/tk_sync_source_git.md @@ -0,0 +1,42 @@ +## tk sync source git + +Synchronize git source + +### Synopsis + + +The sync source command triggers a reconciliation of a GitRepository resource and waits for it to finish. + +``` +tk sync source git [name] [flags] +``` + +### Examples + +``` + # Trigger a git pull for an existing source + sync source git podinfo + +``` + +### Options + +``` + -h, --help help for git +``` + +### 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 +``` + +### SEE ALSO + +* [tk sync source](tk_sync_source.md) - Synchronize source commands + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/cmd/tk_uninstall.md b/docs/cmd/tk_uninstall.md new file mode 100644 index 00000000..5e691b63 --- /dev/null +++ b/docs/cmd/tk_uninstall.md @@ -0,0 +1,49 @@ +## tk uninstall + +Uninstall the toolkit components + +### Synopsis + + +The uninstall command removes the namespace, cluster roles, +cluster role bindings and CRDs. + +``` +tk uninstall [flags] +``` + +### Examples + +``` + # Dry-run uninstall of all components + uninstall --dry-run --namespace=gitops-system + + # Uninstall all components and delete custom resource definitions + uninstall --crds --namespace=gitops-system + +``` + +### Options + +``` + --crds removes all CRDs previously installed + --dry-run only print the object that would be deleted + -h, --help help for uninstall + --silent delete components without asking for confirmation +``` + +### 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 +``` + +### SEE ALSO + +* [tk](tk.md) - Command line utility for assembling Kubernetes CD pipelines + +###### Auto generated by spf13/cobra on 30-Apr-2020 diff --git a/docs/internal/release.md b/docs/internal/release.md new file mode 100644 index 00000000..987c2e3c --- /dev/null +++ b/docs/internal/release.md @@ -0,0 +1,12 @@ +# Release + +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 + push it to remote. +1. Confirm CI builds and releases the newly tagged version. From 026d2460f42f5370186db8ae6df18c548b4cf70f Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Thu, 30 Apr 2020 17:25:22 +0300 Subject: [PATCH 3/3] Add coc, dco and maintainers docs --- CODE_OF_CONDUCT.md | 3 ++ CONTRIBUTING.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++ DCO | 36 ++++++++++++++++++++++++ MAINTAINERS | 8 ++++++ 4 files changed, 115 insertions(+) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 DCO create mode 100644 MAINTAINERS diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..966d965f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,3 @@ +## Code of Conduct + +FluxCD toolkit follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..a7db124e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,68 @@ +# Contributing + +FluxCD toolkit is [Apache 2.0 licensed](LICENSE) and accepts contributions +via GitHub pull requests. This document outlines some of the conventions on +to make it easier to get your contribution accepted. + +We gratefully welcome improvements to issues and documentation as well as to +code. + +## Certificate of Origin + +By contributing to this project you agree to the Developer Certificate of +Origin (DCO). This document was created by the Linux Kernel community and is a +simple statement that you, as a contributor, have the legal right to make the +contribution. No action from you is required, but it's a good idea to see the +[DCO](DCO) file for details before you start contributing code to FluxCD +toolkit. + +## Communications + +The project uses Slack: To join the conversation, simply join the +[CNCF](https://slack.cncf.io/) Slack workspace and use the +[#flux](https://cloud-native.slack.com/messages/flux/) channel. + +The developers use a mailing list to discuss development as well. +Simply subscribe to [flux-dev on cncf.io](https://lists.cncf.io/g/cncf-flux-dev) +to join the conversation (this will also add an invitation to your +Google calendar for our [Flux +meeting](https://docs.google.com/document/d/1l_M0om0qUEN_NNiGgpqJ2tvsF2iioHkaARDeh6b70B0/edit#)). + +### How to run the test suite + +You can run the unit tests by simply doing + +```bash +make test +``` + +## Acceptance policy + +These things will make a PR more likely to be accepted: + +- a well-described requirement +- tests for new code +- tests for old code! +- new code and tests follow the conventions in old code and tests +- a good commit message (see below) +- all code must abide [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments) +- names should abide [What's in a name](https://talks.golang.org/2014/names.slide#1) +- code must build on both Linux and Darwin, via plain `go build` +- code should have appropriate test coverage and tests should be written + to work with `go test` + +In general, we will merge a PR once one maintainer has endorsed it. +For substantial changes, more people may become involved, and you might +get asked to resubmit the PR or divide the changes into more than one PR. + +### Format of the Commit Message + +For Source Controller we prefer the following rules for good commit messages: + +- Limit the subject to 50 characters and write as the continuation + of the sentence "If applied, this commit will ..." +- Explain what and why in the body, if more than a trivial change; + wrap it at 72 characters. + +The [following article](https://chris.beams.io/posts/git-commit/#seven-rules) +has some more helpful advice on documenting your work. diff --git a/DCO b/DCO new file mode 100644 index 00000000..716561d5 --- /dev/null +++ b/DCO @@ -0,0 +1,36 @@ +Developer Certificate of Origin +Version 1.1 + +Copyright (C) 2004, 2006 The Linux Foundation and its contributors. +660 York Street, Suite 102, +San Francisco, CA 94110 USA + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + + +Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. diff --git a/MAINTAINERS b/MAINTAINERS new file mode 100644 index 00000000..8bcb1ba7 --- /dev/null +++ b/MAINTAINERS @@ -0,0 +1,8 @@ +The maintainers are generally available in Slack at +https://cloud-native.slack.com in #flux (https://cloud-native.slack.com/messages/CLAJ40HV3) +(obtain an invitation at https://slack.cncf.io/). + +In alphabetical order: + +Hidde Beydals, Weaveworks (github: @hiddeco, slack: hidde) +Stefan Prodan, Weaveworks (github: @stefanprodan, slack: stefanprodan)