diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index cbec3e854e15113b211f11e721e8ea5512650544..8e6b25940c9a51f60a18cd6219a35cb875654619 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,6 +20,10 @@ jobs: curl https://raw.githubusercontent.com/fluxcd/source-controller/master/docs/spec/v1alpha1/helmrepositories.md > docs/components/source/helmrepositories.md 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 + 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 - name: Deploy docs uses: mhausenblas/mkdocs-deploy-gh-pages@master env: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 55d1e926bc3a84515b9de5b95dff56554803d464..2bee6398dc554c3dcf41759567c505941747bf1b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -41,7 +41,7 @@ jobs: ./bin/tk check --pre - name: tk install --version run: | - ./bin/tk install --version=master --namespace=test --verbose + ./bin/tk install --version=master --namespace=test --verbose --components="source-controller,kustomize-controller" - name: tk uninstall run: | ./bin/tk uninstall --namespace=test --crds --silent diff --git a/cmd/tk/main.go b/cmd/tk/main.go index a25d1fb9c02090f9a2440f410e6f73215d2f6e22..5afaa56ee1e3f3d52bccae0b94e68b5c791bed80 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"}, + []string{"source-controller", "kustomize-controller", "notification-controller"}, "list of components, accepts comma-separated values") } diff --git a/docs/cmd/tk.md b/docs/cmd/tk.md index 914459ae36a986b1d224fdb1508519d0d27916c8..934c56b8db408394cf09cfaec0725d807e513298 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 2c9f428c7405a63a692d7ae6beefbf7be7d7fb6b..62a8d0780a0338d23dc158954f5c44d647a28337 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 c4764b7440b43ad0d10a946e26427ee21609af0b..d742e035ecd3f6b9680458efed00e85c608f12bc 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 70ee015e5ca011d8e63a842f3c52d794ce505db3..2dc5e76547b15e7f3efba36431f5b8b6cfd17607 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 50405160012ebe6d94f98f0e3cce1181967171bc..477c2d4eec33729cce382dc21ef259ec21326fb6 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 8f68012c6f435471cf0b2f46b4f40a58a54ba073..710e0960c1ce3d6cbb4409e8b181ef458af0af4a 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 eba8678c58009236a781bd519c2fee9ed70f4a76..acc6c89618bba2e992fdb5bdec5682bb410ff8f3 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 1cfc020fa83fcabef97c4d9296cdda84bd493d1e..109e5b0643144d145cfc1bbb625598abaf69d3ca 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 b3ff45c5146dae32b13b81e130d7dbc2326700be..75b7594d76a86f47303b67145730c8ad8343f1a6 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 276115fab8f65bb46fb066b90231650ceaf73d0c..1efa601379089671275758ce9883cabeb4bda395 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 e961029f2455c355197279db9fcd1f69fe799a6d..38f409abe7558824f9169a03584a7c62772842ff 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 99f2e6c76245ed7d191ea44c1abaddac096443f7..b73dae88a52e11858123a080fd38be54532eeb52 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 14747756ebe9c80b0253b795f7df64e539511a0f..678a5aa1c66e3c9422af7e3a731f9c53e9171d62 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 50ce450895dd39cbc8b955ceb5a052621141f7f5..036a44d0a87bc736d54b3e15ecc13840c1f1a1a1 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 7487189171a05245953e15453c5077988030b5d9..ca3bd6327b39485bacad44912b222866c8d54d68 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 986d6a4aa39548aa9a3da47a3ea7a3aebbc0e104..24102a9ac92ffa1b8113cc6fe15578ef272024e0 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 36d40b75df031c16eb58f813c90276d7c83cda25..048190bda3ee32546185557f9ced5ad2c8a8b67b 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 613fcd6e76aa1fa249bba6f8d0ed2176901918a6..615f73891f36a73a96f38a288a64ef1445b58a8d 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 2f6d16205b32162128d3f62d5ca678db37705f4a..97397bcaa516b89ffdd2e16b9cdad7fe795b1c17 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 2553ff020a1906e932fb54717cf6e32379708901..5111dfb993a0bc2d176045e86f6898f0f142610b 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 31422e5b507f23a4a2128a0f4c332c287a5cd397..7efa5635b5c41be95d466fd38bb54fdcfdf9b46b 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 673d7e30e313e95f75a3c22307e0a4f56a4472a7..3f16e7b53bf14374df2f8d0e0b8517d18bb78c11 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 e50bc2638d1e62b60f6fb31f3ad79d8743ef9c46..8619d0090d6ea6c3f5693373acacb9e307a09626 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 2c9b8b406a86f15c7a6bc0f9ac9a8eefcb373b50..9be1c0193f6f7d100385ddc482aecbbde983f341 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 8111f985cd378a6489c0c6ea3467eec7ae220b76..eb38bf47bece4b5573969c06ab4d80b65a9bea6a 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 29c58a5bea9a3e43a28eee4c354fdb81f2bc83be..fad7a400711f034fef636ae8139f2068b012f468 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 172fa31d6b335db08ecbb55d3ac2bc7f45e44565..3d48fc663381e38cc19a0505eeb5bfe836138a54 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 27b07188ab937a4d536a6eb942c2905c566fed38..24412b5a6e27e8f446d3d1aa98f5c9ac9e03b54a 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 bbeb248f85caf472de6d2f38efc119b3c4fcf60d..b7525aa63f5f516811f673291a791ead51f10ca3 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 75c5740e870e4347c98b5b52b5bbfe960958924a..4f3e9705d8c7f99fbf16d6f68b2c6df7c764878c 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 21957240e245f41397f3de60322cb5af6fae4a94..bab0ec5bd49653802317cebe9c1dd0cd5c654a3f 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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 5fe04e3532adc30b8f868a66ddbb70a9f03a926e..91d5e77f5509809ef06adb4e853b10d7f60f3940 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]) + --components strings list of components, accepts comma-separated values (default [source-controller,kustomize-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/kustomize/controller.md b/docs/components/kustomize/controller.md index af699231c2d7a0a2e0dc4e8439ec887c59ebbdab..a9acf827e2dfa8397a00f74905bdcfd2e397164e 100644 --- a/docs/components/kustomize/controller.md +++ b/docs/components/kustomize/controller.md @@ -15,7 +15,7 @@ Features: - Health assessment of the deployed workloads - Runs pipelines in a specific order (depends-on relationship) - Prunes objects removed from source (garbage collection) -- Reports cluster state changes (Slack/Discord) +- Reports cluster state changes (alerting provided by notification-controller) Links: diff --git a/docs/components/notification/controller.md b/docs/components/notification/controller.md new file mode 100644 index 0000000000000000000000000000000000000000..6d5fac414a19bf1b9051c6604119144b82e48b28 --- /dev/null +++ b/docs/components/notification/controller.md @@ -0,0 +1,16 @@ +# Notification Controller + +The Notification Controller is a Kubernetes operator, +specialized in dispatching events to external systems such as +Slack, Microsoft Teams, Discord and Rocket chat. + +The controller receives events via HTTP and dispatch them to external +webhooks based on event severity and involved objects. + +The controller can be configured with Kubernetes custom resources that +define how events are processed and where to dispatch them. + +Links: + +- Source code [fluxcd/notification-controller](https://github.com/fluxcd/notification-controller) +- Specification [docs](https://github.com/fluxcd/notification-controller/tree/master/docs/spec) diff --git a/docs/index.md b/docs/index.md index 46bae307f76cce89b5c765f494068fa7158a1f46..b66b709bd7d87a0d85f9b8dfd04ed8a94c4cc652 100644 --- a/docs/index.md +++ b/docs/index.md @@ -41,6 +41,9 @@ Components: - [HelmRepository CRD](components/source/helmrepositories.md) - [Kustomize Controller](components/kustomize/controller.md) - [Kustomization CRD](components/kustomize/kustomization.md) +- [Notification Controller](components/notification/controller.md) + - [Provider CRD](components/notification/provider.md) + - [Alert CRD](components/notification/alert.md) - Helm Controller (TBA) To get started with the toolkit please follow this [guide](get-started/index.md). diff --git a/docs/roadmap/index.md b/docs/roadmap/index.md index 172ebe8edca7a94015d2cc4934a2d3ef797351b1..dff5ec1970ad04e8090be252c6bb95e6b326ee9f 100644 --- a/docs/roadmap/index.md +++ b/docs/roadmap/index.md @@ -28,12 +28,12 @@ Non-Goals Tasks - Review the git source and kustomize APIs -- Design the events API +- ~~Design the events API~~ - Implement events in source and kustomize controllers - Implement Prometheus metrics in source and kustomize controllers - Make the kustomize-controller apply/gc events on-par with Flux v1 apply events -- Design the notifications and events filtering API -- Implement a notification controller for Slack, MS Teams, Discord, Rocket +- ~~Design the notifications and events filtering API~~ +- ~~Implement a notification controller for Slack, MS Teams, Discord, Rocket~~ - Implement the migration command in tk - Create a migration guide for `flux.yaml` kustomize users diff --git a/manifests/bases/kustomize-controller/kustomization.yaml b/manifests/bases/kustomize-controller/kustomization.yaml index 4b7ca6b71a0b6c22faf90b61f5b97849804e2349..aae438f29f7a32008a63bf19755862d9f0a806e9 100644 --- a/manifests/bases/kustomize-controller/kustomization.yaml +++ b/manifests/bases/kustomize-controller/kustomization.yaml @@ -1,5 +1,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- github.com/fluxcd/kustomize-controller/config//crd?ref=v0.0.1 -- github.com/fluxcd/kustomize-controller/config//manager?ref=v0.0.1 +- github.com/fluxcd/kustomize-controller/config//crd?ref=v0.0.2 +- github.com/fluxcd/kustomize-controller/config//manager?ref=v0.0.2 +patchesJson6902: +- target: + group: apps + version: v1 + kind: Deployment + name: kustomize-controller + path: patch.yaml diff --git a/manifests/bases/kustomize-controller/patch.yaml b/manifests/bases/kustomize-controller/patch.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e5ee6192cd7cdf04722a4b82285065de5c0b872f --- /dev/null +++ b/manifests/bases/kustomize-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/bases/notification-controller/kustomization.yaml b/manifests/bases/notification-controller/kustomization.yaml new file mode 100644 index 0000000000000000000000000000000000000000..07291a16bb8558e6318f961efbb1fdde410f8a79 --- /dev/null +++ b/manifests/bases/notification-controller/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: +- github.com/fluxcd/notification-controller/config//crd?ref=v0.0.1-alpha.2 +- github.com/fluxcd/notification-controller/config//manager?ref=v0.0.1-alpha.2 diff --git a/manifests/install/kustomization.yaml b/manifests/install/kustomization.yaml index f5e991b056abc3ef40246c0ce338c8b3229f1d82..95a5835c7553dafb2f6f279667df2a5dac0a75f0 100644 --- a/manifests/install/kustomization.yaml +++ b/manifests/install/kustomization.yaml @@ -5,6 +5,7 @@ resources: - namespace.yaml - ../bases/source-controller - ../bases/kustomize-controller + - ../bases/notification-controller - ../rbac - ../policies transformers: diff --git a/manifests/rbac/role.yaml b/manifests/rbac/role.yaml index 7a919de3b6ac7f005f6476a11da628ae1feebeb3..a2085be4c6656fa631aff486bf36edfc7bc69da2 100644 --- a/manifests/rbac/role.yaml +++ b/manifests/rbac/role.yaml @@ -9,6 +9,9 @@ rules: - apiGroups: ['kustomize.fluxcd.io'] resources: ['*'] verbs: ['*'] +- apiGroups: ['notification.fluxcd.io'] + resources: ['*'] + verbs: ['*'] - apiGroups: - "" resources: diff --git a/mkdocs.yml b/mkdocs.yml index 26e27d07a40313d6acf3519cf05ec1ca49044264..a60a69c0ad396f004c2808bb712565d138e6833e 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -48,6 +48,12 @@ nav: - Overview: components/kustomize/controller.md - Kustomization CRD: components/kustomize/kustomization.md - Kustomize API Reference: components/kustomize/api.md + - Notification Controller: + - Overview: components/notification/controller.md + - Profile CRD: components/notification/profile.md + - Alert CRD: components/notification/alert.md + - Event: components/notification/event.md + - Notification API Reference: components/notification/api.md - Toolkit CLI: - Overview: cmd/tk.md - Bootstrap: cmd/tk_bootstrap.md