diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 9915d0a6..8964af7f 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,17 +14,28 @@ jobs: uses: actions/checkout@v1 - name: Copy assets run: | - cp install/tk.sh docs/install.sh + # source-controller CRDs curl https://raw.githubusercontent.com/fluxcd/source-controller/master/docs/api/source.md > docs/components/source/api.md curl https://raw.githubusercontent.com/fluxcd/source-controller/master/docs/spec/v1alpha1/gitrepositories.md > docs/components/source/gitrepositories.md curl https://raw.githubusercontent.com/fluxcd/source-controller/master/docs/spec/v1alpha1/helmrepositories.md > docs/components/source/helmrepositories.md + + # kustomize-controller CRDs curl https://raw.githubusercontent.com/fluxcd/kustomize-controller/master/docs/api/kustomize.md > docs/components/kustomize/api.md curl https://raw.githubusercontent.com/fluxcd/kustomize-controller/master/docs/spec/v1alpha1/kustomization.md > docs/components/kustomize/kustomization.md + + # helm-controller CRDs + curl https://raw.githubusercontent.com/fluxcd/helm-controller/master/docs/api/helmrelease.md > docs/components/helm/api.md + curl https://raw.githubusercontent.com/fluxcd/helm-controller/master/docs/spec/v1alpha1/helmreleases.md > docs/components/helm/helmreleases.md + + # notification-controller CRDs curl https://raw.githubusercontent.com/fluxcd/notification-controller/master/docs/api/notification.md > docs/components/notification/api.md curl https://raw.githubusercontent.com/fluxcd/notification-controller/master/docs/spec/v1alpha1/event.md > docs/components/notification/event.md curl https://raw.githubusercontent.com/fluxcd/notification-controller/master/docs/spec/v1alpha1/alert.md > docs/components/notification/alert.md curl https://raw.githubusercontent.com/fluxcd/notification-controller/master/docs/spec/v1alpha1/provider.md > docs/components/notification/provider.md curl https://raw.githubusercontent.com/fluxcd/notification-controller/master/docs/spec/v1alpha1/receiver.md > docs/components/notification/receiver.md + + # install script + cp install/tk.sh docs/install.sh - name: Deploy docs uses: mhausenblas/mkdocs-deploy-gh-pages@master env: diff --git a/cmd/tk/main.go b/cmd/tk/main.go index 5afaa56e..438cfd70 100644 --- a/cmd/tk/main.go +++ b/cmd/tk/main.go @@ -112,7 +112,7 @@ func init() { rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "", false, "print generated objects") rootCmd.PersistentFlags().StringSliceVar(&components, "components", - []string{"source-controller", "kustomize-controller", "notification-controller"}, + []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"}, "list of components, accepts comma-separated values") } diff --git a/docs/_files/helm-controller.png b/docs/_files/helm-controller.png new file mode 100644 index 00000000..5777ef4e Binary files /dev/null and b/docs/_files/helm-controller.png differ diff --git a/docs/cmd/tk.md b/docs/cmd/tk.md index 934c56b8..ad43064a 100644 --- a/docs/cmd/tk.md +++ b/docs/cmd/tk.md @@ -67,7 +67,7 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way. ### Options ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) -h, --help help for tk --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") diff --git a/docs/cmd/tk_bootstrap.md b/docs/cmd/tk_bootstrap.md index 62a8d078..bdebfac6 100644 --- a/docs/cmd/tk_bootstrap.md +++ b/docs/cmd/tk_bootstrap.md @@ -16,7 +16,7 @@ The bootstrap sub-commands bootstrap the toolkit components on the targeted Git ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_bootstrap_github.md b/docs/cmd/tk_bootstrap_github.md index d742e035..ef58e41d 100644 --- a/docs/cmd/tk_bootstrap_github.md +++ b/docs/cmd/tk_bootstrap_github.md @@ -54,7 +54,7 @@ tk bootstrap github [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_bootstrap_gitlab.md b/docs/cmd/tk_bootstrap_gitlab.md index 2dc5e765..57fdb32a 100644 --- a/docs/cmd/tk_bootstrap_gitlab.md +++ b/docs/cmd/tk_bootstrap_gitlab.md @@ -50,7 +50,7 @@ tk bootstrap gitlab [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_check.md b/docs/cmd/tk_check.md index 477c2d4e..b66726c2 100644 --- a/docs/cmd/tk_check.md +++ b/docs/cmd/tk_check.md @@ -32,7 +32,7 @@ tk check [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_completion.md b/docs/cmd/tk_completion.md index 710e0960..1aacb192 100644 --- a/docs/cmd/tk_completion.md +++ b/docs/cmd/tk_completion.md @@ -33,7 +33,7 @@ To configure your bash shell to load completions for each session add to your ba ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_create.md b/docs/cmd/tk_create.md index acc6c896..ddbcc4cd 100644 --- a/docs/cmd/tk_create.md +++ b/docs/cmd/tk_create.md @@ -17,7 +17,7 @@ The create sub-commands generate sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_create_kustomization.md b/docs/cmd/tk_create_kustomization.md index 109e5b06..f735b132 100644 --- a/docs/cmd/tk_create_kustomization.md +++ b/docs/cmd/tk_create_kustomization.md @@ -63,7 +63,7 @@ tk create kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --export export in YAML format to stdout --interval duration source sync interval (default 1m0s) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") diff --git a/docs/cmd/tk_create_source.md b/docs/cmd/tk_create_source.md index 75b7594d..771b77c8 100644 --- a/docs/cmd/tk_create_source.md +++ b/docs/cmd/tk_create_source.md @@ -15,7 +15,7 @@ The create source sub-commands generate sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --export export in YAML format to stdout --interval duration source sync interval (default 1m0s) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") diff --git a/docs/cmd/tk_create_source_git.md b/docs/cmd/tk_create_source_git.md index 1efa6013..933438ba 100644 --- a/docs/cmd/tk_create_source_git.md +++ b/docs/cmd/tk_create_source_git.md @@ -70,7 +70,7 @@ tk create source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --export export in YAML format to stdout --interval duration source sync interval (default 1m0s) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") diff --git a/docs/cmd/tk_delete.md b/docs/cmd/tk_delete.md index 38f409ab..c342f400 100644 --- a/docs/cmd/tk_delete.md +++ b/docs/cmd/tk_delete.md @@ -16,7 +16,7 @@ The delete sub-commands delete sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_delete_kustomization.md b/docs/cmd/tk_delete_kustomization.md index b73dae88..d58fee1a 100644 --- a/docs/cmd/tk_delete_kustomization.md +++ b/docs/cmd/tk_delete_kustomization.md @@ -19,7 +19,7 @@ tk delete kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") -s, --silent delete resource without asking for confirmation diff --git a/docs/cmd/tk_delete_source.md b/docs/cmd/tk_delete_source.md index 678a5aa1..ce2df34c 100644 --- a/docs/cmd/tk_delete_source.md +++ b/docs/cmd/tk_delete_source.md @@ -15,7 +15,7 @@ The delete source sub-commands delete sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") -s, --silent delete resource without asking for confirmation diff --git a/docs/cmd/tk_delete_source_git.md b/docs/cmd/tk_delete_source_git.md index 036a44d0..bc7d40bf 100644 --- a/docs/cmd/tk_delete_source_git.md +++ b/docs/cmd/tk_delete_source_git.md @@ -19,7 +19,7 @@ tk delete source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") -s, --silent delete resource without asking for confirmation diff --git a/docs/cmd/tk_export.md b/docs/cmd/tk_export.md index ca3bd632..f3f0c2fc 100644 --- a/docs/cmd/tk_export.md +++ b/docs/cmd/tk_export.md @@ -16,7 +16,7 @@ The export sub-commands export resources in YAML format. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_export_kustomization.md b/docs/cmd/tk_export_kustomization.md index 24102a9a..a56f88b7 100644 --- a/docs/cmd/tk_export_kustomization.md +++ b/docs/cmd/tk_export_kustomization.md @@ -31,7 +31,7 @@ tk export kustomization [name] [flags] ``` --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_export_source.md b/docs/cmd/tk_export_source.md index 048190bd..ed755896 100644 --- a/docs/cmd/tk_export_source.md +++ b/docs/cmd/tk_export_source.md @@ -17,7 +17,7 @@ The export source sub-commands export sources in YAML format. ``` --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_export_source_git.md b/docs/cmd/tk_export_source_git.md index 615f7389..dd7a2c09 100644 --- a/docs/cmd/tk_export_source_git.md +++ b/docs/cmd/tk_export_source_git.md @@ -31,7 +31,7 @@ tk export source git [name] [flags] ``` --all select all resources - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_get.md b/docs/cmd/tk_get.md index 97397bca..f679645c 100644 --- a/docs/cmd/tk_get.md +++ b/docs/cmd/tk_get.md @@ -15,7 +15,7 @@ The get sub-commands print the statuses of sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_get_kustomizations.md b/docs/cmd/tk_get_kustomizations.md index 5111dfb9..59a2ed96 100644 --- a/docs/cmd/tk_get_kustomizations.md +++ b/docs/cmd/tk_get_kustomizations.md @@ -19,7 +19,7 @@ tk get kustomizations [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_get_sources.md b/docs/cmd/tk_get_sources.md index 7efa5635..c347234c 100644 --- a/docs/cmd/tk_get_sources.md +++ b/docs/cmd/tk_get_sources.md @@ -15,7 +15,7 @@ The get source sub-commands print the statuses of the sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_get_sources_git.md b/docs/cmd/tk_get_sources_git.md index 3f16e7b5..e969c934 100644 --- a/docs/cmd/tk_get_sources_git.md +++ b/docs/cmd/tk_get_sources_git.md @@ -19,7 +19,7 @@ tk get sources git [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_install.md b/docs/cmd/tk_install.md index 8619d009..a53629cb 100644 --- a/docs/cmd/tk_install.md +++ b/docs/cmd/tk_install.md @@ -37,7 +37,7 @@ tk install [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_resume.md b/docs/cmd/tk_resume.md index 9be1c019..a6e6636c 100644 --- a/docs/cmd/tk_resume.md +++ b/docs/cmd/tk_resume.md @@ -15,7 +15,7 @@ The resume sub-commands resume a suspended resource. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_resume_kustomization.md b/docs/cmd/tk_resume_kustomization.md index eb38bf47..abfdb8bc 100644 --- a/docs/cmd/tk_resume_kustomization.md +++ b/docs/cmd/tk_resume_kustomization.md @@ -20,7 +20,7 @@ tk resume kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_suspend.md b/docs/cmd/tk_suspend.md index fad7a400..227ecc08 100644 --- a/docs/cmd/tk_suspend.md +++ b/docs/cmd/tk_suspend.md @@ -15,7 +15,7 @@ The suspend sub-commands suspend the reconciliation of a resource. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_suspend_kustomization.md b/docs/cmd/tk_suspend_kustomization.md index 3d48fc66..dfa3df16 100644 --- a/docs/cmd/tk_suspend_kustomization.md +++ b/docs/cmd/tk_suspend_kustomization.md @@ -19,7 +19,7 @@ tk suspend kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_sync.md b/docs/cmd/tk_sync.md index 24412b5a..8eefc5a7 100644 --- a/docs/cmd/tk_sync.md +++ b/docs/cmd/tk_sync.md @@ -15,7 +15,7 @@ The sync sub-commands trigger a reconciliation of sources and resources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_sync_kustomization.md b/docs/cmd/tk_sync_kustomization.md index b7525aa6..4318b9cf 100644 --- a/docs/cmd/tk_sync_kustomization.md +++ b/docs/cmd/tk_sync_kustomization.md @@ -32,7 +32,7 @@ tk sync kustomization [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_sync_source.md b/docs/cmd/tk_sync_source.md index 4f3e9705..339fdf02 100644 --- a/docs/cmd/tk_sync_source.md +++ b/docs/cmd/tk_sync_source.md @@ -15,7 +15,7 @@ The sync source sub-commands trigger a reconciliation of sources. ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_sync_source_git.md b/docs/cmd/tk_sync_source_git.md index bab0ec5b..c7386f55 100644 --- a/docs/cmd/tk_sync_source_git.md +++ b/docs/cmd/tk_sync_source_git.md @@ -27,7 +27,7 @@ tk sync source git [name] [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/cmd/tk_uninstall.md b/docs/cmd/tk_uninstall.md index 91d5e77f..fef37844 100644 --- a/docs/cmd/tk_uninstall.md +++ b/docs/cmd/tk_uninstall.md @@ -34,7 +34,7 @@ tk uninstall [flags] ### Options inherited from parent commands ``` - --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,notification-controller]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-controller,helm-controller,notification-controller]) --kubeconfig string path to the kubeconfig file (default "~/.kube/config") --namespace string the namespace scope for this operation (default "gitops-system") --timeout duration timeout for this operation (default 5m0s) diff --git a/docs/components/helm/controller.md b/docs/components/helm/controller.md new file mode 100644 index 00000000..fbaa5969 --- /dev/null +++ b/docs/components/helm/controller.md @@ -0,0 +1,25 @@ +# Helm Controller + +The Helm Controller is a Kubernetes operator, allowing one to declaratively manage Helm chart +releases with Kubernetes manifests. + +![](../../_files/helm-controller.png) + +The desired state of a Helm release is described through a Kubernetes Custom Resource named `HelmRelease`. +Based on the creation, mutation or removal of a HelmRelease resource in the cluster, +Helm actions are performed by the controller. + +Features: + +- Watches for `HelmRelease` objects and generates `HelmChart` objects +- Fetches artifacts produced by [source-controller](../source/controller.md) from `HelmChart` objects +- Watches `HelmChart` objects for revision changes (semver ranges) +- Performs Helm v3 actions including Helm tests as configured in the `HelmRelease` objects +- Runs Helm install/upgrade in a specific order, taking into account the depends-on relationship +- Prunes Helm releases removed from cluster (garbage collection) +- Reports Helm releases status (alerting provided by [notification-controller](../notification/controller.md)) + +Links: + +- Source code [fluxcd/helm-controller](https://github.com/fluxcd/helm-controller) +- Specification [docs](https://github.com/fluxcd/helm-controller/tree/master/docs/spec) diff --git a/docs/index.md b/docs/index.md index 4bb25998..2c4e4964 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,10 +41,12 @@ Components: - [HelmRepository CRD](components/source/helmrepositories.md) - [Kustomize Controller](components/kustomize/controller.md) - [Kustomization CRD](components/kustomize/kustomization.md) +- [Helm Controller](components/helm/controller.md) + - [HelmRelease CRD](components/helm/helmreleases.md) - [Notification Controller](components/notification/controller.md) - [Provider CRD](components/notification/provider.md) - [Alert CRD](components/notification/alert.md) - [Receiver CRD](components/notification/receiver.md) -- Helm Controller (TBA) + To get started with the toolkit please follow this [guide](get-started/index.md). diff --git a/manifests/bases/helm-controller/kustomization.yaml b/manifests/bases/helm-controller/kustomization.yaml new file mode 100644 index 00000000..9e0f332b --- /dev/null +++ b/manifests/bases/helm-controller/kustomization.yaml @@ -0,0 +1,12 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- github.com/fluxcd/helm-controller/config//crd?ref=v0.0.1-alpha.1 +- github.com/fluxcd/helm-controller/config//manager?ref=v0.0.1-alpha.1 +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: helm-controller + path: patch.yaml diff --git a/manifests/bases/helm-controller/patch.yaml b/manifests/bases/helm-controller/patch.yaml new file mode 100644 index 00000000..e5ee6192 --- /dev/null +++ b/manifests/bases/helm-controller/patch.yaml @@ -0,0 +1,3 @@ +- op: add + path: /spec/template/spec/containers/0/args/0 + value: --events-addr=http://notification-controller/ diff --git a/manifests/install/kustomization.yaml b/manifests/install/kustomization.yaml index 95a5835c..4a68ed75 100644 --- a/manifests/install/kustomization.yaml +++ b/manifests/install/kustomization.yaml @@ -6,6 +6,7 @@ resources: - ../bases/source-controller - ../bases/kustomize-controller - ../bases/notification-controller + - ../bases/helm-controller - ../rbac - ../policies transformers: diff --git a/manifests/rbac/role.yaml b/manifests/rbac/role.yaml index a2085be4..83452c60 100644 --- a/manifests/rbac/role.yaml +++ b/manifests/rbac/role.yaml @@ -9,6 +9,9 @@ rules: - apiGroups: ['kustomize.fluxcd.io'] resources: ['*'] verbs: ['*'] +- apiGroups: ['helm.fluxcd.io'] + resources: ['*'] + verbs: ['*'] - apiGroups: ['notification.fluxcd.io'] resources: ['*'] verbs: ['*'] diff --git a/mkdocs.yml b/mkdocs.yml index 5020e971..cd2572a3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -52,6 +52,10 @@ nav: - Overview: components/kustomize/controller.md - Kustomization CRD: components/kustomize/kustomization.md - Kustomize API Reference: components/kustomize/api.md + - Helm Controller: + - Overview: components/helm/controller.md + - HelmRelease CRD: components/helm/helmreleases.md + - Helm API Reference: components/helm/api.md - Notification Controller: - Overview: components/notification/controller.md - Event: components/notification/event.md