diff --git a/completers/flux2_completer/cmd/bootstrap.go b/completers/flux2_completer/cmd/bootstrap.go new file mode 100644 index 0000000000..c04a8e5c9e --- /dev/null +++ b/completers/flux2_completer/cmd/bootstrap.go @@ -0,0 +1,45 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bootstrapCmd = &cobra.Command{ + Use: "bootstrap", + Short: "Bootstrap toolkit components", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bootstrapCmd).Standalone() + bootstrapCmd.PersistentFlags().String("arch", "", "cluster architecture, available options are: (amd64, arm, arm64)") + bootstrapCmd.PersistentFlags().String("author-email", "", "author email for Git commits") + bootstrapCmd.PersistentFlags().String("author-name", "Flux", "author name for Git commits") + bootstrapCmd.PersistentFlags().String("branch", "main", "Git branch") + bootstrapCmd.PersistentFlags().String("ca-file", "", "path to TLS CA file used for validating self-signed certificates") + bootstrapCmd.PersistentFlags().String("cluster-domain", "cluster.local", "internal cluster domain") + bootstrapCmd.PersistentFlags().String("commit-message-appendix", "", "string to add to the commit messages, e.g. '[ci skip]'") + bootstrapCmd.PersistentFlags().StringSlice("components", []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"}, "list of components, accepts comma-separated values") + bootstrapCmd.PersistentFlags().StringSlice("components-extra", []string{}, "list of components in addition to those supplied or defaulted, accepts comma-separated values") + bootstrapCmd.PersistentFlags().String("gpg-key-id", "", "key id for selecting a particular key") + bootstrapCmd.PersistentFlags().String("gpg-key-ring", "", "path to GPG key ring for signing commits") + bootstrapCmd.PersistentFlags().String("gpg-passphrase", "", "passphrase for decrypting GPG private key") + bootstrapCmd.PersistentFlags().String("image-pull-secret", "", "Kubernetes secret name used for pulling the toolkit images from a private registry") + bootstrapCmd.PersistentFlags().String("log-level", "info", "log level, available options are: (debug, info, error)") + bootstrapCmd.PersistentFlags().String("manifests", "", "path to the manifest directory") + bootstrapCmd.PersistentFlags().Bool("network-policy", true, "deny ingress access to the toolkit controllers from other namespaces using network policies") + bootstrapCmd.PersistentFlags().String("private-key-file", "", "path to a private key file used for authenticating to the Git SSH server") + bootstrapCmd.PersistentFlags().Bool("recurse-submodules", false, "when enabled, configures the GitRepository source to initialize and include Git submodules in the artifact it produces") + bootstrapCmd.PersistentFlags().String("registry", "ghcr.io/fluxcd", "container registry where the toolkit images are published") + bootstrapCmd.PersistentFlags().String("secret-name", "flux-system", "name of the secret the sync credentials can be found in or stored to") + bootstrapCmd.PersistentFlags().String("ssh-ecdsa-curve", "", "SSH ECDSA public key curve (p256, p384, p521)") + bootstrapCmd.PersistentFlags().String("ssh-hostname", "", "SSH hostname, to be used when the SSH host differs from the HTTPS one") + bootstrapCmd.PersistentFlags().String("ssh-key-algorithm", "ecdsa", "SSH public key algorithm (rsa, ecdsa, ed25519)") + bootstrapCmd.PersistentFlags().String("ssh-rsa-bits", "2048", "SSH RSA public key bit size (multiplies of 8)") + bootstrapCmd.PersistentFlags().Bool("token-auth", false, "when enabled, the personal access token will be used instead of SSH deploy key") + bootstrapCmd.PersistentFlags().StringSlice("toleration-keys", []string{}, "list of toleration keys used to schedule the components pods onto nodes with matching taints") + bootstrapCmd.PersistentFlags().StringP("version", "v", "", "toolkit version, when specified the manifests are downloaded from https://github.com/fluxcd/flux2/releases") + bootstrapCmd.PersistentFlags().Bool("watch-all-namespaces", true, "watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed") + rootCmd.AddCommand(bootstrapCmd) +} diff --git a/completers/flux2_completer/cmd/bootstrap_bitbucketServer.go b/completers/flux2_completer/cmd/bootstrap_bitbucketServer.go new file mode 100644 index 0000000000..9ab1fa3250 --- /dev/null +++ b/completers/flux2_completer/cmd/bootstrap_bitbucketServer.go @@ -0,0 +1,28 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bootstrap_bitbucketServerCmd = &cobra.Command{ + Use: "bitbucket-server", + Short: "Bootstrap toolkit components in a Bitbucket Server repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bootstrap_bitbucketServerCmd).Standalone() + bootstrap_bitbucketServerCmd.Flags().StringSlice("group", []string{}, "Bitbucket Server groups to be given write access (also accepts comma-separated values)") + bootstrap_bitbucketServerCmd.Flags().String("hostname", "", "Bitbucket Server hostname") + bootstrap_bitbucketServerCmd.Flags().String("interval", "", "sync interval") + bootstrap_bitbucketServerCmd.Flags().String("owner", "", "Bitbucket Server user or project name") + bootstrap_bitbucketServerCmd.Flags().String("path", "", "path relative to the repository root, when specified the cluster sync will be scoped to this path") + bootstrap_bitbucketServerCmd.Flags().Bool("personal", false, "if true, the owner is assumed to be a Bitbucket Server user; otherwise a group") + bootstrap_bitbucketServerCmd.Flags().Bool("private", true, "if true, the repository is setup or configured as private") + bootstrap_bitbucketServerCmd.Flags().Bool("read-write-key", false, "if true, the deploy key is configured with read/write permissions") + bootstrap_bitbucketServerCmd.Flags().Bool("reconcile", false, "if true, the configured options are also reconciled if the repository already exists") + bootstrap_bitbucketServerCmd.Flags().String("repository", "", "Bitbucket Server repository name") + bootstrap_bitbucketServerCmd.Flags().StringP("username", "u", "git", "authentication username") + bootstrapCmd.AddCommand(bootstrap_bitbucketServerCmd) +} diff --git a/completers/flux2_completer/cmd/bootstrap_git.go b/completers/flux2_completer/cmd/bootstrap_git.go new file mode 100644 index 0000000000..17133fb4ee --- /dev/null +++ b/completers/flux2_completer/cmd/bootstrap_git.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bootstrap_gitCmd = &cobra.Command{ + Use: "git", + Short: "Bootstrap toolkit components in a Git repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bootstrap_gitCmd).Standalone() + bootstrap_gitCmd.Flags().String("interval", "", "sync interval") + bootstrap_gitCmd.Flags().StringP("password", "p", "", "basic authentication password") + bootstrap_gitCmd.Flags().String("path", "", "path relative to the repository root, when specified the cluster sync will be scoped to this path") + bootstrap_gitCmd.Flags().BoolP("silent", "s", false, "assumes the deploy key is already setup, skips confirmation") + bootstrap_gitCmd.Flags().String("url", "", "Git repository URL") + bootstrap_gitCmd.Flags().StringP("username", "u", "git", "basic authentication username") + bootstrapCmd.AddCommand(bootstrap_gitCmd) +} diff --git a/completers/flux2_completer/cmd/bootstrap_github.go b/completers/flux2_completer/cmd/bootstrap_github.go new file mode 100644 index 0000000000..e5330ba600 --- /dev/null +++ b/completers/flux2_completer/cmd/bootstrap_github.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bootstrap_githubCmd = &cobra.Command{ + Use: "github", + Short: "Bootstrap toolkit components in a GitHub repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bootstrap_githubCmd).Standalone() + bootstrap_githubCmd.Flags().String("hostname", "github.com", "GitHub hostname") + bootstrap_githubCmd.Flags().String("interval", "", "sync interval") + bootstrap_githubCmd.Flags().String("owner", "", "GitHub user or organization name") + bootstrap_githubCmd.Flags().String("path", "", "path relative to the repository root, when specified the cluster sync will be scoped to this path") + bootstrap_githubCmd.Flags().Bool("personal", false, "if true, the owner is assumed to be a GitHub user; otherwise an org") + bootstrap_githubCmd.Flags().Bool("private", true, "if true, the repository is setup or configured as private") + bootstrap_githubCmd.Flags().Bool("read-write-key", false, "if true, the deploy key is configured with read/write permissions") + bootstrap_githubCmd.Flags().Bool("reconcile", false, "if true, the configured options are also reconciled if the repository already exists") + bootstrap_githubCmd.Flags().String("repository", "", "GitHub repository name") + bootstrap_githubCmd.Flags().StringSlice("team", []string{}, "GitHub team and the access to be given to it(team:maintain). Defaults to maintainer access if no access level is specified (also accepts comma-separated values)") + bootstrapCmd.AddCommand(bootstrap_githubCmd) +} diff --git a/completers/flux2_completer/cmd/bootstrap_gitlab.go b/completers/flux2_completer/cmd/bootstrap_gitlab.go new file mode 100644 index 0000000000..12dfbb2454 --- /dev/null +++ b/completers/flux2_completer/cmd/bootstrap_gitlab.go @@ -0,0 +1,27 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var bootstrap_gitlabCmd = &cobra.Command{ + Use: "gitlab", + Short: "Bootstrap toolkit components in a GitLab repository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(bootstrap_gitlabCmd).Standalone() + bootstrap_gitlabCmd.Flags().String("hostname", "gitlab.com", "GitLab hostname") + bootstrap_gitlabCmd.Flags().String("interval", "", "sync interval") + bootstrap_gitlabCmd.Flags().String("owner", "", "GitLab user or group name") + bootstrap_gitlabCmd.Flags().String("path", "", "path relative to the repository root, when specified the cluster sync will be scoped to this path") + bootstrap_gitlabCmd.Flags().Bool("personal", false, "if true, the owner is assumed to be a GitLab user; otherwise a group") + bootstrap_gitlabCmd.Flags().Bool("private", true, "if true, the repository is setup or configured as private") + bootstrap_gitlabCmd.Flags().Bool("read-write-key", false, "if true, the deploy key is configured with read/write permissions") + bootstrap_gitlabCmd.Flags().Bool("reconcile", false, "if true, the configured options are also reconciled if the repository already exists") + bootstrap_gitlabCmd.Flags().String("repository", "", "GitLab repository name") + bootstrap_gitlabCmd.Flags().StringSlice("team", []string{}, "GitLab teams to be given maintainer access (also accepts comma-separated values)") + bootstrapCmd.AddCommand(bootstrap_gitlabCmd) +} diff --git a/completers/flux2_completer/cmd/build.go b/completers/flux2_completer/cmd/build.go new file mode 100644 index 0000000000..569f271032 --- /dev/null +++ b/completers/flux2_completer/cmd/build.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var buildCmd = &cobra.Command{ + Use: "build", + Short: "Build a flux resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(buildCmd).Standalone() + rootCmd.AddCommand(buildCmd) +} diff --git a/completers/flux2_completer/cmd/build_kustomization.go b/completers/flux2_completer/cmd/build_kustomization.go new file mode 100644 index 0000000000..5149548e0b --- /dev/null +++ b/completers/flux2_completer/cmd/build_kustomization.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var build_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Build Kustomization", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(build_kustomizationCmd).Standalone() + build_kustomizationCmd.Flags().String("path", "", "Path to the manifests location.)") + buildCmd.AddCommand(build_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/check.go b/completers/flux2_completer/cmd/check.go new file mode 100644 index 0000000000..bce08236aa --- /dev/null +++ b/completers/flux2_completer/cmd/check.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var checkCmd = &cobra.Command{ + Use: "check", + Short: "Check requirements and installation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(checkCmd).Standalone() + checkCmd.Flags().StringSlice("components", []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"}, "list of components, accepts comma-separated values") + checkCmd.Flags().StringSlice("components-extra", []string{}, "list of components in addition to those supplied or defaulted, accepts comma-separated values") + checkCmd.Flags().String("poll-interval", "", "how often the health checker should poll the cluster for the latest state of the resources.") + checkCmd.Flags().Bool("pre", false, "only run pre-installation checks") + rootCmd.AddCommand(checkCmd) +} diff --git a/completers/flux2_completer/cmd/completion.go b/completers/flux2_completer/cmd/completion.go new file mode 100644 index 0000000000..36df0513ca --- /dev/null +++ b/completers/flux2_completer/cmd/completion.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var completionCmd = &cobra.Command{ + Use: "completion", + Short: "Generates completion scripts for various shells", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(completionCmd).Standalone() + rootCmd.AddCommand(completionCmd) +} diff --git a/completers/flux2_completer/cmd/completion_bash.go b/completers/flux2_completer/cmd/completion_bash.go new file mode 100644 index 0000000000..212821e27e --- /dev/null +++ b/completers/flux2_completer/cmd/completion_bash.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var completion_bashCmd = &cobra.Command{ + Use: "bash", + Short: "Generates bash completion scripts", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(completion_bashCmd).Standalone() + completionCmd.AddCommand(completion_bashCmd) +} diff --git a/completers/flux2_completer/cmd/completion_fish.go b/completers/flux2_completer/cmd/completion_fish.go new file mode 100644 index 0000000000..86801839c4 --- /dev/null +++ b/completers/flux2_completer/cmd/completion_fish.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var completion_fishCmd = &cobra.Command{ + Use: "fish", + Short: "Generates fish completion scripts", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(completion_fishCmd).Standalone() + completionCmd.AddCommand(completion_fishCmd) +} diff --git a/completers/flux2_completer/cmd/completion_powershell.go b/completers/flux2_completer/cmd/completion_powershell.go new file mode 100644 index 0000000000..f4d700b37c --- /dev/null +++ b/completers/flux2_completer/cmd/completion_powershell.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var completion_powershellCmd = &cobra.Command{ + Use: "powershell", + Short: "Generates powershell completion scripts", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(completion_powershellCmd).Standalone() + completionCmd.AddCommand(completion_powershellCmd) +} diff --git a/completers/flux2_completer/cmd/completion_zsh.go b/completers/flux2_completer/cmd/completion_zsh.go new file mode 100644 index 0000000000..efbe90f6f2 --- /dev/null +++ b/completers/flux2_completer/cmd/completion_zsh.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var completion_zshCmd = &cobra.Command{ + Use: "zsh", + Short: "Generates zsh completion scripts", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(completion_zshCmd).Standalone() + completionCmd.AddCommand(completion_zshCmd) +} diff --git a/completers/flux2_completer/cmd/create.go b/completers/flux2_completer/cmd/create.go new file mode 100644 index 0000000000..4b24efc4e7 --- /dev/null +++ b/completers/flux2_completer/cmd/create.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var createCmd = &cobra.Command{ + Use: "create", + Short: "Create or update sources and resources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(createCmd).Standalone() + createCmd.PersistentFlags().Bool("export", false, "export in YAML format to stdout") + createCmd.PersistentFlags().String("interval", "", "source sync interval") + createCmd.PersistentFlags().StringSlice("label", []string{}, "set labels on the resource (can specify multiple labels with commas: label1=value1,label2=value2)") + rootCmd.AddCommand(createCmd) +} diff --git a/completers/flux2_completer/cmd/create_alert.go b/completers/flux2_completer/cmd/create_alert.go new file mode 100644 index 0000000000..c9d67198cd --- /dev/null +++ b/completers/flux2_completer/cmd/create_alert.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Create or update a Alert resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_alertCmd).Standalone() + create_alertCmd.Flags().String("event-severity", "", "severity of events to send alerts for") + create_alertCmd.Flags().StringSlice("event-source", []string{}, "sources that should generate alerts (/), also accepts comma-separated values") + create_alertCmd.Flags().String("provider-ref", "", "reference to provider") + createCmd.AddCommand(create_alertCmd) +} diff --git a/completers/flux2_completer/cmd/create_alertProvider.go b/completers/flux2_completer/cmd/create_alertProvider.go new file mode 100644 index 0000000000..7d23868c95 --- /dev/null +++ b/completers/flux2_completer/cmd/create_alertProvider.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_alertProviderCmd = &cobra.Command{ + Use: "alert-provider", + Short: "Create or update a Provider resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_alertProviderCmd).Standalone() + create_alertProviderCmd.Flags().String("address", "", "path to either the git repository, chat provider or webhook") + create_alertProviderCmd.Flags().String("channel", "", "channel to send messages to in the case of a chat provider") + create_alertProviderCmd.Flags().String("secret-ref", "", "name of secret containing authentication token") + create_alertProviderCmd.Flags().String("type", "", "type of provider") + create_alertProviderCmd.Flags().String("username", "", "bot username used by the provider") + createCmd.AddCommand(create_alertProviderCmd) +} diff --git a/completers/flux2_completer/cmd/create_helmrelease.go b/completers/flux2_completer/cmd/create_helmrelease.go new file mode 100644 index 0000000000..b0cee37620 --- /dev/null +++ b/completers/flux2_completer/cmd/create_helmrelease.go @@ -0,0 +1,28 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Create or update a HelmRelease resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_helmreleaseCmd).Standalone() + create_helmreleaseCmd.Flags().String("chart", "", "Helm chart name or path") + create_helmreleaseCmd.Flags().String("chart-version", "", "Helm chart version, accepts a semver range (ignored for charts from GitRepository sources)") + create_helmreleaseCmd.Flags().String("crds", "", "upgrade CRDs policy, available options are: (Skip, Create, CreateReplace)") + create_helmreleaseCmd.Flags().Bool("create-target-namespace", false, "create the target namespace if it does not exist") + create_helmreleaseCmd.Flags().StringSlice("depends-on", []string{}, "HelmReleases that must be ready before this release can be installed, supported formats '' and '/'") + create_helmreleaseCmd.Flags().String("release-name", "", "name used for the Helm release, defaults to a composition of '[-]'") + create_helmreleaseCmd.Flags().String("service-account", "", "the name of the service account to impersonate when reconciling this HelmRelease") + create_helmreleaseCmd.Flags().String("source", "", "source that contains the chart in the format '/.', where kind must be one of: (HelmRepository, GitRepository, Bucket)") + create_helmreleaseCmd.Flags().String("target-namespace", "", "namespace to install this release, defaults to the HelmRelease namespace") + create_helmreleaseCmd.Flags().StringSlice("values", []string{}, "local path to values.yaml files, also accepts comma-separated values") + create_helmreleaseCmd.Flags().String("values-from", "", "Kubernetes object reference that contains the values.yaml data key in the format '/', where kind must be one of: (Secret, ConfigMap)") + createCmd.AddCommand(create_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/create_image.go b/completers/flux2_completer/cmd/create_image.go new file mode 100644 index 0000000000..adc6c462db --- /dev/null +++ b/completers/flux2_completer/cmd/create_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_imageCmd = &cobra.Command{ + Use: "image", + Short: "Create or update resources dealing with image automation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_imageCmd).Standalone() + createCmd.AddCommand(create_imageCmd) +} diff --git a/completers/flux2_completer/cmd/create_image_policy.go b/completers/flux2_completer/cmd/create_image_policy.go new file mode 100644 index 0000000000..11ce4a1ffc --- /dev/null +++ b/completers/flux2_completer/cmd/create_image_policy.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_image_policyCmd = &cobra.Command{ + Use: "policy", + Short: "Create or update an ImagePolicy object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_image_policyCmd).Standalone() + create_image_policyCmd.Flags().String("filter-extract", "", "replacement pattern (using capture groups from --filter-regex) to use for sorting") + create_image_policyCmd.Flags().String("filter-regex", "", "regular expression pattern used to filter the image tags") + create_image_policyCmd.Flags().String("image-ref", "", "the name of an image repository object") + create_image_policyCmd.Flags().String("select-alpha", "", "use alphabetical sorting to select image; either \"asc\" meaning select the last, or \"desc\" meaning select the first") + create_image_policyCmd.Flags().String("select-numeric", "", "use numeric sorting to select image; either \"asc\" meaning select the last, or \"desc\" meaning select the first") + create_image_policyCmd.Flags().String("select-semver", "", "a semver range to apply to tags; e.g., '1.x'") + create_imageCmd.AddCommand(create_image_policyCmd) +} diff --git a/completers/flux2_completer/cmd/create_image_repository.go b/completers/flux2_completer/cmd/create_image_repository.go new file mode 100644 index 0000000000..ef36e6723a --- /dev/null +++ b/completers/flux2_completer/cmd/create_image_repository.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Create or update an ImageRepository object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_image_repositoryCmd).Standalone() + create_image_repositoryCmd.Flags().String("cert-ref", "", "the name of a secret to use for TLS certificates") + create_image_repositoryCmd.Flags().String("image", "", "the image repository to scan; e.g., library/alpine") + create_image_repositoryCmd.Flags().String("scan-timeout", "", "a timeout for scanning; this defaults to the interval if not set") + create_image_repositoryCmd.Flags().String("secret-ref", "", "the name of a docker-registry secret to use for credentials") + create_imageCmd.AddCommand(create_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/create_image_update.go b/completers/flux2_completer/cmd/create_image_update.go new file mode 100644 index 0000000000..23638f6ba4 --- /dev/null +++ b/completers/flux2_completer/cmd/create_image_update.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Create or update an ImageUpdateAutomation object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_image_updateCmd).Standalone() + create_image_updateCmd.Flags().String("author-email", "", "the email to use for commit author") + create_image_updateCmd.Flags().String("author-name", "", "the name to use for commit author") + create_image_updateCmd.Flags().String("checkout-branch", "", "the branch to checkout") + create_image_updateCmd.Flags().String("commit-template", "", "a template for commit messages") + create_image_updateCmd.Flags().String("git-repo-path", "", "path to the directory containing the manifests to be updated, defaults to the repository root") + create_image_updateCmd.Flags().String("git-repo-ref", "", "the name of a GitRepository resource with details of the upstream Git repository") + create_image_updateCmd.Flags().String("push-branch", "", "the branch to push commits to, defaults to the checkout branch if not specified") + create_imageCmd.AddCommand(create_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/create_kustomization.go b/completers/flux2_completer/cmd/create_kustomization.go new file mode 100644 index 0000000000..f59095474e --- /dev/null +++ b/completers/flux2_completer/cmd/create_kustomization.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Create or update a Kustomization resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_kustomizationCmd).Standalone() + create_kustomizationCmd.Flags().String("decryption-provider", "", "decryption provider, available options are: (sops)") + create_kustomizationCmd.Flags().String("decryption-secret", "", "set the Kubernetes secret name that contains the OpenPGP private keys used for sops decryption") + create_kustomizationCmd.Flags().StringSlice("depends-on", []string{}, "Kustomization that must be ready before this Kustomization can be applied, supported formats '' and '/', also accepts comma-separated values") + create_kustomizationCmd.Flags().StringSlice("health-check", []string{}, "workload to be included in the health assessment, in the format '/.'") + create_kustomizationCmd.Flags().String("health-check-timeout", "", "timeout of health checking operations") + create_kustomizationCmd.Flags().String("path", "./", "path to the directory containing a kustomization.yaml file") + create_kustomizationCmd.Flags().Bool("prune", false, "enable garbage collection") + create_kustomizationCmd.Flags().String("service-account", "", "the name of the service account to impersonate when reconciling this Kustomization") + create_kustomizationCmd.Flags().String("source", "", "source that contains the Kubernetes manifests in the format '[/].', where kind must be one of: (GitRepository, Bucket), if kind is not specified it defaults to GitRepository") + create_kustomizationCmd.Flags().String("target-namespace", "", "overrides the namespace of all Kustomization objects reconciled by this Kustomization") + create_kustomizationCmd.Flags().String("validation", "", "validate the manifests before applying them on the cluster, can be 'client' or 'server'") + create_kustomizationCmd.Flags().Bool("wait", false, "enable health checking of all the applied resources") + createCmd.AddCommand(create_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/create_receiver.go b/completers/flux2_completer/cmd/create_receiver.go new file mode 100644 index 0000000000..7d12cbe182 --- /dev/null +++ b/completers/flux2_completer/cmd/create_receiver.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Create or update a Receiver resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_receiverCmd).Standalone() + create_receiverCmd.Flags().StringSlice("event", []string{}, "also accepts comma-separated values") + create_receiverCmd.Flags().StringSlice("resource", []string{}, "also accepts comma-separated values") + create_receiverCmd.Flags().String("secret-ref", "", "") + create_receiverCmd.Flags().String("type", "", "") + createCmd.AddCommand(create_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/create_secret.go b/completers/flux2_completer/cmd/create_secret.go new file mode 100644 index 0000000000..b9138566f0 --- /dev/null +++ b/completers/flux2_completer/cmd/create_secret.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_secretCmd = &cobra.Command{ + Use: "secret", + Short: "Create or update Kubernetes secrets", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_secretCmd).Standalone() + createCmd.AddCommand(create_secretCmd) +} diff --git a/completers/flux2_completer/cmd/create_secret_git.go b/completers/flux2_completer/cmd/create_secret_git.go new file mode 100644 index 0000000000..5b50044eb7 --- /dev/null +++ b/completers/flux2_completer/cmd/create_secret_git.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_secret_gitCmd = &cobra.Command{ + Use: "git", + Short: "Create or update a Kubernetes secret for Git authentication", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_secret_gitCmd).Standalone() + create_secret_gitCmd.Flags().String("ca-file", "", "path to TLS CA file used for validating self-signed certificates") + create_secret_gitCmd.Flags().StringP("password", "p", "", "basic authentication password") + create_secret_gitCmd.Flags().String("private-key-file", "", "path to a passwordless private key file used for authenticating to the Git SSH server") + create_secret_gitCmd.Flags().EcdsaCurve("ssh-ecdsa-curve", p384, "SSH ECDSA public key curve (p256, p384, p521)") + create_secret_gitCmd.Flags().PublicKeyAlgorithm("ssh-key-algorithm", ecdsa, "SSH public key algorithm (rsa, ecdsa, ed25519)") + create_secret_gitCmd.Flags().RsaKeyBits("ssh-rsa-bits", 2048, "SSH RSA public key bit size (multiplies of 8)") + create_secret_gitCmd.Flags().String("url", "", "git address, e.g. ssh://git@host/org/repository") + create_secret_gitCmd.Flags().StringP("username", "u", "", "basic authentication username") + create_secretCmd.AddCommand(create_secret_gitCmd) +} diff --git a/completers/flux2_completer/cmd/create_secret_helm.go b/completers/flux2_completer/cmd/create_secret_helm.go new file mode 100644 index 0000000000..a02f783619 --- /dev/null +++ b/completers/flux2_completer/cmd/create_secret_helm.go @@ -0,0 +1,22 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_secret_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Create or update a Kubernetes secret for Helm repository authentication", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_secret_helmCmd).Standalone() + create_secret_helmCmd.Flags().String("ca-file", "", "TLS authentication CA file path") + create_secret_helmCmd.Flags().String("cert-file", "", "TLS authentication cert file path") + create_secret_helmCmd.Flags().String("key-file", "", "TLS authentication key file path") + create_secret_helmCmd.Flags().StringP("password", "p", "", "basic authentication password") + create_secret_helmCmd.Flags().StringP("username", "u", "", "basic authentication username") + create_secretCmd.AddCommand(create_secret_helmCmd) +} diff --git a/completers/flux2_completer/cmd/create_secret_tls.go b/completers/flux2_completer/cmd/create_secret_tls.go new file mode 100644 index 0000000000..b8279abbff --- /dev/null +++ b/completers/flux2_completer/cmd/create_secret_tls.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_secret_tlsCmd = &cobra.Command{ + Use: "tls", + Short: "Create or update a Kubernetes secret with TLS certificates", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_secret_tlsCmd).Standalone() + create_secret_tlsCmd.Flags().String("ca-file", "", "TLS authentication CA file path") + create_secret_tlsCmd.Flags().String("cert-file", "", "TLS authentication cert file path") + create_secret_tlsCmd.Flags().String("key-file", "", "TLS authentication key file path") + create_secretCmd.AddCommand(create_secret_tlsCmd) +} diff --git a/completers/flux2_completer/cmd/create_source.go b/completers/flux2_completer/cmd/create_source.go new file mode 100644 index 0000000000..205b89fbde --- /dev/null +++ b/completers/flux2_completer/cmd/create_source.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Create or update sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_sourceCmd).Standalone() + create_sourceCmd.PersistentFlags().String("fetch-timeout", "", "set a timeout for fetch operations performed by source-controller (e.g. 'git clone' or 'helm repo update')") + createCmd.AddCommand(create_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/create_source_bucket.go b/completers/flux2_completer/cmd/create_source_bucket.go new file mode 100644 index 0000000000..22f0600126 --- /dev/null +++ b/completers/flux2_completer/cmd/create_source_bucket.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Create or update a Bucket source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_source_bucketCmd).Standalone() + create_source_bucketCmd.Flags().String("access-key", "", "the bucket access key") + create_source_bucketCmd.Flags().String("bucket-name", "", "the bucket name") + create_source_bucketCmd.Flags().String("endpoint", "", "the bucket endpoint address") + create_source_bucketCmd.Flags().Bool("insecure", false, "for when connecting to a non-TLS S3 HTTP endpoint") + create_source_bucketCmd.Flags().SourceBucketProvider("provider", generic, "the S3 compatible storage provider name, available options are: (generic, aws)") + create_source_bucketCmd.Flags().String("region", "", "the bucket region") + create_source_bucketCmd.Flags().String("secret-key", "", "the bucket secret key") + create_source_bucketCmd.Flags().String("secret-ref", "", "the name of an existing secret containing credentials") + create_sourceCmd.AddCommand(create_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/create_source_git.go b/completers/flux2_completer/cmd/create_source_git.go new file mode 100644 index 0000000000..39fb2d5cbd --- /dev/null +++ b/completers/flux2_completer/cmd/create_source_git.go @@ -0,0 +1,32 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Create or update a GitRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_source_gitCmd).Standalone() + create_source_gitCmd.Flags().String("branch", "", "git branch") + create_source_gitCmd.Flags().String("ca-file", "", "path to TLS CA file used for validating self-signed certificates") + create_source_gitCmd.Flags().String("git-implementation", "", "the Git implementation to use, available options are: (go-git, libgit2)") + create_source_gitCmd.Flags().StringP("password", "p", "", "basic authentication password") + create_source_gitCmd.Flags().String("private-key-file", "", "path to a passwordless private key file used for authenticating to the Git SSH server") + create_source_gitCmd.Flags().Bool("recurse-submodules", false, "when enabled, configures the GitRepository source to initialize and include Git submodules in the artifact it produces") + create_source_gitCmd.Flags().String("secret-ref", "", "the name of an existing secret containing SSH or basic credentials") + create_source_gitCmd.Flags().BoolP("silent", "s", false, "assumes the deploy key is already setup, skips confirmation") + create_source_gitCmd.Flags().EcdsaCurve("ssh-ecdsa-curve", p384, "SSH ECDSA public key curve (p256, p384, p521)") + create_source_gitCmd.Flags().PublicKeyAlgorithm("ssh-key-algorithm", ecdsa, "SSH public key algorithm (rsa, ecdsa, ed25519)") + create_source_gitCmd.Flags().RsaKeyBits("ssh-rsa-bits", 2048, "SSH RSA public key bit size (multiplies of 8)") + create_source_gitCmd.Flags().String("tag", "", "git tag") + create_source_gitCmd.Flags().String("tag-semver", "", "git tag semver range") + create_source_gitCmd.Flags().String("url", "", "git address, e.g. ssh://git@host/org/repository") + create_source_gitCmd.Flags().StringP("username", "u", "", "basic authentication username") + create_sourceCmd.AddCommand(create_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/create_source_helm.go b/completers/flux2_completer/cmd/create_source_helm.go new file mode 100644 index 0000000000..8cc8aa859a --- /dev/null +++ b/completers/flux2_completer/cmd/create_source_helm.go @@ -0,0 +1,25 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Create or update a HelmRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_source_helmCmd).Standalone() + create_source_helmCmd.Flags().String("ca-file", "", "TLS authentication CA file path") + create_source_helmCmd.Flags().String("cert-file", "", "TLS authentication cert file path") + create_source_helmCmd.Flags().String("key-file", "", "TLS authentication key file path") + create_source_helmCmd.Flags().Bool("pass-credentials", false, "pass credentials to all domains") + create_source_helmCmd.Flags().StringP("password", "p", "", "basic authentication password") + create_source_helmCmd.Flags().String("secret-ref", "", "the name of an existing secret containing TLS or basic auth credentials") + create_source_helmCmd.Flags().String("url", "", "Helm repository address") + create_source_helmCmd.Flags().StringP("username", "u", "", "basic authentication username") + create_sourceCmd.AddCommand(create_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/create_tenant.go b/completers/flux2_completer/cmd/create_tenant.go new file mode 100644 index 0000000000..3ae09d71d7 --- /dev/null +++ b/completers/flux2_completer/cmd/create_tenant.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var create_tenantCmd = &cobra.Command{ + Use: "tenant", + Short: "Create or update a tenant", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(create_tenantCmd).Standalone() + create_tenantCmd.Flags().String("cluster-role", "cluster-admin", "cluster role of the tenant role binding") + create_tenantCmd.Flags().StringSlice("with-namespace", []string{}, "namespace belonging to this tenant") + createCmd.AddCommand(create_tenantCmd) +} diff --git a/completers/flux2_completer/cmd/delete.go b/completers/flux2_completer/cmd/delete.go new file mode 100644 index 0000000000..e6e094b586 --- /dev/null +++ b/completers/flux2_completer/cmd/delete.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var deleteCmd = &cobra.Command{ + Use: "delete", + Short: "Delete sources and resources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(deleteCmd).Standalone() + deleteCmd.PersistentFlags().BoolP("silent", "s", false, "delete resource without asking for confirmation") + rootCmd.AddCommand(deleteCmd) +} diff --git a/completers/flux2_completer/cmd/delete_alert.go b/completers/flux2_completer/cmd/delete_alert.go new file mode 100644 index 0000000000..ba501a081d --- /dev/null +++ b/completers/flux2_completer/cmd/delete_alert.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Delete a Alert resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_alertCmd).Standalone() + deleteCmd.AddCommand(delete_alertCmd) +} diff --git a/completers/flux2_completer/cmd/delete_alertProvider.go b/completers/flux2_completer/cmd/delete_alertProvider.go new file mode 100644 index 0000000000..abf558fe35 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_alertProvider.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_alertProviderCmd = &cobra.Command{ + Use: "alert-provider", + Short: "Delete a Provider resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_alertProviderCmd).Standalone() + deleteCmd.AddCommand(delete_alertProviderCmd) +} diff --git a/completers/flux2_completer/cmd/delete_helmrelease.go b/completers/flux2_completer/cmd/delete_helmrelease.go new file mode 100644 index 0000000000..d562aa73e3 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_helmrelease.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Delete a HelmRelease resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_helmreleaseCmd).Standalone() + deleteCmd.AddCommand(delete_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/delete_image.go b/completers/flux2_completer/cmd/delete_image.go new file mode 100644 index 0000000000..8d822180b5 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_imageCmd = &cobra.Command{ + Use: "image", + Short: "Delete image automation objects", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_imageCmd).Standalone() + deleteCmd.AddCommand(delete_imageCmd) +} diff --git a/completers/flux2_completer/cmd/delete_image_policy.go b/completers/flux2_completer/cmd/delete_image_policy.go new file mode 100644 index 0000000000..fbe70900d2 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_image_policy.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_image_policyCmd = &cobra.Command{ + Use: "policy", + Short: "Delete an ImagePolicy object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_image_policyCmd).Standalone() + delete_imageCmd.AddCommand(delete_image_policyCmd) +} diff --git a/completers/flux2_completer/cmd/delete_image_repository.go b/completers/flux2_completer/cmd/delete_image_repository.go new file mode 100644 index 0000000000..3e62a8c5e8 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_image_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Delete an ImageRepository object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_image_repositoryCmd).Standalone() + delete_imageCmd.AddCommand(delete_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/delete_image_update.go b/completers/flux2_completer/cmd/delete_image_update.go new file mode 100644 index 0000000000..ef64b02410 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_image_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Delete an ImageUpdateAutomation object", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_image_updateCmd).Standalone() + delete_imageCmd.AddCommand(delete_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/delete_kustomization.go b/completers/flux2_completer/cmd/delete_kustomization.go new file mode 100644 index 0000000000..7e81461385 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_kustomization.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Delete a Kustomization resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_kustomizationCmd).Standalone() + deleteCmd.AddCommand(delete_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/delete_receiver.go b/completers/flux2_completer/cmd/delete_receiver.go new file mode 100644 index 0000000000..6a985360c8 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_receiver.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Delete a Receiver resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_receiverCmd).Standalone() + deleteCmd.AddCommand(delete_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/delete_source.go b/completers/flux2_completer/cmd/delete_source.go new file mode 100644 index 0000000000..cadb2a2afb --- /dev/null +++ b/completers/flux2_completer/cmd/delete_source.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Delete sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_sourceCmd).Standalone() + deleteCmd.AddCommand(delete_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/delete_source_bucket.go b/completers/flux2_completer/cmd/delete_source_bucket.go new file mode 100644 index 0000000000..45fff6a227 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_source_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Delete a Bucket source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_source_bucketCmd).Standalone() + delete_sourceCmd.AddCommand(delete_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/delete_source_git.go b/completers/flux2_completer/cmd/delete_source_git.go new file mode 100644 index 0000000000..bdca05db93 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_source_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Delete a GitRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_source_gitCmd).Standalone() + delete_sourceCmd.AddCommand(delete_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/delete_source_helm.go b/completers/flux2_completer/cmd/delete_source_helm.go new file mode 100644 index 0000000000..7563b420f9 --- /dev/null +++ b/completers/flux2_completer/cmd/delete_source_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var delete_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Delete a HelmRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(delete_source_helmCmd).Standalone() + delete_sourceCmd.AddCommand(delete_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/diff.go b/completers/flux2_completer/cmd/diff.go new file mode 100644 index 0000000000..c2c6317701 --- /dev/null +++ b/completers/flux2_completer/cmd/diff.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var diffCmd = &cobra.Command{ + Use: "diff", + Short: "Diff a flux resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(diffCmd).Standalone() + rootCmd.AddCommand(diffCmd) +} diff --git a/completers/flux2_completer/cmd/diff_kustomization.go b/completers/flux2_completer/cmd/diff_kustomization.go new file mode 100644 index 0000000000..9f88935f97 --- /dev/null +++ b/completers/flux2_completer/cmd/diff_kustomization.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var diff_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Diff Kustomization", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(diff_kustomizationCmd).Standalone() + diff_kustomizationCmd.Flags().String("path", "", "Path to a local directory that matches the specified Kustomization.spec.path.)") + diffCmd.AddCommand(diff_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/export.go b/completers/flux2_completer/cmd/export.go new file mode 100644 index 0000000000..e974006ec1 --- /dev/null +++ b/completers/flux2_completer/cmd/export.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var exportCmd = &cobra.Command{ + Use: "export", + Short: "Export resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(exportCmd).Standalone() + exportCmd.PersistentFlags().Bool("all", false, "select all resources") + rootCmd.AddCommand(exportCmd) +} diff --git a/completers/flux2_completer/cmd/export_alert.go b/completers/flux2_completer/cmd/export_alert.go new file mode 100644 index 0000000000..e961ad9f39 --- /dev/null +++ b/completers/flux2_completer/cmd/export_alert.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Export Alert resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_alertCmd).Standalone() + exportCmd.AddCommand(export_alertCmd) +} diff --git a/completers/flux2_completer/cmd/export_alertProvider.go b/completers/flux2_completer/cmd/export_alertProvider.go new file mode 100644 index 0000000000..514bd4d885 --- /dev/null +++ b/completers/flux2_completer/cmd/export_alertProvider.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_alertProviderCmd = &cobra.Command{ + Use: "alert-provider", + Short: "Export Provider resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_alertProviderCmd).Standalone() + exportCmd.AddCommand(export_alertProviderCmd) +} diff --git a/completers/flux2_completer/cmd/export_helmrelease.go b/completers/flux2_completer/cmd/export_helmrelease.go new file mode 100644 index 0000000000..dfbf47d02e --- /dev/null +++ b/completers/flux2_completer/cmd/export_helmrelease.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Export HelmRelease resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_helmreleaseCmd).Standalone() + exportCmd.AddCommand(export_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/export_image.go b/completers/flux2_completer/cmd/export_image.go new file mode 100644 index 0000000000..888670f0cf --- /dev/null +++ b/completers/flux2_completer/cmd/export_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_imageCmd = &cobra.Command{ + Use: "image", + Short: "Export image automation objects", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_imageCmd).Standalone() + exportCmd.AddCommand(export_imageCmd) +} diff --git a/completers/flux2_completer/cmd/export_image_policy.go b/completers/flux2_completer/cmd/export_image_policy.go new file mode 100644 index 0000000000..1536880bc9 --- /dev/null +++ b/completers/flux2_completer/cmd/export_image_policy.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_image_policyCmd = &cobra.Command{ + Use: "policy", + Short: "Export ImagePolicy resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_image_policyCmd).Standalone() + export_imageCmd.AddCommand(export_image_policyCmd) +} diff --git a/completers/flux2_completer/cmd/export_image_repository.go b/completers/flux2_completer/cmd/export_image_repository.go new file mode 100644 index 0000000000..8df2697119 --- /dev/null +++ b/completers/flux2_completer/cmd/export_image_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Export ImageRepository resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_image_repositoryCmd).Standalone() + export_imageCmd.AddCommand(export_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/export_image_update.go b/completers/flux2_completer/cmd/export_image_update.go new file mode 100644 index 0000000000..250beeb40f --- /dev/null +++ b/completers/flux2_completer/cmd/export_image_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Export ImageUpdateAutomation resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_image_updateCmd).Standalone() + export_imageCmd.AddCommand(export_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/export_kustomization.go b/completers/flux2_completer/cmd/export_kustomization.go new file mode 100644 index 0000000000..1524e96876 --- /dev/null +++ b/completers/flux2_completer/cmd/export_kustomization.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Export Kustomization resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_kustomizationCmd).Standalone() + exportCmd.AddCommand(export_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/export_receiver.go b/completers/flux2_completer/cmd/export_receiver.go new file mode 100644 index 0000000000..317bc53b5b --- /dev/null +++ b/completers/flux2_completer/cmd/export_receiver.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Export Receiver resources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_receiverCmd).Standalone() + exportCmd.AddCommand(export_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/export_source.go b/completers/flux2_completer/cmd/export_source.go new file mode 100644 index 0000000000..971829ddf3 --- /dev/null +++ b/completers/flux2_completer/cmd/export_source.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Export sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_sourceCmd).Standalone() + export_sourceCmd.PersistentFlags().Bool("with-credentials", false, "include credential secrets") + exportCmd.AddCommand(export_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/export_source_bucket.go b/completers/flux2_completer/cmd/export_source_bucket.go new file mode 100644 index 0000000000..9562b22e18 --- /dev/null +++ b/completers/flux2_completer/cmd/export_source_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Export Bucket sources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_source_bucketCmd).Standalone() + export_sourceCmd.AddCommand(export_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/export_source_git.go b/completers/flux2_completer/cmd/export_source_git.go new file mode 100644 index 0000000000..f795e89fdd --- /dev/null +++ b/completers/flux2_completer/cmd/export_source_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Export GitRepository sources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_source_gitCmd).Standalone() + export_sourceCmd.AddCommand(export_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/export_source_helm.go b/completers/flux2_completer/cmd/export_source_helm.go new file mode 100644 index 0000000000..6544d6e262 --- /dev/null +++ b/completers/flux2_completer/cmd/export_source_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var export_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Export HelmRepository sources in YAML format", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(export_source_helmCmd).Standalone() + export_sourceCmd.AddCommand(export_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/get.go b/completers/flux2_completer/cmd/get.go new file mode 100644 index 0000000000..287e1520ce --- /dev/null +++ b/completers/flux2_completer/cmd/get.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var getCmd = &cobra.Command{ + Use: "get", + Short: "Get the resources and their status", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(getCmd).Standalone() + getCmd.PersistentFlags().BoolP("all-namespaces", "A", false, "list the requested object(s) across all namespaces") + getCmd.PersistentFlags().Bool("no-header", false, "skip the header when printing the results") + getCmd.PersistentFlags().String("status-selector", "", "specify the status condition name and the desired state to filter the get result, e.g. ready=false") + getCmd.PersistentFlags().BoolP("watch", "w", false, "After listing/getting the requested object, watch for changes.") + rootCmd.AddCommand(getCmd) +} diff --git a/completers/flux2_completer/cmd/get_alertProviders.go b/completers/flux2_completer/cmd/get_alertProviders.go new file mode 100644 index 0000000000..4227af534a --- /dev/null +++ b/completers/flux2_completer/cmd/get_alertProviders.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_alertProvidersCmd = &cobra.Command{ + Use: "alert-providers", + Short: "Get Provider statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_alertProvidersCmd).Standalone() + getCmd.AddCommand(get_alertProvidersCmd) +} diff --git a/completers/flux2_completer/cmd/get_alerts.go b/completers/flux2_completer/cmd/get_alerts.go new file mode 100644 index 0000000000..3df0a80cfd --- /dev/null +++ b/completers/flux2_completer/cmd/get_alerts.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_alertsCmd = &cobra.Command{ + Use: "alerts", + Short: "Get Alert statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_alertsCmd).Standalone() + getCmd.AddCommand(get_alertsCmd) +} diff --git a/completers/flux2_completer/cmd/get_all.go b/completers/flux2_completer/cmd/get_all.go new file mode 100644 index 0000000000..a121370409 --- /dev/null +++ b/completers/flux2_completer/cmd/get_all.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_allCmd = &cobra.Command{ + Use: "all", + Short: "Get all resources and statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_allCmd).Standalone() + getCmd.AddCommand(get_allCmd) +} diff --git a/completers/flux2_completer/cmd/get_helmreleases.go b/completers/flux2_completer/cmd/get_helmreleases.go new file mode 100644 index 0000000000..629461b123 --- /dev/null +++ b/completers/flux2_completer/cmd/get_helmreleases.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_helmreleasesCmd = &cobra.Command{ + Use: "helmreleases", + Short: "Get HelmRelease statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_helmreleasesCmd).Standalone() + getCmd.AddCommand(get_helmreleasesCmd) +} diff --git a/completers/flux2_completer/cmd/get_images.go b/completers/flux2_completer/cmd/get_images.go new file mode 100644 index 0000000000..79bbf42f0a --- /dev/null +++ b/completers/flux2_completer/cmd/get_images.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_imagesCmd = &cobra.Command{ + Use: "images", + Short: "Get image automation object status", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_imagesCmd).Standalone() + getCmd.AddCommand(get_imagesCmd) +} diff --git a/completers/flux2_completer/cmd/get_images_all.go b/completers/flux2_completer/cmd/get_images_all.go new file mode 100644 index 0000000000..d01160018f --- /dev/null +++ b/completers/flux2_completer/cmd/get_images_all.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_images_allCmd = &cobra.Command{ + Use: "all", + Short: "Get all image statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_images_allCmd).Standalone() + get_imagesCmd.AddCommand(get_images_allCmd) +} diff --git a/completers/flux2_completer/cmd/get_images_policy.go b/completers/flux2_completer/cmd/get_images_policy.go new file mode 100644 index 0000000000..8a0ebb7ba6 --- /dev/null +++ b/completers/flux2_completer/cmd/get_images_policy.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_images_policyCmd = &cobra.Command{ + Use: "policy", + Short: "Get ImagePolicy status", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_images_policyCmd).Standalone() + get_imagesCmd.AddCommand(get_images_policyCmd) +} diff --git a/completers/flux2_completer/cmd/get_images_repository.go b/completers/flux2_completer/cmd/get_images_repository.go new file mode 100644 index 0000000000..db0b5f8fd3 --- /dev/null +++ b/completers/flux2_completer/cmd/get_images_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_images_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Get ImageRepository status", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_images_repositoryCmd).Standalone() + get_imagesCmd.AddCommand(get_images_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/get_images_update.go b/completers/flux2_completer/cmd/get_images_update.go new file mode 100644 index 0000000000..f4b4fef2b5 --- /dev/null +++ b/completers/flux2_completer/cmd/get_images_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_images_updateCmd = &cobra.Command{ + Use: "update", + Short: "Get ImageUpdateAutomation status", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_images_updateCmd).Standalone() + get_imagesCmd.AddCommand(get_images_updateCmd) +} diff --git a/completers/flux2_completer/cmd/get_kustomizations.go b/completers/flux2_completer/cmd/get_kustomizations.go new file mode 100644 index 0000000000..1876d51e22 --- /dev/null +++ b/completers/flux2_completer/cmd/get_kustomizations.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_kustomizationsCmd = &cobra.Command{ + Use: "kustomizations", + Short: "Get Kustomization statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_kustomizationsCmd).Standalone() + getCmd.AddCommand(get_kustomizationsCmd) +} diff --git a/completers/flux2_completer/cmd/get_receivers.go b/completers/flux2_completer/cmd/get_receivers.go new file mode 100644 index 0000000000..0daf8e8f21 --- /dev/null +++ b/completers/flux2_completer/cmd/get_receivers.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_receiversCmd = &cobra.Command{ + Use: "receivers", + Short: "Get Receiver statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_receiversCmd).Standalone() + getCmd.AddCommand(get_receiversCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources.go b/completers/flux2_completer/cmd/get_sources.go new file mode 100644 index 0000000000..724ba5acc3 --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sourcesCmd = &cobra.Command{ + Use: "sources", + Short: "Get source statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sourcesCmd).Standalone() + getCmd.AddCommand(get_sourcesCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources_all.go b/completers/flux2_completer/cmd/get_sources_all.go new file mode 100644 index 0000000000..57ee2a8be2 --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources_all.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sources_allCmd = &cobra.Command{ + Use: "all", + Short: "Get all source statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sources_allCmd).Standalone() + get_sourcesCmd.AddCommand(get_sources_allCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources_bucket.go b/completers/flux2_completer/cmd/get_sources_bucket.go new file mode 100644 index 0000000000..a0ef6ca0b0 --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sources_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Get Bucket source statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sources_bucketCmd).Standalone() + get_sourcesCmd.AddCommand(get_sources_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources_chart.go b/completers/flux2_completer/cmd/get_sources_chart.go new file mode 100644 index 0000000000..8af9352597 --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources_chart.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sources_chartCmd = &cobra.Command{ + Use: "chart", + Short: "Get HelmChart statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sources_chartCmd).Standalone() + get_sourcesCmd.AddCommand(get_sources_chartCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources_git.go b/completers/flux2_completer/cmd/get_sources_git.go new file mode 100644 index 0000000000..6ee4911d0f --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sources_gitCmd = &cobra.Command{ + Use: "git", + Short: "Get GitRepository source statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sources_gitCmd).Standalone() + get_sourcesCmd.AddCommand(get_sources_gitCmd) +} diff --git a/completers/flux2_completer/cmd/get_sources_helm.go b/completers/flux2_completer/cmd/get_sources_helm.go new file mode 100644 index 0000000000..19a26f797b --- /dev/null +++ b/completers/flux2_completer/cmd/get_sources_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var get_sources_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Get HelmRepository source statuses", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(get_sources_helmCmd).Standalone() + get_sourcesCmd.AddCommand(get_sources_helmCmd) +} diff --git a/completers/flux2_completer/cmd/help.go b/completers/flux2_completer/cmd/help.go new file mode 100644 index 0000000000..f55758d2d7 --- /dev/null +++ b/completers/flux2_completer/cmd/help.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var helpCmd = &cobra.Command{ + Use: "help", + Short: "Help about any command", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(helpCmd).Standalone() + rootCmd.AddCommand(helpCmd) +} diff --git a/completers/flux2_completer/cmd/install.go b/completers/flux2_completer/cmd/install.go new file mode 100644 index 0000000000..b059ba95d8 --- /dev/null +++ b/completers/flux2_completer/cmd/install.go @@ -0,0 +1,31 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var installCmd = &cobra.Command{ + Use: "install", + Short: "Install or upgrade Flux", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(installCmd).Standalone() + installCmd.Flags().String("arch", "", "cluster architecture, available options are: (amd64, arm, arm64)") + installCmd.Flags().String("cluster-domain", "cluster.local", "internal cluster domain") + installCmd.Flags().StringSlice("components", []string{"source-controller", "kustomize-controller", "helm-controller", "notification-controller"}, "list of components, accepts comma-separated values") + installCmd.Flags().StringSlice("components-extra", []string{}, "list of components in addition to those supplied or defaulted, accepts comma-separated values") + installCmd.Flags().Bool("dry-run", false, "only print the object that would be applied") + installCmd.Flags().Bool("export", false, "write the install manifests to stdout and exit") + installCmd.Flags().String("image-pull-secret", "", "Kubernetes secret name used for pulling the toolkit images from a private registry") + installCmd.Flags().String("log-level", "", "log level, available options are: (debug, info, error)") + installCmd.Flags().String("manifests", "", "path to the manifest directory") + installCmd.Flags().Bool("network-policy", true, "deny ingress access to the toolkit controllers from other namespaces using network policies") + installCmd.Flags().String("registry", "ghcr.io/fluxcd", "container registry where the toolkit images are published") + installCmd.Flags().StringSlice("toleration-keys", []string{}, "list of toleration keys used to schedule the components pods onto nodes with matching taints") + installCmd.Flags().StringP("version", "v", "", "toolkit version, when specified the manifests are downloaded from https://github.com/fluxcd/flux2/releases") + installCmd.Flags().Bool("watch-all-namespaces", true, "watch for custom resources in all namespaces, if set to false it will only watch the namespace where the toolkit is installed") + rootCmd.AddCommand(installCmd) +} diff --git a/completers/flux2_completer/cmd/logs.go b/completers/flux2_completer/cmd/logs.go new file mode 100644 index 0000000000..982b3e933d --- /dev/null +++ b/completers/flux2_completer/cmd/logs.go @@ -0,0 +1,26 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var logsCmd = &cobra.Command{ + Use: "logs", + Short: "Display formatted logs for Flux components", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(logsCmd).Standalone() + logsCmd.Flags().BoolP("all-namespaces", "A", false, "displays logs for objects across all namespaces") + logsCmd.Flags().String("flux-namespace", "flux-system", "the namespace where the Flux components are running") + logsCmd.Flags().BoolP("follow", "f", false, "specifies if the logs should be streamed") + logsCmd.Flags().String("kind", "", "displays errors of a particular toolkit kind e.g GitRepository") + logsCmd.Flags().String("level", "", "log level, available options are: (debug, info, error)") + logsCmd.Flags().String("name", "", "specifies the name of the object logs to be displayed") + logsCmd.Flags().String("since", "", "Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all logs. Only one of since-time / since may be used.") + logsCmd.Flags().String("since-time", "", "Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of since-time / since may be used.") + logsCmd.Flags().Int64("tail", -1, "lines of recent log file to display") + rootCmd.AddCommand(logsCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile.go b/completers/flux2_completer/cmd/reconcile.go new file mode 100644 index 0000000000..a3d86698c6 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcileCmd = &cobra.Command{ + Use: "reconcile", + Short: "Reconcile sources and resources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcileCmd).Standalone() + rootCmd.AddCommand(reconcileCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_alert.go b/completers/flux2_completer/cmd/reconcile_alert.go new file mode 100644 index 0000000000..c9a952133e --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_alert.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Reconcile an Alert", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_alertCmd).Standalone() + reconcileCmd.AddCommand(reconcile_alertCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_alertProvider.go b/completers/flux2_completer/cmd/reconcile_alertProvider.go new file mode 100644 index 0000000000..6688252db1 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_alertProvider.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_alertProviderCmd = &cobra.Command{ + Use: "alert-provider", + Short: "Reconcile a Provider", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_alertProviderCmd).Standalone() + reconcileCmd.AddCommand(reconcile_alertProviderCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_helmrelease.go b/completers/flux2_completer/cmd/reconcile_helmrelease.go new file mode 100644 index 0000000000..50327b1580 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_helmrelease.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Reconcile a HelmRelease resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_helmreleaseCmd).Standalone() + reconcile_helmreleaseCmd.Flags().Bool("with-source", false, "reconcile HelmRelease source") + reconcileCmd.AddCommand(reconcile_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_image.go b/completers/flux2_completer/cmd/reconcile_image.go new file mode 100644 index 0000000000..52a861df5b --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_imageCmd = &cobra.Command{ + Use: "image", + Short: "Reconcile image automation objects", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_imageCmd).Standalone() + reconcileCmd.AddCommand(reconcile_imageCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_image_repository.go b/completers/flux2_completer/cmd/reconcile_image_repository.go new file mode 100644 index 0000000000..497934576d --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_image_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Reconcile an ImageRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_image_repositoryCmd).Standalone() + reconcile_imageCmd.AddCommand(reconcile_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_image_update.go b/completers/flux2_completer/cmd/reconcile_image_update.go new file mode 100644 index 0000000000..730e235050 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_image_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Reconcile an ImageUpdateAutomation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_image_updateCmd).Standalone() + reconcile_imageCmd.AddCommand(reconcile_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_kustomization.go b/completers/flux2_completer/cmd/reconcile_kustomization.go new file mode 100644 index 0000000000..3ea8f91833 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_kustomization.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Reconcile a Kustomization resource", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_kustomizationCmd).Standalone() + reconcile_kustomizationCmd.Flags().Bool("with-source", false, "reconcile Kustomization source") + reconcileCmd.AddCommand(reconcile_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_receiver.go b/completers/flux2_completer/cmd/reconcile_receiver.go new file mode 100644 index 0000000000..b4ed598ff0 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_receiver.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Reconcile a Receiver", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_receiverCmd).Standalone() + reconcileCmd.AddCommand(reconcile_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_source.go b/completers/flux2_completer/cmd/reconcile_source.go new file mode 100644 index 0000000000..89040339ce --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_source.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Reconcile sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_sourceCmd).Standalone() + reconcileCmd.AddCommand(reconcile_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_source_bucket.go b/completers/flux2_completer/cmd/reconcile_source_bucket.go new file mode 100644 index 0000000000..e8629b6a62 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_source_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Reconcile a Bucket source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_source_bucketCmd).Standalone() + reconcile_sourceCmd.AddCommand(reconcile_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_source_git.go b/completers/flux2_completer/cmd/reconcile_source_git.go new file mode 100644 index 0000000000..01cadce493 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_source_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Reconcile a GitRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_source_gitCmd).Standalone() + reconcile_sourceCmd.AddCommand(reconcile_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/reconcile_source_helm.go b/completers/flux2_completer/cmd/reconcile_source_helm.go new file mode 100644 index 0000000000..581cae0585 --- /dev/null +++ b/completers/flux2_completer/cmd/reconcile_source_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var reconcile_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Reconcile a HelmRepository source", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(reconcile_source_helmCmd).Standalone() + reconcile_sourceCmd.AddCommand(reconcile_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/resume.go b/completers/flux2_completer/cmd/resume.go new file mode 100644 index 0000000000..fb1d31ac27 --- /dev/null +++ b/completers/flux2_completer/cmd/resume.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resumeCmd = &cobra.Command{ + Use: "resume", + Short: "Resume suspended resources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resumeCmd).Standalone() + resumeCmd.PersistentFlags().Bool("all", false, "resume all resources in that namespace") + rootCmd.AddCommand(resumeCmd) +} diff --git a/completers/flux2_completer/cmd/resume_alert.go b/completers/flux2_completer/cmd/resume_alert.go new file mode 100644 index 0000000000..cfc2cbe1da --- /dev/null +++ b/completers/flux2_completer/cmd/resume_alert.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Resume a suspended Alert", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_alertCmd).Standalone() + resumeCmd.AddCommand(resume_alertCmd) +} diff --git a/completers/flux2_completer/cmd/resume_helmrelease.go b/completers/flux2_completer/cmd/resume_helmrelease.go new file mode 100644 index 0000000000..c4d0081a4c --- /dev/null +++ b/completers/flux2_completer/cmd/resume_helmrelease.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Resume a suspended HelmRelease", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_helmreleaseCmd).Standalone() + resumeCmd.AddCommand(resume_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/resume_image.go b/completers/flux2_completer/cmd/resume_image.go new file mode 100644 index 0000000000..1ed435da54 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_imageCmd = &cobra.Command{ + Use: "image", + Short: "Resume image automation objects", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_imageCmd).Standalone() + resumeCmd.AddCommand(resume_imageCmd) +} diff --git a/completers/flux2_completer/cmd/resume_image_repository.go b/completers/flux2_completer/cmd/resume_image_repository.go new file mode 100644 index 0000000000..0701f18cf3 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_image_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Resume a suspended ImageRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_image_repositoryCmd).Standalone() + resume_imageCmd.AddCommand(resume_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/resume_image_update.go b/completers/flux2_completer/cmd/resume_image_update.go new file mode 100644 index 0000000000..6bcbe81657 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_image_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Resume a suspended ImageUpdateAutomation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_image_updateCmd).Standalone() + resume_imageCmd.AddCommand(resume_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/resume_kustomization.go b/completers/flux2_completer/cmd/resume_kustomization.go new file mode 100644 index 0000000000..55a44ef7c9 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_kustomization.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Resume a suspended Kustomization", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_kustomizationCmd).Standalone() + resumeCmd.AddCommand(resume_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/resume_receiver.go b/completers/flux2_completer/cmd/resume_receiver.go new file mode 100644 index 0000000000..a618fdae82 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_receiver.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Resume a suspended Receiver", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_receiverCmd).Standalone() + resumeCmd.AddCommand(resume_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/resume_source.go b/completers/flux2_completer/cmd/resume_source.go new file mode 100644 index 0000000000..9d09211e82 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_source.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Resume sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_sourceCmd).Standalone() + resumeCmd.AddCommand(resume_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/resume_source_bucket.go b/completers/flux2_completer/cmd/resume_source_bucket.go new file mode 100644 index 0000000000..52deeb69f3 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_source_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Resume a suspended Bucket", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_source_bucketCmd).Standalone() + resume_sourceCmd.AddCommand(resume_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/resume_source_chart.go b/completers/flux2_completer/cmd/resume_source_chart.go new file mode 100644 index 0000000000..ffe387e263 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_source_chart.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_source_chartCmd = &cobra.Command{ + Use: "chart", + Short: "Resume a suspended HelmChart", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_source_chartCmd).Standalone() + resume_sourceCmd.AddCommand(resume_source_chartCmd) +} diff --git a/completers/flux2_completer/cmd/resume_source_git.go b/completers/flux2_completer/cmd/resume_source_git.go new file mode 100644 index 0000000000..4e6b4847e8 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_source_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Resume a suspended GitRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_source_gitCmd).Standalone() + resume_sourceCmd.AddCommand(resume_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/resume_source_helm.go b/completers/flux2_completer/cmd/resume_source_helm.go new file mode 100644 index 0000000000..314dc78d72 --- /dev/null +++ b/completers/flux2_completer/cmd/resume_source_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var resume_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Resume a suspended HelmRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(resume_source_helmCmd).Standalone() + resume_sourceCmd.AddCommand(resume_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/root.go b/completers/flux2_completer/cmd/root.go new file mode 100644 index 0000000000..020d2c115f --- /dev/null +++ b/completers/flux2_completer/cmd/root.go @@ -0,0 +1,40 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "flux", + Short: "Command line utility for assembling Kubernetes CD pipelines", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func Execute() error { + return rootCmd.Execute() +} + +func init() { + carapace.Gen(rootCmd).Standalone() + rootCmd.PersistentFlags().String("as", "", "Username to impersonate for the operation. User could be a regular user or a service account in a namespace.") + rootCmd.PersistentFlags().StringArray("as-group", []string{}, "Group to impersonate for the operation, this flag can be repeated to specify multiple groups.") + rootCmd.PersistentFlags().String("as-uid", "", "UID to impersonate for the operation.") + rootCmd.PersistentFlags().String("cache-dir", "/home/rsteube/.kube/cache", "Default cache directory") + rootCmd.PersistentFlags().String("certificate-authority", "", "Path to a cert file for the certificate authority") + rootCmd.PersistentFlags().String("client-certificate", "", "Path to a client certificate file for TLS") + rootCmd.PersistentFlags().String("client-key", "", "Path to a client key file for TLS") + rootCmd.PersistentFlags().String("cluster", "", "The name of the kubeconfig cluster to use") + rootCmd.PersistentFlags().String("context", "", "The name of the kubeconfig context to use") + rootCmd.Flags().BoolP("help", "h", false, "help for flux") + rootCmd.PersistentFlags().Bool("insecure-skip-tls-verify", false, "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure") + rootCmd.PersistentFlags().String("kubeconfig", "", "Path to the kubeconfig file to use for CLI requests.") + rootCmd.PersistentFlags().StringP("namespace", "n", "flux-system", "If present, the namespace scope for this CLI request") + rootCmd.PersistentFlags().String("server", "", "The address and port of the Kubernetes API server") + rootCmd.PersistentFlags().String("timeout", "", "timeout for this operation") + rootCmd.PersistentFlags().String("tls-server-name", "", "Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used") + rootCmd.PersistentFlags().String("token", "", "Bearer token for authentication to the API server") + rootCmd.PersistentFlags().String("user", "", "The name of the kubeconfig user to use") + rootCmd.PersistentFlags().Bool("verbose", false, "print generated objects") + rootCmd.Flags().BoolP("version", "v", false, "version for flux") +} diff --git a/completers/flux2_completer/cmd/suspend.go b/completers/flux2_completer/cmd/suspend.go new file mode 100644 index 0000000000..7ce38def24 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend.go @@ -0,0 +1,18 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspendCmd = &cobra.Command{ + Use: "suspend", + Short: "Suspend resources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspendCmd).Standalone() + suspendCmd.PersistentFlags().Bool("all", false, "suspend all resources in that namespace") + rootCmd.AddCommand(suspendCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_alert.go b/completers/flux2_completer/cmd/suspend_alert.go new file mode 100644 index 0000000000..887cd7225b --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_alert.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_alertCmd = &cobra.Command{ + Use: "alert", + Short: "Suspend reconciliation of Alert", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_alertCmd).Standalone() + suspendCmd.AddCommand(suspend_alertCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_helmrelease.go b/completers/flux2_completer/cmd/suspend_helmrelease.go new file mode 100644 index 0000000000..87f2ce3e21 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_helmrelease.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_helmreleaseCmd = &cobra.Command{ + Use: "helmrelease", + Short: "Suspend reconciliation of HelmRelease", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_helmreleaseCmd).Standalone() + suspendCmd.AddCommand(suspend_helmreleaseCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_image.go b/completers/flux2_completer/cmd/suspend_image.go new file mode 100644 index 0000000000..9217488eb7 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_image.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_imageCmd = &cobra.Command{ + Use: "image", + Short: "Suspend image automation objects", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_imageCmd).Standalone() + suspendCmd.AddCommand(suspend_imageCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_image_repository.go b/completers/flux2_completer/cmd/suspend_image_repository.go new file mode 100644 index 0000000000..c8ec4f45d1 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_image_repository.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_image_repositoryCmd = &cobra.Command{ + Use: "repository", + Short: "Suspend reconciliation of an ImageRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_image_repositoryCmd).Standalone() + suspend_imageCmd.AddCommand(suspend_image_repositoryCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_image_update.go b/completers/flux2_completer/cmd/suspend_image_update.go new file mode 100644 index 0000000000..b276b4f671 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_image_update.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_image_updateCmd = &cobra.Command{ + Use: "update", + Short: "Suspend reconciliation of an ImageUpdateAutomation", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_image_updateCmd).Standalone() + suspend_imageCmd.AddCommand(suspend_image_updateCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_kustomization.go b/completers/flux2_completer/cmd/suspend_kustomization.go new file mode 100644 index 0000000000..840ff9b0fb --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_kustomization.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Suspend reconciliation of Kustomization", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_kustomizationCmd).Standalone() + suspendCmd.AddCommand(suspend_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_receiver.go b/completers/flux2_completer/cmd/suspend_receiver.go new file mode 100644 index 0000000000..94a9ab7059 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_receiver.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_receiverCmd = &cobra.Command{ + Use: "receiver", + Short: "Suspend reconciliation of Receiver", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_receiverCmd).Standalone() + suspendCmd.AddCommand(suspend_receiverCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_source.go b/completers/flux2_completer/cmd/suspend_source.go new file mode 100644 index 0000000000..fad037752d --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_source.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_sourceCmd = &cobra.Command{ + Use: "source", + Short: "Suspend sources", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_sourceCmd).Standalone() + suspendCmd.AddCommand(suspend_sourceCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_source_bucket.go b/completers/flux2_completer/cmd/suspend_source_bucket.go new file mode 100644 index 0000000000..c5de692c94 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_source_bucket.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_source_bucketCmd = &cobra.Command{ + Use: "bucket", + Short: "Suspend reconciliation of a Bucket", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_source_bucketCmd).Standalone() + suspend_sourceCmd.AddCommand(suspend_source_bucketCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_source_chart.go b/completers/flux2_completer/cmd/suspend_source_chart.go new file mode 100644 index 0000000000..85c9f116a8 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_source_chart.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_source_chartCmd = &cobra.Command{ + Use: "chart", + Short: "Suspend reconciliation of a HelmChart", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_source_chartCmd).Standalone() + suspend_sourceCmd.AddCommand(suspend_source_chartCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_source_git.go b/completers/flux2_completer/cmd/suspend_source_git.go new file mode 100644 index 0000000000..f4c279cd88 --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_source_git.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_source_gitCmd = &cobra.Command{ + Use: "git", + Short: "Suspend reconciliation of a GitRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_source_gitCmd).Standalone() + suspend_sourceCmd.AddCommand(suspend_source_gitCmd) +} diff --git a/completers/flux2_completer/cmd/suspend_source_helm.go b/completers/flux2_completer/cmd/suspend_source_helm.go new file mode 100644 index 0000000000..a7f483b75d --- /dev/null +++ b/completers/flux2_completer/cmd/suspend_source_helm.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var suspend_source_helmCmd = &cobra.Command{ + Use: "helm", + Short: "Suspend reconciliation of a HelmRepository", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(suspend_source_helmCmd).Standalone() + suspend_sourceCmd.AddCommand(suspend_source_helmCmd) +} diff --git a/completers/flux2_completer/cmd/trace.go b/completers/flux2_completer/cmd/trace.go new file mode 100644 index 0000000000..921a8be340 --- /dev/null +++ b/completers/flux2_completer/cmd/trace.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var traceCmd = &cobra.Command{ + Use: "trace", + Short: "Trace in-cluster objects throughout the GitOps delivery pipeline", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(traceCmd).Standalone() + traceCmd.Flags().String("api-version", "", "the Kubernetes object API version, e.g. 'apps/v1'") + traceCmd.Flags().String("kind", "", "the Kubernetes object kind, e.g. Deployment'") + rootCmd.AddCommand(traceCmd) +} diff --git a/completers/flux2_completer/cmd/tree.go b/completers/flux2_completer/cmd/tree.go new file mode 100644 index 0000000000..fb3969e46a --- /dev/null +++ b/completers/flux2_completer/cmd/tree.go @@ -0,0 +1,17 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var treeCmd = &cobra.Command{ + Use: "tree", + Short: "Print the resources reconciled by Flux", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(treeCmd).Standalone() + rootCmd.AddCommand(treeCmd) +} diff --git a/completers/flux2_completer/cmd/tree_kustomization.go b/completers/flux2_completer/cmd/tree_kustomization.go new file mode 100644 index 0000000000..89ea2b2563 --- /dev/null +++ b/completers/flux2_completer/cmd/tree_kustomization.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var tree_kustomizationCmd = &cobra.Command{ + Use: "kustomization", + Short: "Print the resource inventory of a Kustomization", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(tree_kustomizationCmd).Standalone() + tree_kustomizationCmd.Flags().Bool("compact", false, "list Flux resources only.") + tree_kustomizationCmd.Flags().StringP("output", "o", "", "the format in which the tree should be printed. can be 'json' or 'yaml'") + treeCmd.AddCommand(tree_kustomizationCmd) +} diff --git a/completers/flux2_completer/cmd/uninstall.go b/completers/flux2_completer/cmd/uninstall.go new file mode 100644 index 0000000000..488a9be654 --- /dev/null +++ b/completers/flux2_completer/cmd/uninstall.go @@ -0,0 +1,20 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var uninstallCmd = &cobra.Command{ + Use: "uninstall", + Short: "Uninstall Flux and its custom resource definitions", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(uninstallCmd).Standalone() + uninstallCmd.Flags().Bool("dry-run", false, "only print the objects that would be deleted") + uninstallCmd.Flags().Bool("keep-namespace", false, "skip namespace deletion") + uninstallCmd.Flags().BoolP("silent", "s", false, "delete components without asking for confirmation") + rootCmd.AddCommand(uninstallCmd) +} diff --git a/completers/flux2_completer/cmd/version.go b/completers/flux2_completer/cmd/version.go new file mode 100644 index 0000000000..0e6b51d38f --- /dev/null +++ b/completers/flux2_completer/cmd/version.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "github.com/rsteube/carapace" + "github.com/spf13/cobra" +) + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the client and server-side components version information.", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func init() { + carapace.Gen(versionCmd).Standalone() + versionCmd.Flags().Bool("client", false, "print only client version") + versionCmd.Flags().StringP("output", "o", "yaml", "the format in which the information should be printed. can be 'json' or 'yaml'") + rootCmd.AddCommand(versionCmd) +} diff --git a/completers/flux2_completer/main.go b/completers/flux2_completer/main.go new file mode 100644 index 0000000000..acf289a137 --- /dev/null +++ b/completers/flux2_completer/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/rsteube/carapace-bin/completers/flux2_completer/cmd" + +func main() { + cmd.Execute() +}