diff --git a/cmd/flux/create_image_update.go b/cmd/flux/create_image_update.go index d7179514..e9f637df 100644 --- a/cmd/flux/create_image_update.go +++ b/cmd/flux/create_image_update.go @@ -38,9 +38,9 @@ mentioned in YAMLs in a git repository.`, --git-repo-ref=flux-system \ --git-repo-path="./clusters/my-cluster" \ --checkout-branch=main \ - --author-name=flux \ - --author-email=flux@example.com \ - --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" + --author-name=flux \ + --author-email=flux@example.com \ + --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" # Configure image updates to push changes to a different branch, if the branch doesn't exists it will be created flux create image update flux-system \ @@ -48,9 +48,9 @@ mentioned in YAMLs in a git repository.`, --git-repo-path="./clusters/my-cluster" \ --checkout-branch=main \ --push-branch=image-updates \ - --author-name=flux \ - --author-email=flux@example.com \ - --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" + --author-name=flux \ + --author-email=flux@example.com \ + --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" `, RunE: createImageUpdateRun, } diff --git a/cmd/flux/delete_image_updateauto.go b/cmd/flux/delete_image_update.go similarity index 100% rename from cmd/flux/delete_image_updateauto.go rename to cmd/flux/delete_image_update.go diff --git a/cmd/flux/export_image_updateauto.go b/cmd/flux/export_image_update.go similarity index 100% rename from cmd/flux/export_image_updateauto.go rename to cmd/flux/export_image_update.go diff --git a/cmd/flux/get.go b/cmd/flux/get.go index 7ef3583e..99591f7a 100644 --- a/cmd/flux/get.go +++ b/cmd/flux/get.go @@ -18,7 +18,9 @@ package main import ( "context" + "fmt" "os" + "strings" "github.com/spf13/cobra" apimeta "k8s.io/apimachinery/pkg/api/meta" @@ -32,8 +34,8 @@ import ( var getCmd = &cobra.Command{ Use: "get", - Short: "Get sources and resources", - Long: "The get sub-commands print the statuses of sources and resources.", + Short: "Get the resources and their status", + Long: "The get sub-commands print the statuses of Flux resources.", } type GetFlags struct { @@ -50,7 +52,7 @@ func init() { type summarisable interface { listAdapter - summariseItem(i int, includeNamespace bool) []string + summariseItem(i int, includeNamespace bool, includeKind bool) []string headers(includeNamespace bool) []string } @@ -63,11 +65,17 @@ func statusAndMessage(conditions []metav1.Condition) (string, string) { return string(metav1.ConditionFalse), "waiting to be reconciled" } -func nameColumns(item named, includeNamespace bool) []string { +func nameColumns(item named, includeNamespace bool, includeKind bool) []string { + name := item.GetName() + if includeKind { + name = fmt.Sprintf("%s/%s", + strings.ToLower(item.GetObjectKind().GroupVersionKind().Kind), + item.GetName()) + } if includeNamespace { - return []string{item.GetNamespace(), item.GetName()} + return []string{item.GetNamespace(), name} } - return []string{item.GetName()} + return []string{name} } var namespaceHeader = []string{"Namespace"} @@ -100,17 +108,25 @@ func (get getCommand) run(cmd *cobra.Command, args []string) error { return err } + getAll := cmd.Use == "all" + if get.list.len() == 0 { - logger.Failuref("no %s objects found in %s namespace", get.kind, rootArgs.namespace) + if !getAll { + logger.Failuref("no %s objects found in %s namespace", get.kind, rootArgs.namespace) + } return nil } header := get.list.headers(getArgs.allNamespaces) var rows [][]string for i := 0; i < get.list.len(); i++ { - row := get.list.summariseItem(i, getArgs.allNamespaces) + row := get.list.summariseItem(i, getArgs.allNamespaces, getAll) rows = append(rows, row) } utils.PrintTable(os.Stdout, header, rows) + + if getAll { + fmt.Println() + } return nil } diff --git a/cmd/flux/get_helmrelease.go b/cmd/flux/get_helmrelease.go index 4e5d9a04..b88c1cab 100644 --- a/cmd/flux/get_helmrelease.go +++ b/cmd/flux/get_helmrelease.go @@ -42,11 +42,11 @@ func init() { getCmd.AddCommand(getHelmReleaseCmd) } -func (a helmReleaseListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a helmReleaseListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] revision := item.Status.LastAppliedRevision status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_image_all.go b/cmd/flux/get_image_all.go new file mode 100644 index 00000000..d934f186 --- /dev/null +++ b/cmd/flux/get_image_all.go @@ -0,0 +1,66 @@ +/* +Copyright 2021 The Flux authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + autov1 "github.com/fluxcd/image-automation-controller/api/v1alpha1" + imagev1 "github.com/fluxcd/image-reflector-controller/api/v1alpha1" + "github.com/spf13/cobra" +) + +var getImageAllCmd = &cobra.Command{ + Use: "all", + Short: "Get all image statuses", + Long: "The get image sub-commands print the statuses of all image objects.", + Example: ` # List all image objects in a namespace + flux get images all --namespace=flux-system + + # List all image objects in all namespaces + flux get images all --all-namespaces +`, + RunE: func(cmd *cobra.Command, args []string) error { + c := getCommand{ + apiType: imageRepositoryType, + list: imageRepositoryListAdapter{&imagev1.ImageRepositoryList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + c = getCommand{ + apiType: imagePolicyType, + list: &imagePolicyListAdapter{&imagev1.ImagePolicyList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + c = getCommand{ + apiType: imageUpdateAutomationType, + list: &imageUpdateAutomationListAdapter{&autov1.ImageUpdateAutomationList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + return nil + }, +} + +func init() { + getImageCmd.AddCommand(getImageAllCmd) +} diff --git a/cmd/flux/get_image_policy.go b/cmd/flux/get_image_policy.go index 58468943..a999b74e 100644 --- a/cmd/flux/get_image_policy.go +++ b/cmd/flux/get_image_policy.go @@ -42,10 +42,10 @@ func init() { getImageCmd.AddCommand(getImagePolicyCmd) } -func (s imagePolicyListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (s imagePolicyListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := s.Items[i] status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), status, msg, item.Status.LatestImage) + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, item.Status.LatestImage) } func (s imagePolicyListAdapter) headers(includeNamespace bool) []string { diff --git a/cmd/flux/get_image_repository.go b/cmd/flux/get_image_repository.go index c8a8583d..1e643153 100644 --- a/cmd/flux/get_image_repository.go +++ b/cmd/flux/get_image_repository.go @@ -46,14 +46,14 @@ func init() { getImageCmd.AddCommand(getImageRepositoryCmd) } -func (s imageRepositoryListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (s imageRepositoryListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := s.Items[i] status, msg := statusAndMessage(item.Status.Conditions) var lastScan string if item.Status.LastScanResult != nil { lastScan = item.Status.LastScanResult.ScanTime.Time.Format(time.RFC3339) } - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, lastScan, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_image_updateauto.go b/cmd/flux/get_image_update.go similarity index 90% rename from cmd/flux/get_image_updateauto.go rename to cmd/flux/get_image_update.go index b56bea18..fc96e4f2 100644 --- a/cmd/flux/get_image_updateauto.go +++ b/cmd/flux/get_image_update.go @@ -46,14 +46,14 @@ func init() { getImageCmd.AddCommand(getImageUpdateCmd) } -func (s imageUpdateAutomationListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (s imageUpdateAutomationListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := s.Items[i] status, msg := statusAndMessage(item.Status.Conditions) var lastRun string if item.Status.LastAutomationRunTime != nil { lastRun = item.Status.LastAutomationRunTime.Time.Format(time.RFC3339) } - return append(nameColumns(&item, includeNamespace), status, msg, lastRun, strings.Title(strconv.FormatBool(item.Spec.Suspend))) + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, lastRun, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } func (s imageUpdateAutomationListAdapter) headers(includeNamespace bool) []string { diff --git a/cmd/flux/get_kustomization.go b/cmd/flux/get_kustomization.go index 3d661ef8..c5b9e4f4 100644 --- a/cmd/flux/get_kustomization.go +++ b/cmd/flux/get_kustomization.go @@ -42,11 +42,11 @@ func init() { getCmd.AddCommand(getKsCmd) } -func (a kustomizationListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a kustomizationListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] revision := item.Status.LastAppliedRevision status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_source_all.go b/cmd/flux/get_source_all.go new file mode 100644 index 00000000..26fa2261 --- /dev/null +++ b/cmd/flux/get_source_all.go @@ -0,0 +1,73 @@ +/* +Copyright 2021 The Flux authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + sourcev1 "github.com/fluxcd/source-controller/api/v1beta1" + "github.com/spf13/cobra" +) + +var getSourceAllCmd = &cobra.Command{ + Use: "all", + Short: "Get all source statuses", + Long: "The get sources all command print the statuses of all sources.", + Example: ` # List all sources in a namespace + flux get sources all --namespace=flux-system + + # List all sources in all namespaces + flux get sources all --all-namespaces +`, + RunE: func(cmd *cobra.Command, args []string) error { + c := getCommand{ + apiType: bucketType, + list: &bucketListAdapter{&sourcev1.BucketList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + c = getCommand{ + apiType: gitRepositoryType, + list: &gitRepositoryListAdapter{&sourcev1.GitRepositoryList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + c = getCommand{ + apiType: helmRepositoryType, + list: &helmRepositoryListAdapter{&sourcev1.HelmRepositoryList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + c = getCommand{ + apiType: helmChartType, + list: &helmChartListAdapter{&sourcev1.HelmChartList{}}, + } + if err := c.run(cmd, args); err != nil { + logger.Failuref(err.Error()) + } + + return nil + }, +} + +func init() { + getSourceCmd.AddCommand(getSourceAllCmd) +} diff --git a/cmd/flux/get_source_bucket.go b/cmd/flux/get_source_bucket.go index 69a97039..f141a3db 100644 --- a/cmd/flux/get_source_bucket.go +++ b/cmd/flux/get_source_bucket.go @@ -44,14 +44,14 @@ func init() { getSourceCmd.AddCommand(getSourceBucketCmd) } -func (a *bucketListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a *bucketListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] var revision string if item.GetArtifact() != nil { revision = item.GetArtifact().Revision } status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_source_chart.go b/cmd/flux/get_source_chart.go index 1033041b..c2763d03 100644 --- a/cmd/flux/get_source_chart.go +++ b/cmd/flux/get_source_chart.go @@ -44,14 +44,14 @@ func init() { getSourceCmd.AddCommand(getSourceHelmChartCmd) } -func (a *helmChartListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a *helmChartListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] var revision string if item.GetArtifact() != nil { revision = item.GetArtifact().Revision } status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_source_git.go b/cmd/flux/get_source_git.go index 79bbbe5a..c81162fb 100644 --- a/cmd/flux/get_source_git.go +++ b/cmd/flux/get_source_git.go @@ -44,14 +44,14 @@ func init() { getSourceCmd.AddCommand(getSourceGitCmd) } -func (a *gitRepositoryListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a *gitRepositoryListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] var revision string if item.GetArtifact() != nil { revision = item.GetArtifact().Revision } status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/get_source_helm.go b/cmd/flux/get_source_helm.go index 55ab1c81..5da8aa56 100644 --- a/cmd/flux/get_source_helm.go +++ b/cmd/flux/get_source_helm.go @@ -44,14 +44,14 @@ func init() { getSourceCmd.AddCommand(getSourceHelmCmd) } -func (a *helmRepositoryListAdapter) summariseItem(i int, includeNamespace bool) []string { +func (a *helmRepositoryListAdapter) summariseItem(i int, includeNamespace bool, includeKind bool) []string { item := a.Items[i] var revision string if item.GetArtifact() != nil { revision = item.GetArtifact().Revision } status, msg := statusAndMessage(item.Status.Conditions) - return append(nameColumns(&item, includeNamespace), + return append(nameColumns(&item, includeNamespace, includeKind), status, msg, revision, strings.Title(strconv.FormatBool(item.Spec.Suspend))) } diff --git a/cmd/flux/object.go b/cmd/flux/object.go index 39998167..75a20298 100644 --- a/cmd/flux/object.go +++ b/cmd/flux/object.go @@ -17,6 +17,7 @@ limitations under the License. package main import ( + "k8s.io/apimachinery/pkg/runtime/schema" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -62,6 +63,7 @@ func (c universalAdapter) asClientObject() client.Object { type named interface { GetName() string GetNamespace() string + GetObjectKind() schema.ObjectKind SetName(string) SetNamespace(string) } diff --git a/cmd/flux/source.go b/cmd/flux/source.go index 411282b7..2cf0477f 100644 --- a/cmd/flux/source.go +++ b/cmd/flux/source.go @@ -70,7 +70,7 @@ func (a helmChartAdapter) asClientObject() client.Object { return a.HelmChart } -// sourcev1.ImagePolicyList +// sourcev1.HelmChartList type helmChartListAdapter struct { *sourcev1.HelmChartList diff --git a/docs/cmd/flux.md b/docs/cmd/flux.md index a7a9f736..1d46a809 100644 --- a/docs/cmd/flux.md +++ b/docs/cmd/flux.md @@ -83,7 +83,7 @@ Command line utility for assembling Kubernetes CD pipelines the GitOps way. * [flux create](flux_create.md) - Create or update sources and resources * [flux delete](flux_delete.md) - Delete sources and resources * [flux export](flux_export.md) - Export resources in YAML format -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status * [flux install](flux_install.md) - Install or upgrade Flux * [flux logs](flux_logs.md) - Display formatted logs for Flux components * [flux reconcile](flux_reconcile.md) - Reconcile sources and resources diff --git a/docs/cmd/flux_create_image_update.md b/docs/cmd/flux_create_image_update.md index 2e49fa1f..28b96769 100644 --- a/docs/cmd/flux_create_image_update.md +++ b/docs/cmd/flux_create_image_update.md @@ -20,9 +20,9 @@ flux create image update [name] [flags] --git-repo-ref=flux-system \ --git-repo-path="./clusters/my-cluster" \ --checkout-branch=main \ - --author-name=flux \ - --author-email=flux@example.com \ - --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" + --author-name=flux \ + --author-email=flux@example.com \ + --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" # Configure image updates to push changes to a different branch, if the branch doesn't exists it will be created flux create image update flux-system \ @@ -30,9 +30,9 @@ flux create image update [name] [flags] --git-repo-path="./clusters/my-cluster" \ --checkout-branch=main \ --push-branch=image-updates \ - --author-name=flux \ - --author-email=flux@example.com \ - --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" + --author-name=flux \ + --author-email=flux@example.com \ + --commit-template="{{range .Updated.Images}}{{println .}}{{end}}" ``` diff --git a/docs/cmd/flux_get.md b/docs/cmd/flux_get.md index 676d91b1..13a3cb47 100644 --- a/docs/cmd/flux_get.md +++ b/docs/cmd/flux_get.md @@ -1,10 +1,10 @@ ## flux get -Get sources and resources +Get the resources and their status ### Synopsis -The get sub-commands print the statuses of sources and resources. +The get sub-commands print the statuses of Flux resources. ### Options diff --git a/docs/cmd/flux_get_alert-providers.md b/docs/cmd/flux_get_alert-providers.md index dc6c6363..759ca712 100644 --- a/docs/cmd/flux_get_alert-providers.md +++ b/docs/cmd/flux_get_alert-providers.md @@ -37,5 +37,5 @@ flux get alert-providers [flags] ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status diff --git a/docs/cmd/flux_get_alerts.md b/docs/cmd/flux_get_alerts.md index 95ad7672..d58bdb3a 100644 --- a/docs/cmd/flux_get_alerts.md +++ b/docs/cmd/flux_get_alerts.md @@ -37,5 +37,5 @@ flux get alerts [flags] ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status diff --git a/docs/cmd/flux_get_helmreleases.md b/docs/cmd/flux_get_helmreleases.md index 9a7bc66c..2de9ad90 100644 --- a/docs/cmd/flux_get_helmreleases.md +++ b/docs/cmd/flux_get_helmreleases.md @@ -37,5 +37,5 @@ flux get helmreleases [flags] ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status diff --git a/docs/cmd/flux_get_images.md b/docs/cmd/flux_get_images.md index c349f5eb..bffce6cc 100644 --- a/docs/cmd/flux_get_images.md +++ b/docs/cmd/flux_get_images.md @@ -25,7 +25,8 @@ The get image sub-commands print the status of image automation objects. ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status +* [flux get images all](flux_get_images_all.md) - Get all image statuses * [flux get images policy](flux_get_images_policy.md) - Get ImagePolicy status * [flux get images repository](flux_get_images_repository.md) - Get ImageRepository status * [flux get images update](flux_get_images_update.md) - Get ImageUpdateAutomation status diff --git a/docs/cmd/flux_get_images_all.md b/docs/cmd/flux_get_images_all.md new file mode 100644 index 00000000..3958b059 --- /dev/null +++ b/docs/cmd/flux_get_images_all.md @@ -0,0 +1,44 @@ +## flux get images all + +Get all image statuses + +### Synopsis + +The get image sub-commands print the statuses of all image objects. + +``` +flux get images all [flags] +``` + +### Examples + +``` + # List all image objects in a namespace + flux get images all --namespace=flux-system + + # List all image objects in all namespaces + flux get images all --all-namespaces + +``` + +### Options + +``` + -h, --help help for all +``` + +### Options inherited from parent commands + +``` + -A, --all-namespaces list the requested object(s) across all namespaces + --context string kubernetes context to use + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + -n, --namespace string the namespace scope for this operation (default "flux-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects +``` + +### SEE ALSO + +* [flux get images](flux_get_images.md) - Get image automation object status + diff --git a/docs/cmd/flux_get_kustomizations.md b/docs/cmd/flux_get_kustomizations.md index f4a2fd42..269b1117 100644 --- a/docs/cmd/flux_get_kustomizations.md +++ b/docs/cmd/flux_get_kustomizations.md @@ -37,5 +37,5 @@ flux get kustomizations [flags] ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status diff --git a/docs/cmd/flux_get_receivers.md b/docs/cmd/flux_get_receivers.md index 94d27afa..28fe32cf 100644 --- a/docs/cmd/flux_get_receivers.md +++ b/docs/cmd/flux_get_receivers.md @@ -37,5 +37,5 @@ flux get receivers [flags] ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status diff --git a/docs/cmd/flux_get_sources.md b/docs/cmd/flux_get_sources.md index 780cde02..c57a58d6 100644 --- a/docs/cmd/flux_get_sources.md +++ b/docs/cmd/flux_get_sources.md @@ -25,7 +25,8 @@ The get source sub-commands print the statuses of the sources. ### SEE ALSO -* [flux get](flux_get.md) - Get sources and resources +* [flux get](flux_get.md) - Get the resources and their status +* [flux get sources all](flux_get_sources_all.md) - Get all source statuses * [flux get sources bucket](flux_get_sources_bucket.md) - Get Bucket source statuses * [flux get sources chart](flux_get_sources_chart.md) - Get HelmChart statuses * [flux get sources git](flux_get_sources_git.md) - Get GitRepository source statuses diff --git a/docs/cmd/flux_get_sources_all.md b/docs/cmd/flux_get_sources_all.md new file mode 100644 index 00000000..3f286bbd --- /dev/null +++ b/docs/cmd/flux_get_sources_all.md @@ -0,0 +1,44 @@ +## flux get sources all + +Get all source statuses + +### Synopsis + +The get sources all command print the statuses of all sources. + +``` +flux get sources all [flags] +``` + +### Examples + +``` + # List all sources in a namespace + flux get sources all --namespace=flux-system + + # List all sources in all namespaces + flux get sources all --all-namespaces + +``` + +### Options + +``` + -h, --help help for all +``` + +### Options inherited from parent commands + +``` + -A, --all-namespaces list the requested object(s) across all namespaces + --context string kubernetes context to use + --kubeconfig string path to the kubeconfig file (default "~/.kube/config") + -n, --namespace string the namespace scope for this operation (default "flux-system") + --timeout duration timeout for this operation (default 5m0s) + --verbose print generated objects +``` + +### SEE ALSO + +* [flux get sources](flux_get_sources.md) - Get source statuses + diff --git a/mkdocs.yml b/mkdocs.yml index ef5e6bba..d9714ddb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -148,6 +148,7 @@ nav: - Get kustomizations: cmd/flux_get_kustomizations.md - Get helmreleases: cmd/flux_get_helmreleases.md - Get sources: cmd/flux_get_sources.md + - Get sources all: cmd/flux_get_sources_all.md - Get sources git: cmd/flux_get_sources_git.md - Get sources helm: cmd/flux_get_sources_helm.md - Get sources chart: cmd/flux_get_sources_chart.md @@ -157,6 +158,7 @@ nav: - Get alert providers: cmd/flux_get_alert-providers.md - Get receivers: cmd/flux_get_receivers.md - Get images: cmd/flux_get_images.md + - Get images all: cmd/flux_get_images_all.md - Get images policy: cmd/flux_get_images_policy.md - Get images repository: cmd/flux_get_images_repository.md - Get images update: cmd/flux_get_images_update.md