add a preview note for all non-bootstrap commands

Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
pull/3758/head
Sanskar Jaiswal 2 years ago committed by Stefan Prodan
parent 52acac1a37
commit 97b064be13
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF

@ -23,7 +23,7 @@ import (
var buildCmd = &cobra.Command{ var buildCmd = &cobra.Command{
Use: "build", Use: "build",
Short: "Build a flux resource", Short: "Build a flux resource",
Long: "The build command is used to build flux resources.", Long: `The build command is used to build flux resources.`,
} }
func init() { func init() {

@ -33,7 +33,8 @@ import (
var buildArtifactCmd = &cobra.Command{ var buildArtifactCmd = &cobra.Command{
Use: "artifact", Use: "artifact",
Short: "Build artifact", Short: "Build artifact",
Long: `The build artifact command creates a tgz file with the manifests from the given directory or a single manifest file.`, Long: withPreviewNote(`The build artifact command creates a tgz file with the manifests
from the given directory or a single manifest file.`),
Example: ` # Build the given manifests directory into an artifact Example: ` # Build the given manifests directory into an artifact
flux build artifact --path ./path/to/local/manifests --output ./path/to/artifact.tgz flux build artifact --path ./path/to/local/manifests --output ./path/to/artifact.tgz

@ -39,8 +39,8 @@ import (
var checkCmd = &cobra.Command{ var checkCmd = &cobra.Command{
Use: "check", Use: "check",
Short: "Check requirements and installation", Short: "Check requirements and installation",
Long: `The check command will perform a series of checks to validate that Long: withPreviewNote(`The check command will perform a series of checks to validate that
the local environment is configured correctly and if the installed components are healthy.`, the local environment is configured correctly and if the installed components are healthy.`),
Example: ` # Run pre-installation checks Example: ` # Run pre-installation checks
flux check --pre flux check --pre

@ -31,7 +31,7 @@ import (
var completionCmd = &cobra.Command{ var completionCmd = &cobra.Command{
Use: "completion", Use: "completion",
Short: "Generates completion scripts for various shells", Short: "Generates completion scripts for various shells",
Long: "The completion sub-command generates completion scripts for various shells", Long: `The completion sub-command generates completion scripts for various shells.`,
} }
func init() { func init() {

@ -25,6 +25,7 @@ import (
var completionBashCmd = &cobra.Command{ var completionBashCmd = &cobra.Command{
Use: "bash", Use: "bash",
Short: "Generates bash completion scripts", Short: "Generates bash completion scripts",
Long: `The completion sub-command generates completion scripts for bash.`,
Example: `To load completion run Example: `To load completion run
. <(flux completion bash) . <(flux completion bash)

@ -25,6 +25,7 @@ import (
var completionFishCmd = &cobra.Command{ var completionFishCmd = &cobra.Command{
Use: "fish", Use: "fish",
Short: "Generates fish completion scripts", Short: "Generates fish completion scripts",
Long: `The completion sub-command generates completion scripts for fish.`,
Example: `To configure your fish shell to load completions for each session write this script to your completions dir: Example: `To configure your fish shell to load completions for each session write this script to your completions dir:
flux completion fish > ~/.config/fish/completions/flux.fish flux completion fish > ~/.config/fish/completions/flux.fish

@ -25,6 +25,7 @@ import (
var completionPowerShellCmd = &cobra.Command{ var completionPowerShellCmd = &cobra.Command{
Use: "powershell", Use: "powershell",
Short: "Generates powershell completion scripts", Short: "Generates powershell completion scripts",
Long: `The completion sub-command generates completion scripts for powershell.`,
Example: `To load completion run Example: `To load completion run
. <(flux completion powershell) . <(flux completion powershell)

@ -26,6 +26,7 @@ import (
var completionZshCmd = &cobra.Command{ var completionZshCmd = &cobra.Command{
Use: "zsh", Use: "zsh",
Short: "Generates zsh completion scripts", Short: "Generates zsh completion scripts",
Long: `The completion sub-command generates completion scripts for zsh.`,
Example: `To load completion run Example: `To load completion run
. <(flux completion zsh) . <(flux completion zsh)

@ -36,7 +36,7 @@ import (
var createCmd = &cobra.Command{ var createCmd = &cobra.Command{
Use: "create", Use: "create",
Short: "Create or update sources and resources", Short: "Create or update sources and resources",
Long: "The create sub-commands generate sources and resources.", Long: `The create sub-commands generate sources and resources.`,
} }
type createFlags struct { type createFlags struct {

@ -38,7 +38,7 @@ import (
var createAlertCmd = &cobra.Command{ var createAlertCmd = &cobra.Command{
Use: "alert [name]", Use: "alert [name]",
Short: "Create or update a Alert resource", Short: "Create or update a Alert resource",
Long: "The create alert command generates a Alert resource.", Long: withPreviewNote(`The create alert command generates a Alert resource.`),
Example: ` # Create an Alert for kustomization events Example: ` # Create an Alert for kustomization events
flux create alert \ flux create alert \
--event-severity info \ --event-severity info \

@ -37,7 +37,7 @@ import (
var createAlertProviderCmd = &cobra.Command{ var createAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]", Use: "alert-provider [name]",
Short: "Create or update a Provider resource", Short: "Create or update a Provider resource",
Long: "The create alert-provider command generates a Provider resource.", Long: withPreviewNote(`The create alert-provider command generates a Provider resource.`),
Example: ` # Create a Provider for a Slack channel Example: ` # Create a Provider for a Slack channel
flux create alert-provider slack \ flux create alert-provider slack \
--type slack \ --type slack \

@ -46,7 +46,7 @@ var createHelmReleaseCmd = &cobra.Command{
Use: "helmrelease [name]", Use: "helmrelease [name]",
Aliases: []string{"hr"}, Aliases: []string{"hr"},
Short: "Create or update a HelmRelease resource", Short: "Create or update a HelmRelease resource",
Long: "The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.", Long: withPreviewNote(`The helmrelease create command generates a HelmRelease resource for a given HelmRepository source.`),
Example: ` # Create a HelmRelease with a chart from a HelmRepository source Example: ` # Create a HelmRelease with a chart from a HelmRepository source
flux create hr podinfo \ flux create hr podinfo \
--interval=10m \ --interval=10m \

@ -20,14 +20,12 @@ import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )
const createImageLong = `The create image sub-commands work with image automation objects; that is,
object controlling updates to git based on e.g., new container images
being available.`
var createImageCmd = &cobra.Command{ var createImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Create or update resources dealing with image automation", Short: "Create or update resources dealing with image automation",
Long: createImageLong, Long: `The create image sub-commands work with image automation objects;
that is, object controlling updates to git based on e.g., new container images
being available.`,
} }
func init() { func init() {

@ -34,12 +34,12 @@ import (
var createImagePolicyCmd = &cobra.Command{ var createImagePolicyCmd = &cobra.Command{
Use: "policy [name]", Use: "policy [name]",
Short: "Create or update an ImagePolicy object", Short: "Create or update an ImagePolicy object",
Long: `The create image policy command generates an ImagePolicy resource. Long: withPreviewNote(`The create image policy command generates an ImagePolicy resource.
An ImagePolicy object calculates a "latest image" given an image An ImagePolicy object calculates a "latest image" given an image
repository and a policy, e.g., semver. repository and a policy, e.g., semver.
The image that sorts highest according to the policy is recorded in The image that sorts highest according to the policy is recorded in
the status of the object.`, the status of the object.`),
Example: ` # Create an ImagePolicy to select the latest stable release Example: ` # Create an ImagePolicy to select the latest stable release
flux create image policy podinfo \ flux create image policy podinfo \
--image-ref=podinfo \ --image-ref=podinfo \

@ -32,8 +32,8 @@ import (
var createImageRepositoryCmd = &cobra.Command{ var createImageRepositoryCmd = &cobra.Command{
Use: "repository [name]", Use: "repository [name]",
Short: "Create or update an ImageRepository object", Short: "Create or update an ImageRepository object",
Long: `The create image repository command generates an ImageRepository resource. Long: withPreviewNote(`The create image repository command generates an ImageRepository resource.
An ImageRepository object specifies an image repository to scan.`, An ImageRepository object specifies an image repository to scan.`),
Example: ` # Create an ImageRepository object to scan the alpine image repository: Example: ` # Create an ImageRepository object to scan the alpine image repository:
flux create image repository alpine-repo --image alpine --interval 20m flux create image repository alpine-repo --image alpine --interval 20m

@ -29,9 +29,9 @@ import (
var createImageUpdateCmd = &cobra.Command{ var createImageUpdateCmd = &cobra.Command{
Use: "update [name]", Use: "update [name]",
Short: "Create or update an ImageUpdateAutomation object", Short: "Create or update an ImageUpdateAutomation object",
Long: `The create image update command generates an ImageUpdateAutomation resource. Long: withPreviewNote(`The create image update command generates an ImageUpdateAutomation resource.
An ImageUpdateAutomation object specifies an automated update to images An ImageUpdateAutomation object specifies an automated update to images
mentioned in YAMLs in a git repository.`, mentioned in YAMLs in a git repository.`),
Example: ` # Configure image updates for the main repository created by flux bootstrap Example: ` # Configure image updates for the main repository created by flux bootstrap
flux create image update flux-system \ flux create image update flux-system \
--git-repo-ref=flux-system \ --git-repo-ref=flux-system \

@ -42,7 +42,7 @@ var createKsCmd = &cobra.Command{
Use: "kustomization [name]", Use: "kustomization [name]",
Aliases: []string{"ks"}, Aliases: []string{"ks"},
Short: "Create or update a Kustomization resource", Short: "Create or update a Kustomization resource",
Long: "The create command generates a Kustomization resource for a given source.", Long: `The create command generates a Kustomization resource for a given source.`,
Example: ` # Create a Kustomization resource from a source at a given path Example: ` # Create a Kustomization resource from a source at a given path
flux create kustomization kyverno \ flux create kustomization kyverno \
--source=GitRepository/kyverno \ --source=GitRepository/kyverno \

@ -37,7 +37,7 @@ import (
var createReceiverCmd = &cobra.Command{ var createReceiverCmd = &cobra.Command{
Use: "receiver [name]", Use: "receiver [name]",
Short: "Create or update a Receiver resource", Short: "Create or update a Receiver resource",
Long: "The create receiver command generates a Receiver resource.", Long: `The create receiver command generates a Receiver resource.`,
Example: ` # Create a Receiver Example: ` # Create a Receiver
flux create receiver github-receiver \ flux create receiver github-receiver \
--type github \ --type github \

@ -29,7 +29,7 @@ import (
var createSecretCmd = &cobra.Command{ var createSecretCmd = &cobra.Command{
Use: "secret", Use: "secret",
Short: "Create or update Kubernetes secrets", Short: "Create or update Kubernetes secrets",
Long: "The create source sub-commands generate Kubernetes secrets specific to Flux.", Long: `The create source sub-commands generate Kubernetes secrets specific to Flux.`,
} }
func init() { func init() {

@ -36,8 +36,10 @@ var createSecretGitCmd = &cobra.Command{
Use: "git [name]", Use: "git [name]",
Short: "Create or update a Kubernetes secret for Git authentication", Short: "Create or update a Kubernetes secret for Git authentication",
Long: `The create secret git command generates a Kubernetes secret with Git credentials. Long: `The create secret git command generates a Kubernetes secret with Git credentials.
For Git over SSH, the host and SSH keys are automatically generated and stored in the secret. For Git over SSH, the host and SSH keys are automatically generated and stored
For Git over HTTP/S, the provided basic authentication credentials or bearer authentication token are stored in the secret.`, in the secret.
For Git over HTTP/S, the provided basic authentication credentials or bearer
authentication token are stored in the secret.`,
Example: ` # Create a Git SSH authentication secret using an ECDSA P-521 curve public key Example: ` # Create a Git SSH authentication secret using an ECDSA P-521 curve public key
flux create secret git podinfo-auth \ flux create secret git podinfo-auth \

@ -32,7 +32,7 @@ import (
var createSecretHelmCmd = &cobra.Command{ var createSecretHelmCmd = &cobra.Command{
Use: "helm [name]", Use: "helm [name]",
Short: "Create or update a Kubernetes secret for Helm repository authentication", Short: "Create or update a Kubernetes secret for Helm repository authentication",
Long: `The create secret helm command generates a Kubernetes secret with basic authentication credentials.`, Long: withPreviewNote(`The create secret helm command generates a Kubernetes secret with basic authentication credentials.`),
Example: ` # Create a Helm authentication secret on disk and encrypt it with Mozilla SOPS Example: ` # Create a Helm authentication secret on disk and encrypt it with Mozilla SOPS
flux create secret helm repo-auth \ flux create secret helm repo-auth \
--namespace=my-namespace \ --namespace=my-namespace \

@ -31,7 +31,7 @@ import (
var createSecretOCICmd = &cobra.Command{ var createSecretOCICmd = &cobra.Command{
Use: "oci [name]", Use: "oci [name]",
Short: "Create or update a Kubernetes image pull secret", Short: "Create or update a Kubernetes image pull secret",
Long: `The create secret oci command generates a Kubernetes secret that can be used for OCIRepository authentication`, Long: withPreviewNote(`The create secret oci command generates a Kubernetes secret that can be used for OCIRepository authentication`),
Example: ` # Create an OCI authentication secret on disk and encrypt it with Mozilla SOPS Example: ` # Create an OCI authentication secret on disk and encrypt it with Mozilla SOPS
flux create secret oci podinfo-auth \ flux create secret oci podinfo-auth \
--url=ghcr.io \ --url=ghcr.io \

@ -33,7 +33,7 @@ import (
var createSecretTLSCmd = &cobra.Command{ var createSecretTLSCmd = &cobra.Command{
Use: "tls [name]", Use: "tls [name]",
Short: "Create or update a Kubernetes secret with TLS certificates", Short: "Create or update a Kubernetes secret with TLS certificates",
Long: `The create secret tls command generates a Kubernetes secret with certificates for use with TLS.`, Long: withPreviewNote(`The create secret tls command generates a Kubernetes secret with certificates for use with TLS.`),
Example: ` # Create a TLS secret on disk and encrypt it with Mozilla SOPS. Example: ` # Create a TLS secret on disk and encrypt it with Mozilla SOPS.
# Files are expected to be PEM-encoded. # Files are expected to be PEM-encoded.
flux create secret tls certs \ flux create secret tls certs \

@ -25,7 +25,7 @@ import (
var createSourceCmd = &cobra.Command{ var createSourceCmd = &cobra.Command{
Use: "source", Use: "source",
Short: "Create or update sources", Short: "Create or update sources",
Long: "The create source sub-commands generate sources.", Long: `The create source sub-commands generate sources.`,
} }
type createSourceFlags struct { type createSourceFlags struct {

@ -42,8 +42,8 @@ import (
var createSourceBucketCmd = &cobra.Command{ var createSourceBucketCmd = &cobra.Command{
Use: "bucket [name]", Use: "bucket [name]",
Short: "Create or update a Bucket source", Short: "Create or update a Bucket source",
Long: `The create source bucket command generates a Bucket resource and waits for it to be downloaded. Long: withPreviewNote(`The create source bucket command generates a Bucket resource and waits for it to be downloaded.
For Buckets with static authentication, the credentials are stored in a Kubernetes secret.`, For Buckets with static authentication, the credentials are stored in a Kubernetes secret.`),
Example: ` # Create a source for a Bucket using static authentication Example: ` # Create a source for a Bucket using static authentication
flux create source bucket podinfo \ flux create source bucket podinfo \
--bucket-name=podinfo \ --bucket-name=podinfo \

@ -42,8 +42,8 @@ import (
var createSourceHelmCmd = &cobra.Command{ var createSourceHelmCmd = &cobra.Command{
Use: "helm [name]", Use: "helm [name]",
Short: "Create or update a HelmRepository source", Short: "Create or update a HelmRepository source",
Long: `The create source helm command generates a HelmRepository resource and waits for it to fetch the index. Long: withPreviewNote(`The create source helm command generates a HelmRepository resource and waits for it to fetch the index.
For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.`, For private Helm repositories, the basic authentication credentials are stored in a Kubernetes secret.`),
Example: ` # Create a source for an HTTPS public Helm repository Example: ` # Create a source for an HTTPS public Helm repository
flux create source helm podinfo \ flux create source helm podinfo \
--url=https://stefanprodan.github.io/podinfo \ --url=https://stefanprodan.github.io/podinfo \

@ -40,7 +40,7 @@ import (
var createSourceOCIRepositoryCmd = &cobra.Command{ var createSourceOCIRepositoryCmd = &cobra.Command{
Use: "oci [name]", Use: "oci [name]",
Short: "Create or update an OCIRepository", Short: "Create or update an OCIRepository",
Long: `The create source oci command generates an OCIRepository resource and waits for it to be ready.`, Long: withPreviewNote(`The create source oci command generates an OCIRepository resource and waits for it to be ready.`),
Example: ` # Create an OCIRepository for a public container image Example: ` # Create an OCIRepository for a public container image
flux create source oci podinfo \ flux create source oci podinfo \
--url=oci://ghcr.io/stefanprodan/manifests/podinfo \ --url=oci://ghcr.io/stefanprodan/manifests/podinfo \

@ -37,8 +37,8 @@ import (
var createTenantCmd = &cobra.Command{ var createTenantCmd = &cobra.Command{
Use: "tenant", Use: "tenant",
Short: "Create or update a tenant", Short: "Create or update a tenant",
Long: `The create tenant command generates namespaces, service accounts and role bindings to limit the Long: withPreviewNote(`The create tenant command generates namespaces, service accounts and role bindings to limit the
reconcilers scope to the tenant namespaces.`, reconcilers scope to the tenant namespaces.`),
Example: ` # Create a tenant with access to a namespace Example: ` # Create a tenant with access to a namespace
flux create tenant dev-team \ flux create tenant dev-team \
--with-namespace=frontend \ --with-namespace=frontend \

@ -30,7 +30,7 @@ import (
var deleteCmd = &cobra.Command{ var deleteCmd = &cobra.Command{
Use: "delete", Use: "delete",
Short: "Delete sources and resources", Short: "Delete sources and resources",
Long: "The delete sub-commands delete sources and resources.", Long: `The delete sub-commands delete sources and resources.`,
} }
type deleteFlags struct { type deleteFlags struct {

@ -25,7 +25,7 @@ import (
var deleteAlertCmd = &cobra.Command{ var deleteAlertCmd = &cobra.Command{
Use: "alert [name]", Use: "alert [name]",
Short: "Delete a Alert resource", Short: "Delete a Alert resource",
Long: "The delete alert command removes the given Alert from the cluster.", Long: withPreviewNote("The delete alert command removes the given Alert from the cluster."),
Example: ` # Delete an Alert and the Kubernetes resources created by it Example: ` # Delete an Alert and the Kubernetes resources created by it
flux delete alert main`, flux delete alert main`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)),

@ -25,7 +25,7 @@ import (
var deleteAlertProviderCmd = &cobra.Command{ var deleteAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]", Use: "alert-provider [name]",
Short: "Delete a Provider resource", Short: "Delete a Provider resource",
Long: "The delete alert-provider command removes the given Provider from the cluster.", Long: withPreviewNote("The delete alert-provider command removes the given Provider from the cluster."),
Example: ` # Delete a Provider and the Kubernetes resources created by it Example: ` # Delete a Provider and the Kubernetes resources created by it
flux delete alert-provider slack`, flux delete alert-provider slack`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ProviderKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ProviderKind)),

@ -26,7 +26,7 @@ var deleteHelmReleaseCmd = &cobra.Command{
Use: "helmrelease [name]", Use: "helmrelease [name]",
Aliases: []string{"hr"}, Aliases: []string{"hr"},
Short: "Delete a HelmRelease resource", Short: "Delete a HelmRelease resource",
Long: "The delete helmrelease command removes the given HelmRelease from the cluster.", Long: withPreviewNote("The delete helmrelease command removes the given HelmRelease from the cluster."),
Example: ` # Delete a Helm release and the Kubernetes resources created by it Example: ` # Delete a Helm release and the Kubernetes resources created by it
flux delete hr podinfo`, flux delete hr podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)), ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)),

@ -23,7 +23,7 @@ import (
var deleteImageCmd = &cobra.Command{ var deleteImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Delete image automation objects", Short: "Delete image automation objects",
Long: "The delete image sub-commands delete image automation objects.", Long: `The delete image sub-commands delete image automation objects.`,
} }
func init() { func init() {

@ -25,7 +25,7 @@ import (
var deleteImagePolicyCmd = &cobra.Command{ var deleteImagePolicyCmd = &cobra.Command{
Use: "policy [name]", Use: "policy [name]",
Short: "Delete an ImagePolicy object", Short: "Delete an ImagePolicy object",
Long: "The delete image policy command deletes the given ImagePolicy from the cluster.", Long: withPreviewNote(`The delete image policy command deletes the given ImagePolicy from the cluster.`),
Example: ` # Delete an image policy Example: ` # Delete an image policy
flux delete image policy alpine3.x`, flux delete image policy alpine3.x`,
ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImagePolicyKind)), ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImagePolicyKind)),

@ -25,7 +25,7 @@ import (
var deleteImageRepositoryCmd = &cobra.Command{ var deleteImageRepositoryCmd = &cobra.Command{
Use: "repository [name]", Use: "repository [name]",
Short: "Delete an ImageRepository object", Short: "Delete an ImageRepository object",
Long: "The delete image repository command deletes the given ImageRepository from the cluster.", Long: withPreviewNote("The delete image repository command deletes the given ImageRepository from the cluster."),
Example: ` # Delete an image repository Example: ` # Delete an image repository
flux delete image repository alpine`, flux delete image repository alpine`,
ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)), ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)),

@ -25,7 +25,7 @@ import (
var deleteImageUpdateCmd = &cobra.Command{ var deleteImageUpdateCmd = &cobra.Command{
Use: "update [name]", Use: "update [name]",
Short: "Delete an ImageUpdateAutomation object", Short: "Delete an ImageUpdateAutomation object",
Long: "The delete image update command deletes the given ImageUpdateAutomation from the cluster.", Long: withPreviewNote(`The delete image update command deletes the given ImageUpdateAutomation from the cluster.`),
Example: ` # Delete an image update automation Example: ` # Delete an image update automation
flux delete image update latest-images`, flux delete image update latest-images`,
ValidArgsFunction: resourceNamesCompletionFunc(autov1.GroupVersion.WithKind(autov1.ImageUpdateAutomationKind)), ValidArgsFunction: resourceNamesCompletionFunc(autov1.GroupVersion.WithKind(autov1.ImageUpdateAutomationKind)),

@ -26,7 +26,7 @@ var deleteKsCmd = &cobra.Command{
Use: "kustomization [name]", Use: "kustomization [name]",
Aliases: []string{"ks"}, Aliases: []string{"ks"},
Short: "Delete a Kustomization resource", Short: "Delete a Kustomization resource",
Long: "The delete kustomization command deletes the given Kustomization from the cluster.", Long: `The delete kustomization command deletes the given Kustomization from the cluster.`,
Example: ` # Delete a kustomization and the Kubernetes resources created by it when prune is enabled Example: ` # Delete a kustomization and the Kubernetes resources created by it when prune is enabled
flux delete kustomization podinfo`, flux delete kustomization podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(kustomizev1.GroupVersion.WithKind(kustomizev1.KustomizationKind)), ValidArgsFunction: resourceNamesCompletionFunc(kustomizev1.GroupVersion.WithKind(kustomizev1.KustomizationKind)),

@ -25,7 +25,7 @@ import (
var deleteReceiverCmd = &cobra.Command{ var deleteReceiverCmd = &cobra.Command{
Use: "receiver [name]", Use: "receiver [name]",
Short: "Delete a Receiver resource", Short: "Delete a Receiver resource",
Long: "The delete receiver command removes the given Receiver from the cluster.", Long: `The delete receiver command removes the given Receiver from the cluster.`,
Example: ` # Delete an Receiver and the Kubernetes resources created by it Example: ` # Delete an Receiver and the Kubernetes resources created by it
flux delete receiver main`, flux delete receiver main`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ReceiverKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ReceiverKind)),

@ -23,7 +23,7 @@ import (
var deleteSourceCmd = &cobra.Command{ var deleteSourceCmd = &cobra.Command{
Use: "source", Use: "source",
Short: "Delete sources", Short: "Delete sources",
Long: "The delete source sub-commands delete sources.", Long: `The delete source sub-commands delete sources.`,
} }
func init() { func init() {

@ -25,7 +25,7 @@ import (
var deleteSourceBucketCmd = &cobra.Command{ var deleteSourceBucketCmd = &cobra.Command{
Use: "bucket [name]", Use: "bucket [name]",
Short: "Delete a Bucket source", Short: "Delete a Bucket source",
Long: "The delete source bucket command deletes the given Bucket from the cluster.", Long: withPreviewNote("The delete source bucket command deletes the given Bucket from the cluster."),
Example: ` # Delete a Bucket source Example: ` # Delete a Bucket source
flux delete source bucket podinfo`, flux delete source bucket podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.BucketKind)), ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.BucketKind)),

@ -25,7 +25,7 @@ import (
var deleteSourceGitCmd = &cobra.Command{ var deleteSourceGitCmd = &cobra.Command{
Use: "git [name]", Use: "git [name]",
Short: "Delete a GitRepository source", Short: "Delete a GitRepository source",
Long: "The delete source git command deletes the given GitRepository from the cluster.", Long: `The delete source git command deletes the given GitRepository from the cluster.`,
Example: ` # Delete a Git repository Example: ` # Delete a Git repository
flux delete source git podinfo`, flux delete source git podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.GitRepositoryKind)), ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.GitRepositoryKind)),

@ -25,7 +25,7 @@ import (
var deleteSourceHelmCmd = &cobra.Command{ var deleteSourceHelmCmd = &cobra.Command{
Use: "helm [name]", Use: "helm [name]",
Short: "Delete a HelmRepository source", Short: "Delete a HelmRepository source",
Long: "The delete source helm command deletes the given HelmRepository from the cluster.", Long: withPreviewNote("The delete source helm command deletes the given HelmRepository from the cluster."),
Example: ` # Delete a Helm repository Example: ` # Delete a Helm repository
flux delete source helm podinfo`, flux delete source helm podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.HelmRepositoryKind)), ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.HelmRepositoryKind)),

@ -25,7 +25,7 @@ import (
var deleteSourceOCIRepositoryCmd = &cobra.Command{ var deleteSourceOCIRepositoryCmd = &cobra.Command{
Use: "oci [name]", Use: "oci [name]",
Short: "Delete an OCIRepository source", Short: "Delete an OCIRepository source",
Long: "The delete source oci command deletes the given OCIRepository from the cluster.", Long: withPreviewNote("The delete source oci command deletes the given OCIRepository from the cluster."),
Example: ` # Delete an OCIRepository Example: ` # Delete an OCIRepository
flux delete source oci podinfo`, flux delete source oci podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.OCIRepositoryKind)), ValidArgsFunction: resourceNamesCompletionFunc(sourcev1.GroupVersion.WithKind(sourcev1.OCIRepositoryKind)),

@ -23,7 +23,7 @@ import (
var diffCmd = &cobra.Command{ var diffCmd = &cobra.Command{
Use: "diff", Use: "diff",
Short: "Diff a flux resource", Short: "Diff a flux resource",
Long: "The diff command is used to do a server-side dry-run on flux resources, then prints the diff.", Long: `The diff command is used to do a server-side dry-run on flux resources, then prints the diff.`,
} }
func init() { func init() {

@ -30,7 +30,7 @@ import (
var diffArtifactCmd = &cobra.Command{ var diffArtifactCmd = &cobra.Command{
Use: "artifact", Use: "artifact",
Short: "Diff Artifact", Short: "Diff Artifact",
Long: `The diff artifact command computes the diff between the remote OCI artifact and a local directory or file`, Long: withPreviewNote(`The diff artifact command computes the diff between the remote OCI artifact and a local directory or file`),
Example: `# Check if local files differ from remote Example: `# Check if local files differ from remote
flux diff artifact oci://ghcr.io/stefanprodan/manifests:podinfo:6.2.0 --path=./kustomize`, flux diff artifact oci://ghcr.io/stefanprodan/manifests:podinfo:6.2.0 --path=./kustomize`,
RunE: diffArtifactCmdRun, RunE: diffArtifactCmdRun,

@ -55,7 +55,7 @@ import (
var eventsCmd = &cobra.Command{ var eventsCmd = &cobra.Command{
Use: "events", Use: "events",
Short: "Display Kubernetes events for Flux resources", Short: "Display Kubernetes events for Flux resources",
Long: "The events sub-command shows Kubernetes events from Flux resources", Long: withPreviewNote("The events sub-command shows Kubernetes events from Flux resources"),
Example: ` # Display events for flux resources in default namespace Example: ` # Display events for flux resources in default namespace
flux events -n default flux events -n default

@ -32,7 +32,7 @@ import (
var exportCmd = &cobra.Command{ var exportCmd = &cobra.Command{
Use: "export", Use: "export",
Short: "Export resources in YAML format", Short: "Export resources in YAML format",
Long: "The export sub-commands export resources in YAML format.", Long: `The export sub-commands export resources in YAML format.`,
} }
type exportFlags struct { type exportFlags struct {

@ -26,7 +26,7 @@ import (
var exportAlertCmd = &cobra.Command{ var exportAlertCmd = &cobra.Command{
Use: "alert [name]", Use: "alert [name]",
Short: "Export Alert resources in YAML format", Short: "Export Alert resources in YAML format",
Long: "The export alert command exports one or all Alert resources in YAML format.", Long: withPreviewNote("The export alert command exports one or all Alert resources in YAML format."),
Example: ` # Export all Alert resources Example: ` # Export all Alert resources
flux export alert --all > alerts.yaml flux export alert --all > alerts.yaml

@ -26,7 +26,7 @@ import (
var exportAlertProviderCmd = &cobra.Command{ var exportAlertProviderCmd = &cobra.Command{
Use: "alert-provider [name]", Use: "alert-provider [name]",
Short: "Export Provider resources in YAML format", Short: "Export Provider resources in YAML format",
Long: "The export alert-provider command exports one or all Provider resources in YAML format.", Long: withPreviewNote("The export alert-provider command exports one or all Provider resources in YAML format."),
Example: ` # Export all Provider resources Example: ` # Export all Provider resources
flux export alert-provider --all > alert-providers.yaml flux export alert-provider --all > alert-providers.yaml

@ -27,7 +27,7 @@ var exportHelmReleaseCmd = &cobra.Command{
Use: "helmrelease [name]", Use: "helmrelease [name]",
Aliases: []string{"hr"}, Aliases: []string{"hr"},
Short: "Export HelmRelease resources in YAML format", Short: "Export HelmRelease resources in YAML format",
Long: "The export helmrelease command exports one or all HelmRelease resources in YAML format.", Long: withPreviewNote("The export helmrelease command exports one or all HelmRelease resources in YAML format."),
Example: ` # Export all HelmRelease resources Example: ` # Export all HelmRelease resources
flux export helmrelease --all > kustomizations.yaml flux export helmrelease --all > kustomizations.yaml

@ -23,7 +23,7 @@ import (
var exportImageCmd = &cobra.Command{ var exportImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Export image automation objects", Short: "Export image automation objects",
Long: "The export image sub-commands export image automation objects in YAML format.", Long: `The export image sub-commands export image automation objects in YAML format.`,
} }
func init() { func init() {

@ -26,7 +26,7 @@ import (
var exportImagePolicyCmd = &cobra.Command{ var exportImagePolicyCmd = &cobra.Command{
Use: "policy [name]", Use: "policy [name]",
Short: "Export ImagePolicy resources in YAML format", Short: "Export ImagePolicy resources in YAML format",
Long: "The export image policy command exports one or all ImagePolicy resources in YAML format.", Long: withPreviewNote("The export image policy command exports one or all ImagePolicy resources in YAML format."),
Example: ` # Export all ImagePolicy resources Example: ` # Export all ImagePolicy resources
flux export image policy --all > image-policies.yaml flux export image policy --all > image-policies.yaml

@ -26,7 +26,7 @@ import (
var exportImageRepositoryCmd = &cobra.Command{ var exportImageRepositoryCmd = &cobra.Command{
Use: "repository [name]", Use: "repository [name]",
Short: "Export ImageRepository resources in YAML format", Short: "Export ImageRepository resources in YAML format",
Long: "The export image repository command exports one or all ImageRepository resources in YAML format.", Long: withPreviewNote("The export image repository command exports one or all ImageRepository resources in YAML format."),
Example: ` # Export all ImageRepository resources Example: ` # Export all ImageRepository resources
flux export image repository --all > image-repositories.yaml flux export image repository --all > image-repositories.yaml

@ -26,7 +26,7 @@ import (
var exportImageUpdateCmd = &cobra.Command{ var exportImageUpdateCmd = &cobra.Command{
Use: "update [name]", Use: "update [name]",
Short: "Export ImageUpdateAutomation resources in YAML format", Short: "Export ImageUpdateAutomation resources in YAML format",
Long: "The export image update command exports one or all ImageUpdateAutomation resources in YAML format.", Long: withPreviewNote("The export image update command exports one or all ImageUpdateAutomation resources in YAML format."),
Example: ` # Export all ImageUpdateAutomation resources Example: ` # Export all ImageUpdateAutomation resources
flux export image update --all > updates.yaml flux export image update --all > updates.yaml

@ -27,7 +27,7 @@ var exportKsCmd = &cobra.Command{
Use: "kustomization [name]", Use: "kustomization [name]",
Aliases: []string{"ks"}, Aliases: []string{"ks"},
Short: "Export Kustomization resources in YAML format", Short: "Export Kustomization resources in YAML format",
Long: "The export kustomization command exports one or all Kustomization resources in YAML format.", Long: `The export kustomization command exports one or all Kustomization resources in YAML format.`,
Example: ` # Export all Kustomization resources Example: ` # Export all Kustomization resources
flux export kustomization --all > kustomizations.yaml flux export kustomization --all > kustomizations.yaml

@ -26,7 +26,7 @@ import (
var exportReceiverCmd = &cobra.Command{ var exportReceiverCmd = &cobra.Command{
Use: "receiver [name]", Use: "receiver [name]",
Short: "Export Receiver resources in YAML format", Short: "Export Receiver resources in YAML format",
Long: "The export receiver command exports one or all Receiver resources in YAML format.", Long: `The export receiver command exports one or all Receiver resources in YAML format.`,
Example: ` # Export all Receiver resources Example: ` # Export all Receiver resources
flux export receiver --all > receivers.yaml flux export receiver --all > receivers.yaml

@ -23,7 +23,7 @@ import (
var exportSourceCmd = &cobra.Command{ var exportSourceCmd = &cobra.Command{
Use: "source", Use: "source",
Short: "Export sources", Short: "Export sources",
Long: "The export source sub-commands export sources in YAML format.", Long: `The export source sub-commands export sources in YAML format.`,
} }
var ( var (

@ -27,7 +27,7 @@ import (
var exportSourceBucketCmd = &cobra.Command{ var exportSourceBucketCmd = &cobra.Command{
Use: "bucket [name]", Use: "bucket [name]",
Short: "Export Bucket sources in YAML format", Short: "Export Bucket sources in YAML format",
Long: "The export source git command exports one or all Bucket sources in YAML format.", Long: withPreviewNote("The export source git command exports one or all Bucket sources in YAML format."),
Example: ` # Export all Bucket sources Example: ` # Export all Bucket sources
flux export source bucket --all > sources.yaml flux export source bucket --all > sources.yaml

@ -27,7 +27,7 @@ import (
var exportSourceGitCmd = &cobra.Command{ var exportSourceGitCmd = &cobra.Command{
Use: "git [name]", Use: "git [name]",
Short: "Export GitRepository sources in YAML format", Short: "Export GitRepository sources in YAML format",
Long: "The export source git command exports one or all GitRepository sources in YAML format.", Long: `The export source git command exports one or all GitRepository sources in YAML format.`,
Example: ` # Export all GitRepository sources Example: ` # Export all GitRepository sources
flux export source git --all > sources.yaml flux export source git --all > sources.yaml

@ -27,7 +27,7 @@ import (
var exportSourceHelmCmd = &cobra.Command{ var exportSourceHelmCmd = &cobra.Command{
Use: "helm [name]", Use: "helm [name]",
Short: "Export HelmRepository sources in YAML format", Short: "Export HelmRepository sources in YAML format",
Long: "The export source git command exports one or all HelmRepository sources in YAML format.", Long: withPreviewNote("The export source git command exports one or all HelmRepository sources in YAML format."),
Example: ` # Export all HelmRepository sources Example: ` # Export all HelmRepository sources
flux export source helm --all > sources.yaml flux export source helm --all > sources.yaml

@ -27,7 +27,7 @@ import (
var exportSourceOCIRepositoryCmd = &cobra.Command{ var exportSourceOCIRepositoryCmd = &cobra.Command{
Use: "oci [name]", Use: "oci [name]",
Short: "Export OCIRepository sources in YAML format", Short: "Export OCIRepository sources in YAML format",
Long: "The export source oci command exports one or all OCIRepository sources in YAML format.", Long: withPreviewNote("The export source oci command exports one or all OCIRepository sources in YAML format."),
Example: ` # Export all OCIRepository sources Example: ` # Export all OCIRepository sources
flux export source oci --all > sources.yaml flux export source oci --all > sources.yaml

@ -59,7 +59,7 @@ func (m typeMap) execute(t string, obj runtime.Object) (summarisable, error) {
var getCmd = &cobra.Command{ var getCmd = &cobra.Command{
Use: "get", Use: "get",
Short: "Get the resources and their status", Short: "Get the resources and their status",
Long: "The get sub-commands print the statuses of Flux resources.", Long: `The get sub-commands print the statuses of Flux resources.`,
} }
type GetFlags struct { type GetFlags struct {

@ -31,7 +31,7 @@ var getAlertCmd = &cobra.Command{
Use: "alerts", Use: "alerts",
Aliases: []string{"alert"}, Aliases: []string{"alert"},
Short: "Get Alert statuses", Short: "Get Alert statuses",
Long: "The get alert command prints the statuses of the resources.", Long: withPreviewNote("The get alert command prints the statuses of the resources."),
Example: ` # List all Alerts and their status Example: ` # List all Alerts and their status
flux get alerts`, flux get alerts`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)),

@ -29,7 +29,7 @@ var getAlertProviderCmd = &cobra.Command{
Use: "alert-providers", Use: "alert-providers",
Aliases: []string{"alert-provider"}, Aliases: []string{"alert-provider"},
Short: "Get Provider statuses", Short: "Get Provider statuses",
Long: "The get alert-provider command prints the statuses of the resources.", Long: withPreviewNote("The get alert-provider command prints the statuses of the resources."),
Example: ` # List all Providers and their status Example: ` # List all Providers and their status
flux get alert-providers`, flux get alert-providers`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ProviderKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ProviderKind)),

@ -30,7 +30,7 @@ import (
var getAllCmd = &cobra.Command{ var getAllCmd = &cobra.Command{
Use: "all", Use: "all",
Short: "Get all resources and statuses", Short: "Get all resources and statuses",
Long: "The get all command print the statuses of all resources.", Long: withPreviewNote("The get all command print the statuses of all resources."),
Example: ` # List all resources in a namespace Example: ` # List all resources in a namespace
flux get all --namespace=flux-system flux get all --namespace=flux-system

@ -30,7 +30,7 @@ var getHelmReleaseCmd = &cobra.Command{
Use: "helmreleases", Use: "helmreleases",
Aliases: []string{"hr", "helmrelease"}, Aliases: []string{"hr", "helmrelease"},
Short: "Get HelmRelease statuses", Short: "Get HelmRelease statuses",
Long: "The get helmreleases command prints the statuses of the resources.", Long: withPreviewNote("The get helmreleases command prints the statuses of the resources."),
Example: ` # List all Helm releases and their status Example: ` # List all Helm releases and their status
flux get helmreleases`, flux get helmreleases`,
ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)), ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)),

@ -24,7 +24,7 @@ var getImageCmd = &cobra.Command{
Use: "images", Use: "images",
Aliases: []string{"image"}, Aliases: []string{"image"},
Short: "Get image automation object status", Short: "Get image automation object status",
Long: "The get image sub-commands print the status of image automation objects.", Long: `The get image sub-commands print the status of image automation objects.`,
} }
func init() { func init() {

@ -28,7 +28,7 @@ import (
var getImageAllCmd = &cobra.Command{ var getImageAllCmd = &cobra.Command{
Use: "all", Use: "all",
Short: "Get all image statuses", Short: "Get all image statuses",
Long: "The get image sub-commands print the statuses of all image objects.", Long: withPreviewNote("The get image sub-commands print the statuses of all image objects."),
Example: ` # List all image objects in a namespace Example: ` # List all image objects in a namespace
flux get images all --namespace=flux-system flux get images all --namespace=flux-system

@ -28,7 +28,7 @@ import (
var getImagePolicyCmd = &cobra.Command{ var getImagePolicyCmd = &cobra.Command{
Use: "policy", Use: "policy",
Short: "Get ImagePolicy status", Short: "Get ImagePolicy status",
Long: "The get image policy command prints the status of ImagePolicy objects.", Long: withPreviewNote("The get image policy command prints the status of ImagePolicy objects."),
Example: ` # List all image policies and their status Example: ` # List all image policies and their status
flux get image policy flux get image policy

@ -31,7 +31,7 @@ import (
var getImageRepositoryCmd = &cobra.Command{ var getImageRepositoryCmd = &cobra.Command{
Use: "repository", Use: "repository",
Short: "Get ImageRepository status", Short: "Get ImageRepository status",
Long: "The get image repository command prints the status of ImageRepository objects.", Long: withPreviewNote("The get image repository command prints the status of ImageRepository objects."),
Example: ` # List all image repositories and their status Example: ` # List all image repositories and their status
flux get image repository flux get image repository

@ -31,7 +31,7 @@ import (
var getImageUpdateCmd = &cobra.Command{ var getImageUpdateCmd = &cobra.Command{
Use: "update", Use: "update",
Short: "Get ImageUpdateAutomation status", Short: "Get ImageUpdateAutomation status",
Long: "The get image update command prints the status of ImageUpdateAutomation objects.", Long: withPreviewNote("The get image update command prints the status of ImageUpdateAutomation objects."),
Example: ` # List all image update automation object and their status Example: ` # List all image update automation object and their status
flux get image update flux get image update

@ -33,7 +33,7 @@ var getKsCmd = &cobra.Command{
Use: "kustomizations", Use: "kustomizations",
Aliases: []string{"ks", "kustomization"}, Aliases: []string{"ks", "kustomization"},
Short: "Get Kustomization statuses", Short: "Get Kustomization statuses",
Long: "The get kustomizations command prints the statuses of the resources.", Long: `The get kustomizations command prints the statuses of the resources.`,
Example: ` # List all kustomizations and their status Example: ` # List all kustomizations and their status
flux get kustomizations`, flux get kustomizations`,
ValidArgsFunction: resourceNamesCompletionFunc(kustomizev1.GroupVersion.WithKind(kustomizev1.KustomizationKind)), ValidArgsFunction: resourceNamesCompletionFunc(kustomizev1.GroupVersion.WithKind(kustomizev1.KustomizationKind)),

@ -31,7 +31,7 @@ var getReceiverCmd = &cobra.Command{
Use: "receivers", Use: "receivers",
Aliases: []string{"receiver"}, Aliases: []string{"receiver"},
Short: "Get Receiver statuses", Short: "Get Receiver statuses",
Long: "The get receiver command prints the statuses of the resources.", Long: `The get receiver command prints the statuses of the resources.`,
Example: ` # List all Receiver and their status Example: ` # List all Receiver and their status
flux get receivers`, flux get receivers`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ReceiverKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.ReceiverKind)),

@ -24,7 +24,7 @@ var getSourceCmd = &cobra.Command{
Use: "sources", Use: "sources",
Aliases: []string{"source"}, Aliases: []string{"source"},
Short: "Get source statuses", Short: "Get source statuses",
Long: "The get source sub-commands print the statuses of the sources.", Long: `The get source sub-commands print the statuses of the sources.`,
} }
func init() { func init() {

@ -28,7 +28,7 @@ import (
var getSourceAllCmd = &cobra.Command{ var getSourceAllCmd = &cobra.Command{
Use: "all", Use: "all",
Short: "Get all source statuses", Short: "Get all source statuses",
Long: "The get sources all command print the statuses of all sources.", Long: withPreviewNote("The get sources all command print the statuses of all sources."),
Example: ` # List all sources in a namespace Example: ` # List all sources in a namespace
flux get sources all --namespace=flux-system flux get sources all --namespace=flux-system

@ -32,7 +32,7 @@ import (
var getSourceBucketCmd = &cobra.Command{ var getSourceBucketCmd = &cobra.Command{
Use: "bucket", Use: "bucket",
Short: "Get Bucket source statuses", Short: "Get Bucket source statuses",
Long: "The get sources bucket command prints the status of the Bucket sources.", Long: withPreviewNote("The get sources bucket command prints the status of the Bucket sources."),
Example: ` # List all Buckets and their status Example: ` # List all Buckets and their status
flux get sources bucket flux get sources bucket

@ -32,7 +32,7 @@ import (
var getSourceHelmChartCmd = &cobra.Command{ var getSourceHelmChartCmd = &cobra.Command{
Use: "chart", Use: "chart",
Short: "Get HelmChart statuses", Short: "Get HelmChart statuses",
Long: "The get sources chart command prints the status of the HelmCharts.", Long: withPreviewNote("The get sources chart command prints the status of the HelmCharts."),
Example: ` # List all Helm charts and their status Example: ` # List all Helm charts and their status
flux get sources chart flux get sources chart

@ -32,7 +32,7 @@ import (
var getSourceGitCmd = &cobra.Command{ var getSourceGitCmd = &cobra.Command{
Use: "git", Use: "git",
Short: "Get GitRepository source statuses", Short: "Get GitRepository source statuses",
Long: "The get sources git command prints the status of the GitRepository sources.", Long: `The get sources git command prints the status of the GitRepository sources.`,
Example: ` # List all Git repositories and their status Example: ` # List all Git repositories and their status
flux get sources git flux get sources git

@ -32,7 +32,7 @@ import (
var getSourceHelmCmd = &cobra.Command{ var getSourceHelmCmd = &cobra.Command{
Use: "helm", Use: "helm",
Short: "Get HelmRepository source statuses", Short: "Get HelmRepository source statuses",
Long: "The get sources helm command prints the status of the HelmRepository sources.", Long: withPreviewNote("The get sources helm command prints the status of the HelmRepository sources."),
Example: ` # List all Helm repositories and their status Example: ` # List all Helm repositories and their status
flux get sources helm flux get sources helm

@ -32,7 +32,7 @@ import (
var getSourceOCIRepositoryCmd = &cobra.Command{ var getSourceOCIRepositoryCmd = &cobra.Command{
Use: "oci", Use: "oci",
Short: "Get OCIRepository status", Short: "Get OCIRepository status",
Long: "The get sources oci command prints the status of the OCIRepository sources.", Long: withPreviewNote("The get sources oci command prints the status of the OCIRepository sources."),
Example: ` # List all OCIRepositories and their status Example: ` # List all OCIRepositories and their status
flux get sources oci flux get sources oci

@ -23,7 +23,7 @@ import (
var listCmd = &cobra.Command{ var listCmd = &cobra.Command{
Use: "list", Use: "list",
Short: "List artifacts", Short: "List artifacts",
Long: "The list command is used for printing the OCI artifacts metadata.", Long: `The list command is used for printing the OCI artifacts metadata.`,
} }
func init() { func init() {

@ -47,8 +47,8 @@ func newListArtifactFlags() listArtifactFlags {
var listArtifactsCmd = &cobra.Command{ var listArtifactsCmd = &cobra.Command{
Use: "artifacts", Use: "artifacts",
Short: "list artifacts", Short: "list artifacts",
Long: `The list command fetches the tags and their metadata from a remote OCI repository. Long: withPreviewNote(`The list command fetches the tags and their metadata from a remote OCI repository.
The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`, The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`),
Example: ` # List the artifacts stored in an OCI repository Example: ` # List the artifacts stored in an OCI repository
flux list artifact oci://ghcr.io/org/config/app flux list artifact oci://ghcr.io/org/config/app
`, `,

@ -45,7 +45,7 @@ import (
var logsCmd = &cobra.Command{ var logsCmd = &cobra.Command{
Use: "logs", Use: "logs",
Short: "Display formatted logs for Flux components", Short: "Display formatted logs for Flux components",
Long: "The logs command displays formatted logs from various Flux components.", Long: withPreviewNote("The logs command displays formatted logs from various Flux components."),
Example: ` # Print the reconciliation logs of all Flux custom resources in your cluster Example: ` # Print the reconciliation logs of all Flux custom resources in your cluster
flux logs --all-namespaces flux logs --all-namespaces

@ -224,3 +224,10 @@ func readPasswordFromStdin(prompt string) (string, error) {
fmt.Println() fmt.Println()
return strings.TrimRight(out, "\r\n"), nil return strings.TrimRight(out, "\r\n"), nil
} }
func withPreviewNote(desc string) string {
previewNote := ` Please note that this command is in preview and under development.
While we try our best to not introduce breaking changes, they may occur when
we adapt to new features and/or find better ways to facilitate what it does.`
return fmt.Sprintf("%s\n\n%s", strings.TrimSpace(desc), previewNote)
}

@ -23,7 +23,7 @@ import (
var pullCmd = &cobra.Command{ var pullCmd = &cobra.Command{
Use: "pull", Use: "pull",
Short: "Pull artifacts", Short: "Pull artifacts",
Long: "The pull command is used to download OCI artifacts.", Long: `The pull command is used to download OCI artifacts.`,
} }
func init() { func init() {

@ -31,8 +31,8 @@ import (
var pullArtifactCmd = &cobra.Command{ var pullArtifactCmd = &cobra.Command{
Use: "artifact", Use: "artifact",
Short: "Pull artifact", Short: "Pull artifact",
Long: `The pull artifact command downloads and extracts the OCI artifact content to the given path. Long: withPreviewNote(`The pull artifact command downloads and extracts the OCI artifact content to the given path.
The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`, The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`),
Example: ` # Pull an OCI artifact created by flux from GHCR Example: ` # Pull an OCI artifact created by flux from GHCR
flux pull artifact oci://ghcr.io/org/manifests/app:v0.0.1 --output ./path/to/local/manifests flux pull artifact oci://ghcr.io/org/manifests/app:v0.0.1 --output ./path/to/local/manifests
`, `,

@ -23,7 +23,7 @@ import (
var pushCmd = &cobra.Command{ var pushCmd = &cobra.Command{
Use: "push", Use: "push",
Short: "Push artifacts", Short: "Push artifacts",
Long: "The push command is used to publish OCI artifacts.", Long: `The push command is used to publish OCI artifacts.`,
} }
func init() { func init() {

@ -35,8 +35,8 @@ import (
var pushArtifactCmd = &cobra.Command{ var pushArtifactCmd = &cobra.Command{
Use: "artifact", Use: "artifact",
Short: "Push artifact", Short: "Push artifact",
Long: `The push artifact command creates a tarball from the given directory or the single file and uploads the artifact to an OCI repository. Long: withPreviewNote(`The push artifact command creates a tarball from the given directory or the single file and uploads the artifact to an OCI repository.
The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`, The command can read the credentials from '~/.docker/config.json' but they can also be passed with --creds. It can also login to a supported provider with the --provider flag.`),
Example: ` # Push manifests to GHCR using the short Git SHA as the OCI artifact tag Example: ` # Push manifests to GHCR using the short Git SHA as the OCI artifact tag
echo $GITHUB_PAT | docker login ghcr.io --username flux --password-stdin echo $GITHUB_PAT | docker login ghcr.io --username flux --password-stdin
flux push artifact oci://ghcr.io/org/config/app:$(git rev-parse --short HEAD) \ flux push artifact oci://ghcr.io/org/config/app:$(git rev-parse --short HEAD) \

@ -40,7 +40,7 @@ import (
var reconcileCmd = &cobra.Command{ var reconcileCmd = &cobra.Command{
Use: "reconcile", Use: "reconcile",
Short: "Reconcile sources and resources", Short: "Reconcile sources and resources",
Long: "The reconcile sub-commands trigger a reconciliation of sources and resources.", Long: `The reconcile sub-commands trigger a reconciliation of sources and resources.`,
} }
func init() { func init() {

@ -23,7 +23,7 @@ import (
var reconcileImageCmd = &cobra.Command{ var reconcileImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Reconcile image automation objects", Short: "Reconcile image automation objects",
Long: "The reconcile sub-commands trigger a reconciliation of image automation objects.", Long: `The reconcile sub-commands trigger a reconciliation of image automation objects.`,
} }
func init() { func init() {

@ -23,7 +23,7 @@ import (
var reconcileSourceCmd = &cobra.Command{ var reconcileSourceCmd = &cobra.Command{
Use: "source", Use: "source",
Short: "Reconcile sources", Short: "Reconcile sources",
Long: "The reconcile source sub-commands trigger a reconciliation of sources.", Long: `The reconcile source sub-commands trigger a reconciliation of sources.`,
} }
func init() { func init() {

@ -31,7 +31,7 @@ import (
var resumeCmd = &cobra.Command{ var resumeCmd = &cobra.Command{
Use: "resume", Use: "resume",
Short: "Resume suspended resources", Short: "Resume suspended resources",
Long: "The resume sub-commands resume a suspended resource.", Long: `The resume sub-commands resume a suspended resource.`,
} }
type ResumeFlags struct { type ResumeFlags struct {

@ -23,7 +23,7 @@ import (
var resumeImageCmd = &cobra.Command{ var resumeImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Resume image automation objects", Short: "Resume image automation objects",
Long: "The resume image sub-commands resume suspended image automation objects.", Long: `The resume image sub-commands resume suspended image automation objects.`,
} }
func init() { func init() {

@ -23,7 +23,7 @@ import (
var resumeSourceCmd = &cobra.Command{ var resumeSourceCmd = &cobra.Command{
Use: "source", Use: "source",
Short: "Resume sources", Short: "Resume sources",
Long: "The resume sub-commands resume a suspended source.", Long: `The resume sub-commands resume a suspended source.`,
} }
func init() { func init() {

@ -42,8 +42,8 @@ import (
var statsCmd = &cobra.Command{ var statsCmd = &cobra.Command{
Use: "stats", Use: "stats",
Short: "Stats of Flux reconciles", Short: "Stats of Flux reconciles",
Long: `The stats command prints a report of Flux custom resources present on a cluster, Long: withPreviewNote(`The stats command prints a report of Flux custom resources present on a cluster,
including their reconcile status and the amount of cumulative storage used for each source type`, including their reconcile status and the amount of cumulative storage used for each source type`),
Example: ` # Print the stats report for a namespace Example: ` # Print the stats report for a namespace
flux stats --namespace default flux stats --namespace default

@ -29,7 +29,7 @@ import (
var suspendCmd = &cobra.Command{ var suspendCmd = &cobra.Command{
Use: "suspend", Use: "suspend",
Short: "Suspend resources", Short: "Suspend resources",
Long: "The suspend sub-commands suspend the reconciliation of a resource.", Long: `The suspend sub-commands suspend the reconciliation of a resource.`,
} }
type SuspendFlags struct { type SuspendFlags struct {

@ -25,7 +25,7 @@ import (
var suspendAlertCmd = &cobra.Command{ var suspendAlertCmd = &cobra.Command{
Use: "alert [name]", Use: "alert [name]",
Short: "Suspend reconciliation of Alert", Short: "Suspend reconciliation of Alert",
Long: "The suspend command disables the reconciliation of a Alert resource.", Long: `The suspend command disables the reconciliation of a Alert resource.`,
Example: ` # Suspend reconciliation for an existing Alert Example: ` # Suspend reconciliation for an existing Alert
flux suspend alert main`, flux suspend alert main`,
ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)), ValidArgsFunction: resourceNamesCompletionFunc(notificationv1.GroupVersion.WithKind(notificationv1.AlertKind)),

@ -26,7 +26,7 @@ var suspendHrCmd = &cobra.Command{
Use: "helmrelease [name]", Use: "helmrelease [name]",
Aliases: []string{"hr"}, Aliases: []string{"hr"},
Short: "Suspend reconciliation of HelmRelease", Short: "Suspend reconciliation of HelmRelease",
Long: "The suspend command disables the reconciliation of a HelmRelease resource.", Long: `The suspend command disables the reconciliation of a HelmRelease resource.`,
Example: ` # Suspend reconciliation for an existing Helm release Example: ` # Suspend reconciliation for an existing Helm release
flux suspend hr podinfo`, flux suspend hr podinfo`,
ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)), ValidArgsFunction: resourceNamesCompletionFunc(helmv2.GroupVersion.WithKind(helmv2.HelmReleaseKind)),

@ -23,7 +23,7 @@ import (
var suspendImageCmd = &cobra.Command{ var suspendImageCmd = &cobra.Command{
Use: "image", Use: "image",
Short: "Suspend image automation objects", Short: "Suspend image automation objects",
Long: "The suspend image sub-commands suspend the reconciliation of an image automation object.", Long: `The suspend image sub-commands suspend the reconciliation of an image automation object.`,
} }
func init() { func init() {

@ -25,7 +25,7 @@ import (
var suspendImageRepositoryCmd = &cobra.Command{ var suspendImageRepositoryCmd = &cobra.Command{
Use: "repository [name]", Use: "repository [name]",
Short: "Suspend reconciliation of an ImageRepository", Short: "Suspend reconciliation of an ImageRepository",
Long: "The suspend image repository command disables the reconciliation of a ImageRepository resource.", Long: `The suspend image repository command disables the reconciliation of a ImageRepository resource.`,
Example: ` # Suspend reconciliation for an existing ImageRepository Example: ` # Suspend reconciliation for an existing ImageRepository
flux suspend image repository alpine`, flux suspend image repository alpine`,
ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)), ValidArgsFunction: resourceNamesCompletionFunc(imagev1.GroupVersion.WithKind(imagev1.ImageRepositoryKind)),

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save