diff --git a/extra/completions/_stackablectl b/extra/completions/_stackablectl index 77f090de..e8717fbd 100644 --- a/extra/completions/_stackablectl +++ b/extra/completions/_stackablectl @@ -565,9 +565,9 @@ minikube\:"Use a minikube cluster"))' \ '--cluster-cp-nodes=[Number of control plane nodes in the local cluster]:CLUSTER_CP_NODES: ' \ '--operator-namespace=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ '--operator-ns=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ -'-n+[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ -'--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: ' \ +'-n+[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--namespace=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--product-ns=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ '--release=[Target a specific Stackable release]:RELEASE: ' \ '-l+[Log level this application uses]:LOG_LEVEL: ' \ '--log-level=[Log level this application uses]:LOG_LEVEL: ' \ @@ -696,9 +696,9 @@ json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ '--operator-namespace=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ '--operator-ns=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ -'-n+[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ -'--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: ' \ +'-n+[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--namespace=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--product-ns=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ '-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' \ @@ -858,9 +858,9 @@ minikube\:"Use a minikube cluster"))' \ '--cluster-cp-nodes=[Number of control plane nodes in the local cluster]:CLUSTER_CP_NODES: ' \ '--operator-namespace=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ '--operator-ns=[Namespace where the operators are deployed]:OPERATOR_NAMESPACE: ' \ -'-n+[Namespace where the products (e.g. stacks or demos) are deployed]:PRODUCT_NAMESPACE: ' \ -'--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: ' \ +'-n+[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--namespace=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ +'--product-ns=[Namespace where the stacks or demos are deployed]:NAMESPACE: ' \ '--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.bash b/extra/completions/stackablectl.bash index 6e066ef2..5000e636 100644 --- a/extra/completions/stackablectl.bash +++ b/extra/completions/stackablectl.bash @@ -2107,7 +2107,7 @@ _stackablectl() { return 0 ;; stackablectl__demo__install) - opts="-c -n -l -d -s -r -h -V --skip-release --stack-parameters --parameters --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --operator-ns --operator-namespace --product-ns --product-namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version " + opts="-c -n -l -d -s -r -h -V --skip-release --stack-parameters --parameters --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --operator-ns --operator-namespace --product-ns --namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2149,7 +2149,7 @@ _stackablectl() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --product-namespace) + --namespace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -5119,7 +5119,7 @@ _stackablectl() { return 0 ;; stackablectl__stack__install) - opts="-c -n -l -d -s -r -h -V --skip-release --stack-parameters --parameters --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --operator-ns --operator-namespace --product-ns --product-namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version " + opts="-c -n -l -d -s -r -h -V --skip-release --stack-parameters --parameters --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --operator-ns --operator-namespace --product-ns --namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5161,7 +5161,7 @@ _stackablectl() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --product-namespace) + --namespace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; @@ -5763,7 +5763,7 @@ _stackablectl() { return 0 ;; stackablectl__stacklet__list) - opts="-o -n -l -d -s -r -h -V --output --operator-ns --operator-namespace --product-ns --product-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version" + opts="-o -n -l -d -s -r -h -V --output --operator-ns --operator-namespace --product-ns --namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --chart-source --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5785,7 +5785,7 @@ _stackablectl() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; - --product-namespace) + --namespace) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; diff --git a/extra/completions/stackablectl.elv b/extra/completions/stackablectl.elv index a15e2228..e4a5694b 100644 --- a/extra/completions/stackablectl.elv +++ b/extra/completions/stackablectl.elv @@ -414,9 +414,9 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --cluster-cp-nodes 'Number of control plane nodes in the local cluster' cand --operator-namespace 'Namespace where the operators are deployed' cand --operator-ns 'Namespace where the operators are deployed' - cand -n 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-namespace 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-ns 'Namespace where the products (e.g. stacks or demos) are deployed' + cand -n 'Namespace where the stacks or demos are deployed' + cand --namespace 'Namespace where the stacks or demos are deployed' + cand --product-ns 'Namespace where the stacks or demos are deployed' cand --release 'Target a specific Stackable release' cand -l 'Log level this application uses' cand --log-level 'Log level this application uses' @@ -500,9 +500,9 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --output 'output' cand --operator-namespace 'Namespace where the operators are deployed' cand --operator-ns 'Namespace where the operators are deployed' - cand -n 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-namespace 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-ns 'Namespace where the products (e.g. stacks or demos) are deployed' + cand -n 'Namespace where the stacks or demos are deployed' + cand --namespace 'Namespace where the stacks or demos are deployed' + cand --product-ns 'Namespace where the stacks or demos are deployed' cand -l 'Log level this application uses' cand --log-level 'Log level this application uses' cand -d 'Provide one or more additional (custom) demo file(s)' @@ -610,9 +610,9 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --cluster-cp-nodes 'Number of control plane nodes in the local cluster' cand --operator-namespace 'Namespace where the operators are deployed' cand --operator-ns 'Namespace where the operators are deployed' - cand -n 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-namespace 'Namespace where the products (e.g. stacks or demos) are deployed' - cand --product-ns 'Namespace where the products (e.g. stacks or demos) are deployed' + cand -n 'Namespace where the stacks or demos are deployed' + cand --namespace 'Namespace where the stacks or demos are deployed' + cand --product-ns 'Namespace where the stacks or demos are deployed' cand --release 'Target a specific Stackable release' cand -l 'Log level this application uses' cand --log-level 'Log level this application uses' diff --git a/extra/completions/stackablectl.fish b/extra/completions/stackablectl.fish index 12782682..79b9482f 100644 --- a/extra/completions/stackablectl.fish +++ b/extra/completions/stackablectl.fish @@ -256,7 +256,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-nodes -d 'Number of total nodes in the local cluster' -r 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" -s n -l namespace -l product-ns -d 'Namespace where the stacks or demos are deployed' -r 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 @@ -302,7 +302,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from credentials" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; 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 stacklet; and __fish_seen_subcommand_from list" -l operator-namespace -l operator-ns -d 'Namespace where the operators are deployed' -r -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from list" -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 stacklet; and __fish_seen_subcommand_from list" -s n -l namespace -l product-ns -d 'Namespace where the stacks or demos are deployed' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; 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 stacklet; 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 stacklet; and __fish_seen_subcommand_from list" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -366,7 +366,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-nodes -d 'Number of total nodes in the local cluster' -r 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" -s n -l namespace -l product-ns -d 'Namespace where the stacks or demos are deployed' -r 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/extra/completions/stackablectl.nu b/extra/completions/stackablectl.nu index 6b19ee18..5bb59dd6 100644 --- a/extra/completions/stackablectl.nu +++ b/extra/completions/stackablectl.nu @@ -430,8 +430,8 @@ module completions { --cluster-cp-nodes: string # Number of control plane nodes in the local cluster --operator-namespace: string # Namespace where the operators are deployed --operator-ns: string # Namespace where the operators are deployed - --product-namespace(-n): string # Namespace where the products (e.g. stacks or demos) are deployed - --product-ns: string # Namespace where the products (e.g. stacks or demos) are deployed + --namespace(-n): string # Namespace where the stacks or demos are deployed + --product-ns: string # Namespace where the stacks or demos are deployed --release: string # Target a specific Stackable release --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files @@ -521,8 +521,8 @@ module completions { --output(-o): string@"nu-complete stackablectl stacklet list output_type" --operator-namespace: string # Namespace where the operators are deployed --operator-ns: string # Namespace where the operators are deployed - --product-namespace(-n): string # Namespace where the products (e.g. stacks or demos) are deployed - --product-ns: string # Namespace where the products (e.g. stacks or demos) are deployed + --namespace(-n): string # Namespace where the stacks or demos are deployed + --product-ns: string # Namespace where the stacks or demos are deployed --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files --demo-file(-d): string # Provide one or more additional (custom) demo file(s) @@ -643,8 +643,8 @@ module completions { --cluster-cp-nodes: string # Number of control plane nodes in the local cluster --operator-namespace: string # Namespace where the operators are deployed --operator-ns: string # Namespace where the operators are deployed - --product-namespace(-n): string # Namespace where the products (e.g. stacks or demos) are deployed - --product-ns: string # Namespace where the products (e.g. stacks or demos) are deployed + --namespace(-n): string # Namespace where the stacks or demos are deployed + --product-ns: string # Namespace where the stacks or demos are deployed --release: string # Target a specific Stackable release --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files diff --git a/rust/stackable-cockpit/src/constants.rs b/rust/stackable-cockpit/src/constants.rs index 6f255eba..ea8cf228 100644 --- a/rust/stackable-cockpit/src/constants.rs +++ b/rust/stackable-cockpit/src/constants.rs @@ -8,7 +8,7 @@ pub const DEFAULT_OPERATOR_NAMESPACE: &str = "stackable-operators"; // Currently lots of demos can only run in the default namespace, so we have to // keep "default" here, until we switch the demos. We can't switch them right // now, as the old stackablectl would break. -pub const DEFAULT_PRODUCT_NAMESPACE: &str = "default"; +pub const DEFAULT_NAMESPACE: &str = "default"; pub const DEFAULT_LOCAL_CLUSTER_NAME: &str = "stackable-data-platform"; diff --git a/rust/stackable-cockpit/src/platform/demo/params.rs b/rust/stackable-cockpit/src/platform/demo/params.rs index b5f613fa..5cb337de 100644 --- a/rust/stackable-cockpit/src/platform/demo/params.rs +++ b/rust/stackable-cockpit/src/platform/demo/params.rs @@ -4,7 +4,7 @@ use crate::platform::operator::ChartSourceType; pub struct DemoInstallParameters { pub operator_namespace: String, - pub product_namespace: String, + pub demo_namespace: String, pub stack_parameters: Vec, pub parameters: Vec, diff --git a/rust/stackable-cockpit/src/platform/demo/spec.rs b/rust/stackable-cockpit/src/platform/demo/spec.rs index af464125..75847116 100644 --- a/rust/stackable-cockpit/src/platform/demo/spec.rs +++ b/rust/stackable-cockpit/src/platform/demo/spec.rs @@ -137,7 +137,7 @@ impl DemoSpec { #[instrument(skip_all, fields( stack_name = %self.stack, operator_namespace = %install_parameters.operator_namespace, - product_namespace = %install_parameters.product_namespace, + demo_namespace = %install_parameters.demo_namespace, ))] pub async fn install( &self, @@ -153,12 +153,12 @@ impl DemoSpec { })?; // Check demo prerequisites - self.check_prerequisites(client, &install_parameters.product_namespace) + self.check_prerequisites(client, &install_parameters.demo_namespace) .await?; let stack_install_parameters = StackInstallParameters { operator_namespace: install_parameters.operator_namespace.clone(), - product_namespace: install_parameters.product_namespace.clone(), + stack_namespace: install_parameters.demo_namespace.clone(), parameters: install_parameters.stack_parameters.clone(), labels: install_parameters.stack_labels.clone(), skip_release: install_parameters.skip_release, @@ -185,7 +185,7 @@ impl DemoSpec { #[instrument(skip_all, fields( stack_name = %self.stack, operator_namespace = %install_params.operator_namespace, - product_namespace = %install_params.product_namespace, + demo_namespace = %install_params.demo_namespace, ))] async fn prepare_manifests( &self, @@ -204,7 +204,7 @@ impl DemoSpec { Self::install_manifests( &self.manifests, ¶ms, - &install_params.product_namespace, + &install_params.demo_namespace, install_params.labels, client, transfer_client, diff --git a/rust/stackable-cockpit/src/platform/namespace.rs b/rust/stackable-cockpit/src/platform/namespace.rs index df29f404..21d007cf 100644 --- a/rust/stackable-cockpit/src/platform/namespace.rs +++ b/rust/stackable-cockpit/src/platform/namespace.rs @@ -13,6 +13,7 @@ pub enum Error { /// Creates a namespace with `name` if needed (not already present in the /// cluster). +// TODO (@NickLarsenNZ): Take a &str instead of String (to avoid all the cloning) pub async fn create_if_needed(client: &Client, name: String) -> Result<(), Error> { client .create_namespace_if_needed(name) diff --git a/rust/stackable-cockpit/src/platform/stack/params.rs b/rust/stackable-cockpit/src/platform/stack/params.rs index 9268409d..39eb12ed 100644 --- a/rust/stackable-cockpit/src/platform/stack/params.rs +++ b/rust/stackable-cockpit/src/platform/stack/params.rs @@ -8,7 +8,7 @@ pub struct StackInstallParameters { pub stack_name: String, pub operator_namespace: String, - pub product_namespace: String, + pub stack_namespace: String, pub parameters: Vec, pub skip_release: bool, diff --git a/rust/stackable-cockpit/src/platform/stack/spec.rs b/rust/stackable-cockpit/src/platform/stack/spec.rs index 3cd839fc..7e2c87e1 100644 --- a/rust/stackable-cockpit/src/platform/stack/spec.rs +++ b/rust/stackable-cockpit/src/platform/stack/spec.rs @@ -166,7 +166,7 @@ impl StackSpec { transfer_client: &xfer::Client, ) -> Result<(), Error> { // First, we check if the prerequisites are met - self.check_prerequisites(client, &install_parameters.product_namespace) + self.check_prerequisites(client, &install_parameters.stack_namespace) .await?; // Second, we install the release if not opted out @@ -180,17 +180,18 @@ impl StackSpec { self.install_release( release_list, &install_parameters.operator_namespace, - &install_parameters.product_namespace, + &install_parameters.stack_namespace, &install_parameters.chart_source, ) .await?; } // Next, create the product namespace if needed - namespace::create_if_needed(client, install_parameters.product_namespace.clone()) + // TODO (@NickLarsenNZ): Remove clones (update create_if_needed to take a &str) + namespace::create_if_needed(client, install_parameters.stack_namespace.clone()) .await .context(CreateNamespaceSnafu { - namespace: install_parameters.product_namespace.clone(), + namespace: install_parameters.stack_namespace.clone(), })?; // Finally install the stack manifests @@ -240,7 +241,7 @@ impl StackSpec { Self::install_manifests( &self.manifests, ¶meters, - &install_params.product_namespace, + &install_params.stack_namespace, install_params.labels, client, transfer_client, diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index 389d68ab..019f653e 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -4,10 +4,18 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Changed + +- Renamed `--product-namespace` argument to `--namespace` ([#373]). + - Kept `--product-namespace` as a hidden alias to be removed in a later release. + ### Fixed - Prefix `ui-http` port endpoints with `http://`, as e.g. used by hbase-operator ([#368]). +[#368]: https://github.com/stackabletech/stackable-cockpit/pull/368 +[#373]: https://github.com/stackabletech/stackable-cockpit/pull/373 + ## [25.3.0] - 2025-03-27 ### Fixed @@ -19,7 +27,6 @@ All notable changes to this project will be documented in this file. [#351]: https://github.com/stackabletech/stackable-cockpit/pull/351 [#364]: https://github.com/stackabletech/stackable-cockpit/pull/364 [#365]: https://github.com/stackabletech/stackable-cockpit/pull/365 -[#368]: https://github.com/stackabletech/stackable-cockpit/pull/368 ## [24.11.3] - 2025-01-27 diff --git a/rust/stackablectl/src/args/namespace.rs b/rust/stackablectl/src/args/namespace.rs index a86b9ec6..4dcb1cb0 100644 --- a/rust/stackablectl/src/args/namespace.rs +++ b/rust/stackablectl/src/args/namespace.rs @@ -1,5 +1,5 @@ use clap::Args; -use stackable_cockpit::constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}; +use stackable_cockpit::constants::{DEFAULT_NAMESPACE, DEFAULT_OPERATOR_NAMESPACE}; #[derive(Debug, Args)] #[command(next_help_heading = "Namespace options")] @@ -8,7 +8,7 @@ pub struct CommonNamespaceArgs { #[arg(long, global = true, visible_aliases(["operator-ns"]), default_value = DEFAULT_OPERATOR_NAMESPACE, long_help = "Namespace where the operators are deployed")] pub operator_namespace: String, - /// Namespace where the products (e.g. stacks or demos) are deployed - #[arg(short = 'n', long, global = true, visible_aliases(["product-ns"]), default_value = DEFAULT_PRODUCT_NAMESPACE, long_help = "Namespace where the products (e.g. stacks or demos) are deployed")] - pub product_namespace: String, + /// Namespace where the stacks or demos are deployed + #[arg(short = 'n', long, global = true, visible_aliases(["product-ns"]), aliases(["product-namespace"]), default_value = DEFAULT_NAMESPACE, long_help = "Namespace where the stacks or demos are deployed")] + pub namespace: String, } diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index b98ed723..39a0d151 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -9,7 +9,7 @@ use tracing::{debug, info, instrument}; use stackable_cockpit::{ common::list, - constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, + constants::{DEFAULT_NAMESPACE, DEFAULT_OPERATOR_NAMESPACE}, platform::{ demo::{self, DemoInstallParameters}, operator::ChartSourceType, @@ -373,7 +373,7 @@ async fn install_cmd( let install_parameters = DemoInstallParameters { operator_namespace: args.namespaces.operator_namespace.clone(), - product_namespace: args.namespaces.product_namespace.clone(), + demo_namespace: args.namespaces.namespace.clone(), stack_parameters: args.stack_parameters.clone(), parameters: args.parameters.clone(), skip_release: args.skip_release, @@ -408,8 +408,8 @@ async fn install_cmd( let stacklet_cmd = format!( "stackablectl stacklet list{}", - if args.namespaces.product_namespace != DEFAULT_PRODUCT_NAMESPACE { - format!(" --product-namespace {}", args.namespaces.product_namespace) + if args.namespaces.namespace != DEFAULT_NAMESPACE { + format!(" --namespace {}", args.namespaces.namespace) } else { "".into() } diff --git a/rust/stackablectl/src/cmds/stack.rs b/rust/stackablectl/src/cmds/stack.rs index 7f357c49..3e5149d2 100644 --- a/rust/stackablectl/src/cmds/stack.rs +++ b/rust/stackablectl/src/cmds/stack.rs @@ -9,7 +9,7 @@ use tracing::{debug, info, instrument}; use stackable_cockpit::{ common::list, - constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, + constants::{DEFAULT_NAMESPACE, DEFAULT_OPERATOR_NAMESPACE}, platform::{ operator::ChartSourceType, release, @@ -342,7 +342,7 @@ async fn install_cmd( let install_parameters = StackInstallParameters { operator_namespace: args.namespaces.operator_namespace.clone(), - product_namespace: args.namespaces.product_namespace.clone(), + stack_namespace: args.namespaces.namespace.clone(), stack_name: args.stack_name.clone(), parameters: args.parameters.clone(), skip_release: args.skip_release, @@ -372,8 +372,8 @@ async fn install_cmd( let stacklet_cmd = format!( "stackablectl stacklet list{}", - if args.namespaces.product_namespace != DEFAULT_PRODUCT_NAMESPACE { - format!(" --product-namespace {}", args.namespaces.product_namespace) + if args.namespaces.namespace != DEFAULT_NAMESPACE { + format!(" --namespace {}", args.namespaces.namespace) } else { "".into() } diff --git a/rust/stackablectl/src/cmds/stacklet.rs b/rust/stackablectl/src/cmds/stacklet.rs index 420d704f..eed7edcf 100644 --- a/rust/stackablectl/src/cmds/stacklet.rs +++ b/rust/stackablectl/src/cmds/stacklet.rs @@ -7,7 +7,7 @@ use snafu::{ResultExt, Snafu}; use tracing::{info, instrument}; use stackable_cockpit::{ - constants::DEFAULT_PRODUCT_NAMESPACE, + constants::DEFAULT_NAMESPACE, platform::stacklet::{self, get_credentials_for_product, list_stacklets}, utils::k8s::{self, Client, DisplayCondition}, }; @@ -47,7 +47,7 @@ pub struct StackletCredentialsArgs { long, short = 'n', global = true, - default_value = DEFAULT_PRODUCT_NAMESPACE, + default_value = DEFAULT_NAMESPACE, visible_aliases(["product-ns"]), long_help = "Namespace in the cluster used to deploy the products. Use this to select a different namespace for credential lookup.")] @@ -99,7 +99,7 @@ async fn list_cmd(args: &StackletListArgs, cli: &Cli) -> Result