diff --git a/extra/completions/_stackablectl b/extra/completions/_stackablectl index bfbbbcec..5916ae54 100644 --- a/extra/completions/_stackablectl +++ b/extra/completions/_stackablectl @@ -79,7 +79,7 @@ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ '*-d+[Provide one or more additional (custom) demo file(s)]:DEMO_FILE:_files' \ @@ -109,7 +109,7 @@ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ '*-d+[Provide one or more additional (custom) demo file(s)]:DEMO_FILE:_files' \ @@ -141,7 +141,7 @@ minikube\:"Use a minikube cluster"))' \ '--cluster-nodes=[Number of total nodes in the local cluster]:CLUSTER_NODES: ' \ '--cluster-cp-nodes=[Number of control plane nodes in the local cluster]:CLUSTER_CP_NODES: ' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ '*-d+[Provide one or more additional (custom) demo file(s)]:DEMO_FILE:_files' \ @@ -359,7 +359,7 @@ minikube\:"Use a minikube cluster"))' \ '--cluster-nodes=[Number of total nodes in the local cluster]:CLUSTER_NODES: ' \ '--cluster-cp-nodes=[Number of control plane nodes in the local cluster]:CLUSTER_CP_NODES: ' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ '*-d+[Provide one or more additional (custom) demo file(s)]:DEMO_FILE:_files' \ @@ -547,7 +547,7 @@ minikube\:"Use a minikube cluster"))' \ '--product-namespace=[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ '--product-ns=[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '--release=[Target a specific Stackable release]:RELEASE: ' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ @@ -828,7 +828,7 @@ minikube\:"Use a minikube cluster"))' \ '--product-namespace=[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ '--product-ns=[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ '--chart-source=[]:CHART_SOURCE:((oci\:"OCI registry" -repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus may be operator-specific"))' \ +repo\:"Nexus repositories\: resolution (dev, test, stable) is based on the version and thus will be operator-specific"))' \ '--release=[Target a specific Stackable release]:RELEASE: ' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ diff --git a/extra/completions/stackablectl.fish b/extra/completions/stackablectl.fish index 44c6f027..32bf8056 100644 --- a/extra/completions/stackablectl.fish +++ b/extra/completions/stackablectl.fish @@ -60,7 +60,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -f -a "installed" -d 'List installed operators' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s o -l output -r -f -a "{plain\t'Print output formatted as plain text',table\t'Print output formatted as a table',json\t'Print output formatted as JSON',yaml\t'Print output formatted as YAML'}" -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -72,7 +72,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -s o -l output -r -f -a "{plain\t'Print output formatted as plain text',table\t'Print output formatted as a table',json\t'Print output formatted as JSON',yaml\t'Print output formatted as YAML'}" -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -88,7 +88,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l cluster-name -d 'Name of the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l cluster-nodes -d 'Number of total nodes in the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l cluster-cp-nodes -d 'Number of control plane nodes in the local cluster' -r -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -172,7 +172,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and _ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l cluster-name -d 'Name of the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l cluster-nodes -d 'Number of total nodes in the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l cluster-cp-nodes -d 'Number of control plane nodes in the local cluster' -r -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -246,7 +246,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l cluster-cp-nodes -d 'Number of control plane nodes in the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l operator-namespace -l operator-ns -d 'Namespace where the operators are deployed' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s n -l product-namespace -l product-ns -d 'Namespace where the products (e.g. stacks or demos) are deployed' -r -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F @@ -350,7 +350,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fi complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l cluster-cp-nodes -d 'Number of control plane nodes in the local cluster' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l operator-namespace -l operator-ns -d 'Namespace where the operators are deployed' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s n -l product-namespace -l product-ns -d 'Namespace where the products (e.g. stacks or demos) are deployed' -r -complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific'}" +complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l chart-source -r -f -a "{oci\t'OCI registry',repo\t'Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific'}" complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s d -l demo-file -d 'Provide one or more additional (custom) demo file(s)' -r -F diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index 720507fc..8b0001c6 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -7,12 +7,14 @@ All notable changes to this project will be documented in this file. ### Added - Add new argument `--release` that allows installing a specific version of a demo or stack ([#340]). +- Add new argument `--chart-source` so that operator charts can be pulled either from an OCI registry (the default) or from a Nexus repository ([#344]). ### Removed - Remove argument `--offline` that was not implemented yet ([#340]). [#340]: https://github.com/stackabletech/stackable-cockpit/pull/340 +[#344]: https://github.com/stackabletech/stackable-cockpit/pull/344 ## [24.11.1] - 2024-11-20 diff --git a/rust/stackablectl/src/cli/mod.rs b/rust/stackablectl/src/cli/mod.rs index 66388ef6..103d04b6 100644 --- a/rust/stackablectl/src/cli/mod.rs +++ b/rust/stackablectl/src/cli/mod.rs @@ -298,11 +298,16 @@ pub enum ChartSourceTypeArg { #[default] OCI, - /// Nexus repositories: resolution (dev, test, stable) is based on the version and thus may be operator-specific + /// Nexus repositories: resolution (dev, test, stable) is based on the version and thus will be operator-specific Repo, } impl From for ChartSourceType { + /// Resolves the enum used by clap/arg-resolution to the core type used in + /// stackable-cockpit. For the (Nexus-)repo case this core type cannot be + /// decorated with meaningful information as that would be operator-specific + /// i.e. we cannot resolve *which* Nexus repo to use until we have inspected + /// the operator version. Hence just a simple mapping. fn from(cli_enum: ChartSourceTypeArg) -> Self { match cli_enum { ChartSourceTypeArg::OCI => ChartSourceType::OCI,