From 26e387a55059d4b5f59fcd0b757baf927c604b59 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Dec 2024 10:53:40 +0100 Subject: [PATCH 01/10] wip: Add release selection to demo command Also removes the unused --offline flag. Feel free to ignore that. --- .../stackablectl/partials/commands/cache.adoc | 3 - .../partials/commands/completions.adoc | 3 - .../stackablectl/partials/commands/demo.adoc | 4 +- .../partials/commands/experimental-debug.adoc | 3 - .../stackablectl/partials/commands/index.adoc | 3 - .../partials/commands/operator.adoc | 3 - .../partials/commands/release.adoc | 3 - .../stackablectl/partials/commands/stack.adoc | 3 - .../partials/commands/stacklet.adoc | 3 - extra/completions/_stackablectl | 37 +-------- extra/completions/stackablectl.bash | 82 +++++++++++-------- extra/completions/stackablectl.elv | 37 +-------- extra/completions/stackablectl.fish | 39 ++------- extra/completions/stackablectl.nu | 37 +-------- extra/man/stackablectl.1 | 5 +- rust/stackablectl/README.md | 3 - rust/stackablectl/src/cli/mod.rs | 23 ++---- rust/stackablectl/src/cmds/demo.rs | 36 +++++++- rust/stackablectl/src/constants.rs | 2 + rust/stackablectl/src/main.rs | 5 -- 20 files changed, 113 insertions(+), 221 deletions(-) diff --git a/docs/modules/stackablectl/partials/commands/cache.adoc b/docs/modules/stackablectl/partials/commands/cache.adoc index 7c3f98f1..7b99a00f 100644 --- a/docs/modules/stackablectl/partials/commands/cache.adoc +++ b/docs/modules/stackablectl/partials/commands/cache.adoc @@ -20,9 +20,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/completions.adoc b/docs/modules/stackablectl/partials/commands/completions.adoc index e660a79d..ab89cd08 100644 --- a/docs/modules/stackablectl/partials/commands/completions.adoc +++ b/docs/modules/stackablectl/partials/commands/completions.adoc @@ -23,9 +23,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/demo.adoc b/docs/modules/stackablectl/partials/commands/demo.adoc index cbd25a6c..521cc726 100644 --- a/docs/modules/stackablectl/partials/commands/demo.adoc +++ b/docs/modules/stackablectl/partials/commands/demo.adoc @@ -21,8 +21,8 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network + --release + Target a specific Stackable release -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/experimental-debug.adoc b/docs/modules/stackablectl/partials/commands/experimental-debug.adoc index 7da60f15..7b80020f 100644 --- a/docs/modules/stackablectl/partials/commands/experimental-debug.adoc +++ b/docs/modules/stackablectl/partials/commands/experimental-debug.adoc @@ -37,9 +37,6 @@ Options: Defaults to the image of the target container if not specified. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/index.adoc b/docs/modules/stackablectl/partials/commands/index.adoc index 9c30403d..e880f3c5 100644 --- a/docs/modules/stackablectl/partials/commands/index.adoc +++ b/docs/modules/stackablectl/partials/commands/index.adoc @@ -26,9 +26,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/operator.adoc b/docs/modules/stackablectl/partials/commands/operator.adoc index 585f43d3..f0d061a3 100644 --- a/docs/modules/stackablectl/partials/commands/operator.adoc +++ b/docs/modules/stackablectl/partials/commands/operator.adoc @@ -23,9 +23,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/release.adoc b/docs/modules/stackablectl/partials/commands/release.adoc index 00f190e7..7f36769f 100644 --- a/docs/modules/stackablectl/partials/commands/release.adoc +++ b/docs/modules/stackablectl/partials/commands/release.adoc @@ -22,9 +22,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/stack.adoc b/docs/modules/stackablectl/partials/commands/stack.adoc index 6b0282b1..42f1a8ac 100644 --- a/docs/modules/stackablectl/partials/commands/stack.adoc +++ b/docs/modules/stackablectl/partials/commands/stack.adoc @@ -21,9 +21,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/docs/modules/stackablectl/partials/commands/stacklet.adoc b/docs/modules/stackablectl/partials/commands/stacklet.adoc index 219f22b6..55a10aed 100644 --- a/docs/modules/stackablectl/partials/commands/stacklet.adoc +++ b/docs/modules/stackablectl/partials/commands/stacklet.adoc @@ -25,9 +25,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/extra/completions/_stackablectl b/extra/completions/_stackablectl index 8397bb6c..d78dcd60 100644 --- a/extra/completions/_stackablectl +++ b/extra/completions/_stackablectl @@ -27,7 +27,6 @@ _stackablectl() { '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -55,7 +54,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -92,7 +90,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -121,7 +118,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -152,7 +148,6 @@ minikube\:"Use a minikube cluster"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -176,7 +171,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -208,7 +202,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -273,7 +266,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -310,7 +302,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -339,7 +330,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -374,7 +364,6 @@ minikube\:"Use a minikube cluster"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -398,7 +387,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -460,7 +448,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -497,7 +484,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -526,7 +512,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -563,7 +548,6 @@ minikube\:"Use a minikube cluster"))' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--skip-release[Skip the installation of the release during the stack install process]' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -621,7 +605,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -653,7 +636,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -689,7 +671,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -730,6 +711,7 @@ esac ;; (demo) _arguments "${_arguments_options[@]}" : \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -742,7 +724,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -767,6 +748,7 @@ yaml\:"Print output formatted as YAML"))' \ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -779,7 +761,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -796,6 +777,7 @@ yaml\:"Print output formatted as YAML"))' \ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -808,7 +790,6 @@ yaml\:"Print output formatted as YAML"))' \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -832,6 +813,7 @@ minikube\:"Use a minikube cluster"))' \ '-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: ' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -845,7 +827,6 @@ minikube\:"Use a minikube cluster"))' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--skip-release[Skip the installation of the release during the stack install process]' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -903,7 +884,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -932,7 +912,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -953,7 +932,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -974,7 +952,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -995,7 +972,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -1016,7 +992,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -1081,7 +1056,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -1110,7 +1084,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -1133,7 +1106,6 @@ _arguments "${_arguments_options[@]}" : \ '--old[Only remove outdated files in the cache]' \ '--outdated[Only remove outdated files in the cache]' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ @@ -1191,7 +1163,6 @@ _arguments "${_arguments_options[@]}" : \ '--helm-repo-test=[Provide a custom Helm test repository URL]:URL:_urls' \ '--helm-repo-dev=[Provide a custom Helm dev repository URL]:URL:_urls' \ '--no-cache[Do not cache the remote (default) demo, stack and release files]' \ -'--offline[Do not request any remote files via the network]' \ '-h[Print help (see more with '\''--help'\'')]' \ '--help[Print help (see more with '\''--help'\'')]' \ '-V[Print version]' \ diff --git a/extra/completions/stackablectl.bash b/extra/completions/stackablectl.bash index 9b44a4da..6b0c1005 100644 --- a/extra/completions/stackablectl.bash +++ b/extra/completions/stackablectl.bash @@ -331,7 +331,7 @@ _stackablectl() { case "${cmd}" in stackablectl) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version operator release stack stacklet demo completions cache experimental-debug help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version operator release stack stacklet demo completions cache experimental-debug help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -455,7 +455,7 @@ _stackablectl() { return 0 ;; stackablectl__cache) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list clean help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list clean help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -579,7 +579,7 @@ _stackablectl() { return 0 ;; stackablectl__cache__clean) - opts="-l -d -s -r -h -V --outdated --old --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --outdated --old --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -759,7 +759,7 @@ _stackablectl() { return 0 ;; stackablectl__cache__list) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -883,7 +883,7 @@ _stackablectl() { return 0 ;; stackablectl__completions) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version bash elvish fish nushell zsh help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version bash elvish fish nushell zsh help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1007,7 +1007,7 @@ _stackablectl() { return 0 ;; stackablectl__completions__bash) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1131,7 +1131,7 @@ _stackablectl() { return 0 ;; stackablectl__completions__elvish) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1255,7 +1255,7 @@ _stackablectl() { return 0 ;; stackablectl__completions__fish) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1477,7 +1477,7 @@ _stackablectl() { return 0 ;; stackablectl__completions__nushell) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1601,7 +1601,7 @@ _stackablectl() { return 0 ;; stackablectl__completions__zsh) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1725,12 +1725,16 @@ _stackablectl() { return 0 ;; stackablectl__demo) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" + opts="-l -d -s -r -h -V --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -1849,7 +1853,7 @@ _stackablectl() { return 0 ;; stackablectl__demo__describe) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-o -l -d -s -r -h -V --output --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -1863,6 +1867,10 @@ _stackablectl() { COMPREPLY=($(compgen -W "plain table json yaml" -- "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -2051,7 +2059,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 --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --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 --product-namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2105,6 +2113,10 @@ _stackablectl() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -2223,7 +2235,7 @@ _stackablectl() { return 0 ;; stackablectl__demo__list) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2237,6 +2249,10 @@ _stackablectl() { COMPREPLY=($(compgen -W "plain table json yaml" -- "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -2355,7 +2371,7 @@ _stackablectl() { return 0 ;; stackablectl__experimental__debug) - opts="-n -c -l -d -s -r -h -V --namespace --container --image --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version [CMD]..." + opts="-n -c -l -d -s -r -h -V --namespace --container --image --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version [CMD]..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -2975,7 +2991,7 @@ _stackablectl() { return 0 ;; stackablectl__operator) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install uninstall installed help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install uninstall installed help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3099,7 +3115,7 @@ _stackablectl() { return 0 ;; stackablectl__operator__describe) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3329,7 +3345,7 @@ _stackablectl() { return 0 ;; stackablectl__operator__install) - opts="-c -l -d -s -r -h -V --operator-ns --operator-namespace --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version ..." + opts="-c -l -d -s -r -h -V --operator-ns --operator-namespace --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version ..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3481,7 +3497,7 @@ _stackablectl() { return 0 ;; stackablectl__operator__installed) - opts="-o -l -d -s -r -h -V --output --operator-ns --operator-namespace --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --operator-ns --operator-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3621,7 +3637,7 @@ _stackablectl() { return 0 ;; stackablectl__operator__list) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3753,7 +3769,7 @@ _stackablectl() { return 0 ;; stackablectl__operator__uninstall) - opts="-l -d -s -r -h -V --operator-ns --operator-namespace --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version ..." + opts="-l -d -s -r -h -V --operator-ns --operator-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version ..." if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -3885,7 +3901,7 @@ _stackablectl() { return 0 ;; stackablectl__release) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install uninstall help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install uninstall help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4009,7 +4025,7 @@ _stackablectl() { return 0 ;; stackablectl__release__describe) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4225,7 +4241,7 @@ _stackablectl() { return 0 ;; stackablectl__release__install) - opts="-i -e -c -l -d -s -r -h -V --include --exclude --operator-ns --operator-namespace --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-i -e -c -l -d -s -r -h -V --include --exclude --operator-ns --operator-namespace --cluster --cluster-name --cluster-nodes --cluster-cp-nodes --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4393,7 +4409,7 @@ _stackablectl() { return 0 ;; stackablectl__release__list) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4525,7 +4541,7 @@ _stackablectl() { return 0 ;; stackablectl__release__uninstall) - opts="-l -d -s -r -h -V --operator-ns --operator-namespace --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-l -d -s -r -h -V --operator-ns --operator-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4657,7 +4673,7 @@ _stackablectl() { return 0 ;; stackablectl__stack) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4781,7 +4797,7 @@ _stackablectl() { return 0 ;; stackablectl__stack__describe) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4983,7 +4999,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 --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --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 --product-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5155,7 +5171,7 @@ _stackablectl() { return 0 ;; stackablectl__stack__list) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5287,7 +5303,7 @@ _stackablectl() { return 0 ;; stackablectl__stacklet) - opts="-l -d -s -r -h -V --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version credentials list help" + opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version credentials list help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5411,7 +5427,7 @@ _stackablectl() { return 0 ;; stackablectl__stacklet__credentials) - opts="-n -l -d -s -r -h -V --product-ns --product-namespace --log-level --no-cache --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-n -l -d -s -r -h -V --product-ns --product-namespace --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5603,7 +5619,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 --offline --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + 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 --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/extra/completions/stackablectl.elv b/extra/completions/stackablectl.elv index ecc11445..e105d2d9 100644 --- a/extra/completions/stackablectl.elv +++ b/extra/completions/stackablectl.elv @@ -30,7 +30,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -58,7 +57,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -85,7 +83,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -106,7 +103,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -132,7 +128,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -153,7 +148,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -176,7 +170,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -215,7 +208,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -241,7 +233,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -262,7 +253,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -292,7 +282,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -313,7 +302,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -349,7 +337,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -374,7 +361,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -395,7 +381,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -427,7 +412,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --skip-release 'Skip the installation of the release during the stack install process' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -460,7 +444,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -485,7 +468,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -511,7 +493,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -529,6 +510,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;stacklet;help;help'= { } &'stackablectl;demo'= { + cand --release 'Target a specific Stackable release' 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)' @@ -541,7 +523,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -554,6 +535,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;demo;list'= { cand -o 'o' cand --output 'output' + cand --release 'Target a specific Stackable release' 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)' @@ -566,7 +548,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -575,6 +556,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;demo;describe'= { cand -o 'o' cand --output 'output' + cand --release 'Target a specific Stackable release' 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)' @@ -587,7 +569,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -606,6 +587,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| 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 --release 'Target a specific Stackable release' 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)' @@ -619,7 +601,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --skip-release 'Skip the installation of the release during the stack install process' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -652,7 +633,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -677,7 +657,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -696,7 +675,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -715,7 +693,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -734,7 +711,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -753,7 +729,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -792,7 +767,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -814,7 +788,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -835,7 +808,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --old 'Only remove outdated files in the cache' cand --outdated 'Only remove outdated files in the cache' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' @@ -870,7 +842,6 @@ set edit:completion:arg-completer[stackablectl] = {|@words| cand --helm-repo-test 'Provide a custom Helm test repository URL' cand --helm-repo-dev 'Provide a custom Helm dev repository URL' cand --no-cache 'Do not cache the remote (default) demo, stack and release files' - cand --offline 'Do not request any remote files via the network' cand -h 'Print help (see more with ''--help'')' cand --help 'Print help (see more with ''--help'')' cand -V 'Print version' diff --git a/extra/completions/stackablectl.fish b/extra/completions/stackablectl.fish index c0887c8f..606fd9ea 100644 --- a/extra/completions/stackablectl.fish +++ b/extra/completions/stackablectl.fish @@ -1,6 +1,6 @@ # Print an optspec for argparse to handle cmd's options that are independent of any subcommand. function __fish_stackablectl_global_optspecs - string join \n l/log-level= no-cache offline d/demo-file= s/stack-file= r/release-file= helm-repo-stable= helm-repo-test= helm-repo-dev= h/help V/version + string join \n l/log-level= no-cache d/demo-file= s/stack-file= r/release-file= helm-repo-stable= helm-repo-test= helm-repo-dev= h/help V/version end function __fish_stackablectl_needs_command @@ -32,7 +32,6 @@ complete -c stackablectl -n "__fish_stackablectl_needs_command" -l helm-repo-sta complete -c stackablectl -n "__fish_stackablectl_needs_command" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_needs_command" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_needs_command" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_needs_command" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_needs_command" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_needs_command" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_needs_command" -f -a "operator" -d 'Interact with single operator instead of the full platform' @@ -52,7 +51,6 @@ 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" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and not __fish_seen_subcommand_from list describe install uninstall installed help" -f -a "list" -d 'List available operators' @@ -70,7 +68,6 @@ 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" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' 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'}" @@ -82,7 +79,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from describe" -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 describe" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l operator-namespace -l operator-ns -d 'Namespace in the cluster used to deploy the operators' -r @@ -98,7 +94,6 @@ 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 helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from install" -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 install" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -l operator-namespace -l operator-ns -d 'Namespace in the cluster used to deploy the operators' -r @@ -110,7 +105,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from uninstall" -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 uninstall" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -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'}" @@ -123,7 +117,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from installed" -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 installed" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand operator; and __fish_seen_subcommand_from help" -f -a "list" -d 'List available operators' @@ -140,7 +133,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and n complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and not __fish_seen_subcommand_from list describe install uninstall help" -f -a "list" -d 'List available releases' @@ -157,7 +149,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and _ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from list" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; 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 release; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; 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'}" @@ -169,7 +160,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and _ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from describe" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s i -l include -d 'Whitelist of product operators to install' -r @@ -187,7 +177,6 @@ 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 helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from install" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -l operator-namespace -l operator-ns -d 'Namespace in the cluster used to deploy the operators' -r @@ -199,7 +188,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and _ complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from uninstall" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from help" -f -a "list" -d 'List available releases' @@ -215,7 +203,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -f -a "list" -d 'List available stacks' @@ -231,7 +218,6 @@ 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 list" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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 stack; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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'}" @@ -243,7 +229,6 @@ 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 describe" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from describe" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from describe" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from describe" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from describe" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from describe" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l stack-parameters -d 'List of parameters to use when installing the stack' -r @@ -263,7 +248,6 @@ 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 helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l skip-release -d 'Skip the installation of the release during the stack install process' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from help" -f -a "list" -d 'List available stacks' @@ -278,7 +262,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and not __fish_seen_subcommand_from credentials list help" -f -a "credentials" -d 'Display credentials for a stacklet' @@ -293,7 +276,6 @@ 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" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from credentials" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from credentials" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from credentials" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from credentials" -s h -l help -d 'Print help (see more with \'--help\')' 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'}" @@ -307,12 +289,12 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from list" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; 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 stacklet; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from help" -f -a "credentials" -d 'Display credentials for a stacklet' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from help" -f -a "list" -d 'List deployed stacklets' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stacklet; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -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 demo; and not __fish_seen_subcommand_from list describe install help" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -321,7 +303,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -f -a "list" -d 'List available demos' @@ -329,6 +310,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -f -a "install" -d 'Install a specific demo' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and not __fish_seen_subcommand_from list describe install help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; 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 demo; and __fish_seen_subcommand_from list" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; 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 demo; 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 demo; and __fish_seen_subcommand_from list" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -337,10 +319,10 @@ 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 list" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; 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 demo; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; 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 demo; and __fish_seen_subcommand_from describe" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; 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 demo; 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 demo; and __fish_seen_subcommand_from describe" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -349,7 +331,6 @@ 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 describe" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from describe" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from describe" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from describe" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from describe" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from describe" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l stack-parameters -d 'List of parameters to use when installing the stack' -r @@ -360,6 +341,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 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 complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -369,7 +351,6 @@ 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 helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l skip-release -d 'Skip the installation of the release during the stack install process' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from install" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand demo; and __fish_seen_subcommand_from help" -f -a "list" -d 'List available demos' @@ -384,7 +365,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and not __fish_seen_subcommand_from bash elvish fish nushell zsh help" -f -a "bash" -d 'Generate shell completions for Bash' @@ -401,7 +381,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from bash" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -s l -l log-level -d 'Log level this application uses' -r @@ -412,7 +391,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from elvish" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -s l -l log-level -d 'Log level this application uses' -r @@ -423,7 +401,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from fish" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -s l -l log-level -d 'Log level this application uses' -r @@ -434,7 +411,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from nushell" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -s l -l log-level -d 'Log level this application uses' -r @@ -445,7 +421,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; a complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from zsh" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand completions; and __fish_seen_subcommand_from help" -f -a "bash" -d 'Generate shell completions for Bash' @@ -462,7 +437,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and not __fish_seen_subcommand_from list clean help" -f -a "list" -d 'List cached files' @@ -476,7 +450,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from list" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from list" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from list" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from list" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; 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 cache; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -s l -l log-level -d 'Log level this application uses' -r @@ -488,7 +461,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -l old -l outdated -d 'Only remove outdated files in the cache' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from clean" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand cache; and __fish_seen_subcommand_from help" -f -a "list" -d 'List cached files' @@ -505,7 +477,6 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-d complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -l helm-repo-test -d 'Provide a custom Helm test repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -l helm-repo-dev -d 'Provide a custom Helm dev repository URL' -r -f complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -l no-cache -d 'Do not cache the remote (default) demo, stack and release files' -complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -l offline -d 'Do not request any remote files via the network' complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand experimental-debug" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand help; and not __fish_seen_subcommand_from operator release stack stacklet demo completions cache experimental-debug help" -f -a "operator" -d 'Interact with single operator instead of the full platform' diff --git a/extra/completions/stackablectl.nu b/extra/completions/stackablectl.nu index 2c29c765..068794bb 100644 --- a/extra/completions/stackablectl.nu +++ b/extra/completions/stackablectl.nu @@ -4,7 +4,6 @@ module completions { export extern stackablectl [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -19,7 +18,6 @@ module completions { export extern "stackablectl operator" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -39,7 +37,6 @@ module completions { --output(-o): string@"nu-complete stackablectl operator list output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -60,7 +57,6 @@ module completions { --output(-o): string@"nu-complete stackablectl operator describe output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -86,7 +82,6 @@ module completions { --cluster-cp-nodes: string # Number of control plane nodes in the local cluster --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -104,7 +99,6 @@ module completions { --operator-ns: string # Namespace in the cluster used to deploy the operators --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -126,7 +120,6 @@ module completions { --operator-ns: string # Namespace in the cluster used to deploy the operators --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -169,7 +162,6 @@ module completions { export extern "stackablectl release" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -189,7 +181,6 @@ module completions { --output(-o): string@"nu-complete stackablectl release list output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -210,7 +201,6 @@ module completions { --output(-o): string@"nu-complete stackablectl release describe output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -238,7 +228,6 @@ module completions { --cluster-cp-nodes: string # Number of control plane nodes in the local cluster --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -256,7 +245,6 @@ module completions { --operator-ns: string # Namespace in the cluster used to deploy the operators --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -295,7 +283,6 @@ module completions { export extern "stackablectl stack" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -315,7 +302,6 @@ module completions { --output(-o): string@"nu-complete stackablectl stack list output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -336,7 +322,6 @@ module completions { --output(-o): string@"nu-complete stackablectl stack describe output_type" --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -367,7 +352,6 @@ module completions { --product-ns: string # Namespace where the products (e.g. 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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -402,7 +386,6 @@ module completions { export extern "stackablectl stacklet" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -421,7 +404,6 @@ module completions { --product-ns: string # Namespace in the cluster used to deploy the products --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -445,7 +427,6 @@ module completions { --product-ns: string # Namespace where the products (e.g. 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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -474,9 +455,9 @@ module completions { # Interact with demos, which are end-to-end usage demonstrations of the Stackable data platform export extern "stackablectl demo" [ + --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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -494,9 +475,9 @@ module completions { # List available demos export extern "stackablectl demo list" [ --output(-o): string@"nu-complete stackablectl demo list output_type" + --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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -515,9 +496,9 @@ module completions { export extern "stackablectl demo describe" [ DEMO: string # Demo to describe --output(-o): string@"nu-complete stackablectl demo describe output_type" + --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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -546,9 +527,9 @@ module completions { --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 + --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 - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -583,7 +564,6 @@ module completions { export extern "stackablectl completions" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -598,7 +578,6 @@ module completions { export extern "stackablectl completions bash" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -613,7 +592,6 @@ module completions { export extern "stackablectl completions elvish" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -628,7 +606,6 @@ module completions { export extern "stackablectl completions fish" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -643,7 +620,6 @@ module completions { export extern "stackablectl completions nushell" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -658,7 +634,6 @@ module completions { export extern "stackablectl completions zsh" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -701,7 +676,6 @@ module completions { export extern "stackablectl cache" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -716,7 +690,6 @@ module completions { export extern "stackablectl cache list" [ --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -733,7 +706,6 @@ module completions { --outdated # Only remove outdated files in the cache --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) @@ -769,7 +741,6 @@ module completions { ...cmd: string # The command to run in the debug container --log-level(-l): string # Log level this application uses --no-cache # Do not cache the remote (default) demo, stack and release files - --offline # Do not request any remote files via the network --demo-file(-d): string # Provide one or more additional (custom) demo file(s) --stack-file(-s): string # Provide one or more additional (custom) stack file(s) --release-file(-r): string # Provide one or more additional (custom) release file(s) diff --git a/extra/man/stackablectl.1 b/extra/man/stackablectl.1 index a13e46b0..afe74cf1 100644 --- a/extra/man/stackablectl.1 +++ b/extra/man/stackablectl.1 @@ -4,7 +4,7 @@ .SH NAME stackablectl \- Command line tool to interact with the Stackable Data Platform .SH SYNOPSIS -\fBstackablectl\fR [\fB\-l\fR|\fB\-\-log\-level\fR] [\fB\-\-no\-cache\fR] [\fB\-\-offline\fR] [\fB\-d\fR|\fB\-\-demo\-file\fR] [\fB\-s\fR|\fB\-\-stack\-file\fR] [\fB\-r\fR|\fB\-\-release\-file\fR] [\fB\-\-helm\-repo\-stable\fR] [\fB\-\-helm\-repo\-test\fR] [\fB\-\-helm\-repo\-dev\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] <\fIsubcommands\fR> +\fBstackablectl\fR [\fB\-l\fR|\fB\-\-log\-level\fR] [\fB\-\-no\-cache\fR] [\fB\-d\fR|\fB\-\-demo\-file\fR] [\fB\-s\fR|\fB\-\-stack\-file\fR] [\fB\-r\fR|\fB\-\-release\-file\fR] [\fB\-\-helm\-repo\-stable\fR] [\fB\-\-helm\-repo\-test\fR] [\fB\-\-helm\-repo\-dev\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] <\fIsubcommands\fR> .SH DESCRIPTION Command line tool to interact with the Stackable Data Platform .SH OPTIONS @@ -18,9 +18,6 @@ Do not cache the remote (default) demo, stack and release files Cached files are saved at \*(Aq$XDG_CACHE_HOME/stackablectl\*(Aq, which is usually \*(Aq$HOME/.cache/stackablectl\*(Aq when not explicitly set. .TP -\fB\-\-offline\fR -Do not request any remote files via the network -.TP \fB\-d\fR, \fB\-\-demo\-file\fR=\fIDEMO_FILE\fR Provide one or more additional (custom) demo file(s) diff --git a/rust/stackablectl/README.md b/rust/stackablectl/README.md index 57ebe7b2..70cbf740 100644 --- a/rust/stackablectl/README.md +++ b/rust/stackablectl/README.md @@ -35,9 +35,6 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. - --offline - Do not request any remote files via the network - -h, --help Print help (see a summary with '-h') diff --git a/rust/stackablectl/src/cli/mod.rs b/rust/stackablectl/src/cli/mod.rs index 268e1a1c..3a2429a5 100644 --- a/rust/stackablectl/src/cli/mod.rs +++ b/rust/stackablectl/src/cli/mod.rs @@ -8,18 +8,17 @@ use tracing::{debug, instrument, Level}; use stackable_cockpit::{ constants::{HELM_REPO_NAME_DEV, HELM_REPO_NAME_STABLE, HELM_REPO_NAME_TEST}, helm, - platform::demo::List, utils::path::{ IntoPathOrUrl, IntoPathsOrUrls, ParsePathsOrUrls, PathOrUrl, PathOrUrlParseError, }, - xfer::{cache::Settings, Client}, + xfer::cache::Settings, }; use crate::{ args::{CommonFileArgs, CommonRepoArgs}, cmds::{cache, completions, debug, demo, operator, release, stack, stacklet}, constants::{ - ENV_KEY_DEMO_FILES, ENV_KEY_RELEASE_FILES, ENV_KEY_STACK_FILES, REMOTE_DEMO_FILE, + DEMOS_REPOSITORY_URL_BASE, ENV_KEY_DEMO_FILES, ENV_KEY_RELEASE_FILES, ENV_KEY_STACK_FILES, REMOTE_RELEASE_FILE, REMOTE_STACK_FILE, USER_DIR_APPLICATION_NAME, USER_DIR_ORGANIZATION_NAME, USER_DIR_QUALIFIER, }, @@ -74,10 +73,6 @@ Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually )] pub no_cache: bool, - /// Do not request any remote files via the network - #[arg(long, global = true)] - pub offline: bool, - #[command(flatten)] pub files: CommonFileArgs, @@ -92,8 +87,13 @@ impl Cli { /// Returns a list of demo files, consisting of entries which are either a path or URL. The list of files combines /// the default demo file URL, [`REMOTE_DEMO_FILE`], files provided by the ENV variable [`ENV_KEY_DEMO_FILES`], and /// lastly, files provided by the CLI argument `--demo-file`. - pub fn get_demo_files(&self) -> Result, PathOrUrlParseError> { - let mut files = get_files(REMOTE_DEMO_FILE, ENV_KEY_DEMO_FILES)?; + pub fn get_demo_files(&self, branch: &str) -> Result, PathOrUrlParseError> { + let branch_url = format!( + "{base}/{branch}/demos/demos-v2.yaml", + base = DEMOS_REPOSITORY_URL_BASE + ); + + let mut files = get_files(&branch_url, ENV_KEY_DEMO_FILES)?; let arg_files = self.files.demo_files.clone().into_paths_or_urls()?; files.extend(arg_files); @@ -101,11 +101,6 @@ impl Cli { Ok(files) } - pub async fn get_demo_list(&self, transfer_client: &Client) -> List { - let files = self.get_demo_files().unwrap(); - List::build(&files, transfer_client).await.unwrap() - } - /// Returns a list of stack files, consisting of entries which are either a path or URL. The list of files combines /// the default stack file URL, [`REMOTE_STACK_FILE`], files provided by the ENV variable [`ENV_KEY_STACK_FILES`], /// and lastly, files provided by the CLI argument `--stack-file`. diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index 023a6b5a..23ae47c5 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Row, Table, }; -use snafu::{ResultExt, Snafu}; +use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -30,6 +30,10 @@ use crate::{ pub struct DemoArgs { #[command(subcommand)] subcommand: DemoCommands, + + /// Target a specific Stackable release + #[arg(long, global = true)] + release: Option, } #[derive(Debug, Subcommand)] @@ -126,6 +130,12 @@ pub enum CmdError { #[snafu(display("no stack with name '{name}'"))] NoSuchStack { name: String }, + #[snafu(display("no release with name '{name}'"))] + NoSuchRelease { name: String }, + + #[snafu(display("empty release list"))] + EmptyReleaseList, + #[snafu(display("failed to build demo/stack/release list"))] BuildList { source: list::Error }, @@ -155,11 +165,31 @@ impl DemoArgs { let transfer_client = xfer::Client::new_with(cache); + let release_files = cli.get_release_files().context(PathOrUrlParseSnafu)?; + let release_list = release::ReleaseList::build(&release_files, &transfer_client) + .await + .context(BuildListSnafu)?; + + let release_branch = match &self.release { + Some(release) => format!("release-{release}"), + None => { + let release = release_list + .inner() + .first() + .context(EmptyReleaseListSnafu)? + .0; + + format!("release-{release}") + } + }; + // Build demo list based on the (default) remote demo file, and additional files provided by the // STACKABLE_DEMO_FILES env variable or the --demo-files CLI argument. - let files = cli.get_demo_files().context(PathOrUrlParseSnafu)?; + let demo_files = cli + .get_demo_files(&release_branch) + .context(PathOrUrlParseSnafu)?; - let list = demo::List::build(&files, &transfer_client) + let list = demo::List::build(&demo_files, &transfer_client) .await .context(BuildListSnafu)?; diff --git a/rust/stackablectl/src/constants.rs b/rust/stackablectl/src/constants.rs index d14175aa..4c87c383 100644 --- a/rust/stackablectl/src/constants.rs +++ b/rust/stackablectl/src/constants.rs @@ -2,6 +2,8 @@ pub const ENV_KEY_RELEASE_FILES: &str = "STACKABLE_RELEASE_FILES"; pub const ENV_KEY_STACK_FILES: &str = "STACKABLE_STACK_FILES"; pub const ENV_KEY_DEMO_FILES: &str = "STACKABLE_DEMO_FILES"; +pub const DEMOS_REPOSITORY_URL_BASE: &str = "https://raw.githubusercontent.com/stackabletech/demos"; + pub const REMOTE_DEMO_FILE: &str = "https://raw.githubusercontent.com/stackabletech/demos/main/demos/demos-v2.yaml"; diff --git a/rust/stackablectl/src/main.rs b/rust/stackablectl/src/main.rs index 013cc80f..ddd820b8 100644 --- a/rust/stackablectl/src/main.rs +++ b/rust/stackablectl/src/main.rs @@ -11,11 +11,6 @@ async fn main() -> Result<(), Error> { // Parse the CLI args and commands let app = Cli::parse(); - // Catch if --offline is used for now - if app.offline { - todo!() - } - // Construct the tracing subscriber let format = fmt::format() .with_ansi(true) From e7243f2461eb4e608c97b117f9c60765202c26b0 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Thu, 5 Dec 2024 15:15:35 +0100 Subject: [PATCH 02/10] add --release arg to stacks --- rust/stackablectl/src/cli/mod.rs | 13 +++++++--- rust/stackablectl/src/cmds/demo.rs | 17 ++++++++++--- rust/stackablectl/src/cmds/stack.rs | 38 +++++++++++++++++++++++++++-- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/rust/stackablectl/src/cli/mod.rs b/rust/stackablectl/src/cli/mod.rs index 3a2429a5..26ce624f 100644 --- a/rust/stackablectl/src/cli/mod.rs +++ b/rust/stackablectl/src/cli/mod.rs @@ -19,8 +19,8 @@ use crate::{ cmds::{cache, completions, debug, demo, operator, release, stack, stacklet}, constants::{ DEMOS_REPOSITORY_URL_BASE, ENV_KEY_DEMO_FILES, ENV_KEY_RELEASE_FILES, ENV_KEY_STACK_FILES, - REMOTE_RELEASE_FILE, REMOTE_STACK_FILE, USER_DIR_APPLICATION_NAME, - USER_DIR_ORGANIZATION_NAME, USER_DIR_QUALIFIER, + REMOTE_RELEASE_FILE, USER_DIR_APPLICATION_NAME, USER_DIR_ORGANIZATION_NAME, + USER_DIR_QUALIFIER, }, output::{ErrorContext, Output, ResultContext}, }; @@ -104,8 +104,13 @@ impl Cli { /// Returns a list of stack files, consisting of entries which are either a path or URL. The list of files combines /// the default stack file URL, [`REMOTE_STACK_FILE`], files provided by the ENV variable [`ENV_KEY_STACK_FILES`], /// and lastly, files provided by the CLI argument `--stack-file`. - pub fn get_stack_files(&self) -> Result, PathOrUrlParseError> { - let mut files = get_files(REMOTE_STACK_FILE, ENV_KEY_STACK_FILES)?; + pub fn get_stack_files(&self, branch: &str) -> Result, PathOrUrlParseError> { + let branch_url = format!( + "{base}/{branch}/stacks/stacks-v2.yaml", + base = DEMOS_REPOSITORY_URL_BASE + ); + + let mut files = get_files(&branch_url, ENV_KEY_STACK_FILES)?; let arg_files = self.files.stack_files.clone().into_paths_or_urls()?; files.extend(arg_files); diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index 23ae47c5..af005597 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -171,7 +171,13 @@ impl DemoArgs { .context(BuildListSnafu)?; let release_branch = match &self.release { - Some(release) => format!("release-{release}"), + Some(release) => { + if release == "dev" { + "main".to_string() + } else { + format!("release-{release}") + } + } None => { let release = release_list .inner() @@ -196,7 +202,9 @@ impl DemoArgs { match &self.subcommand { DemoCommands::List(args) => list_cmd(args, cli, list).await, DemoCommands::Describe(args) => describe_cmd(args, cli, list).await, - DemoCommands::Install(args) => install_cmd(args, cli, list, &transfer_client).await, + DemoCommands::Install(args) => { + install_cmd(args, cli, list, &transfer_client, &release_branch).await + } } } } @@ -308,6 +316,7 @@ async fn install_cmd( cli: &Cli, list: demo::List, transfer_client: &xfer::Client, + release_branch: &str, ) -> Result { info!("Installing demo {}", args.demo_name); @@ -319,7 +328,9 @@ async fn install_cmd( })?; // TODO (Techassi): Try to move all this boilerplate code to build the lists out of here - let files = cli.get_stack_files().context(PathOrUrlParseSnafu)?; + let files = cli + .get_stack_files(release_branch) + .context(PathOrUrlParseSnafu)?; let stack_list = stack::StackList::build(&files, transfer_client) .await .context(BuildListSnafu)?; diff --git a/rust/stackablectl/src/cmds/stack.rs b/rust/stackablectl/src/cmds/stack.rs index 0f659261..1c6954b0 100644 --- a/rust/stackablectl/src/cmds/stack.rs +++ b/rust/stackablectl/src/cmds/stack.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Table, }; -use snafu::{ResultExt, Snafu}; +use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -30,6 +30,10 @@ use crate::{ pub struct StackArgs { #[command(subcommand)] subcommand: StackCommands, + + /// Target a specific Stackable release + #[arg(long, global = true)] + release: Option, } #[derive(Debug, Subcommand)] @@ -116,6 +120,9 @@ pub enum CmdError { #[snafu(display("failed to serialize JSON output"))] SerializeJsonOutput { source: serde_json::Error }, + #[snafu(display("empty release list"))] + EmptyReleaseList, + #[snafu(display("failed to build stack/release list"))] BuildList { source: list::Error }, @@ -140,7 +147,34 @@ impl StackArgs { debug!("Handle stack args"); let transfer_client = xfer::Client::new_with(cache); - let files = cli.get_stack_files().context(PathOrUrlParseSnafu)?; + + let release_files = cli.get_release_files().context(PathOrUrlParseSnafu)?; + let release_list = release::ReleaseList::build(&release_files, &transfer_client) + .await + .context(BuildListSnafu)?; + + let release_branch = match &self.release { + Some(release) => { + if release == "dev" { + "main".to_string() + } else { + format!("release-{release}") + } + } + None => { + let release = release_list + .inner() + .first() + .context(EmptyReleaseListSnafu)? + .0; + + format!("release-{release}") + } + }; + + let files = cli + .get_stack_files(&release_branch) + .context(PathOrUrlParseSnafu)?; let stack_list = stack::StackList::build(&files, &transfer_client) .await .context(BuildListSnafu)?; From 1a0e0415167c0ff90f89ea10ed612ddb466f031a Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Fri, 6 Dec 2024 11:37:04 +0100 Subject: [PATCH 03/10] Update rust/stackablectl/src/cmds/demo.rs Co-authored-by: Techassi --- rust/stackablectl/src/cmds/demo.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index af005597..337369d6 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -318,7 +318,7 @@ async fn install_cmd( transfer_client: &xfer::Client, release_branch: &str, ) -> Result { - info!("Installing demo {}", args.demo_name); + info!(%release_branch, "Installing demo {}", args.demo_name); // Init result output and progress output let mut output = cli.result(); From e6f73ca38855eef7e53b2cf7a0031882d5c20065 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Fri, 6 Dec 2024 17:24:54 +0100 Subject: [PATCH 04/10] refactor 'latest_release' and address PR feedback --- Cargo.lock | 1 + Cargo.nix | 4 ++++ .../stackablectl/partials/commands/stack.adoc | 3 +++ extra/completions/_stackablectl | 4 ++++ extra/completions/stackablectl.bash | 24 +++++++++++++++---- extra/completions/stackablectl.elv | 4 ++++ extra/completions/stackablectl.fish | 4 ++++ extra/completions/stackablectl.nu | 4 ++++ rust/stackable-cockpit/Cargo.toml | 1 + .../src/platform/release/spec.rs | 24 ++++++++++++++++++- rust/stackablectl/src/cli/mod.rs | 24 ++++++++++--------- rust/stackablectl/src/cmds/demo.rs | 18 +++++++------- rust/stackablectl/src/cmds/stack.rs | 19 +++++++-------- rust/stackablectl/src/constants.rs | 8 ++----- 14 files changed, 99 insertions(+), 43 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e35fbd0a..39b47022 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,6 +3036,7 @@ dependencies = [ "k8s-openapi", "kube", "rand", + "regex", "reqwest", "rstest", "semver", diff --git a/Cargo.nix b/Cargo.nix index c6aa1843..536f07ab 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -9668,6 +9668,10 @@ rec { name = "rand"; packageId = "rand"; } + { + name = "regex"; + packageId = "regex"; + } { name = "reqwest"; packageId = "reqwest"; diff --git a/docs/modules/stackablectl/partials/commands/stack.adoc b/docs/modules/stackablectl/partials/commands/stack.adoc index 42f1a8ac..8af1b466 100644 --- a/docs/modules/stackablectl/partials/commands/stack.adoc +++ b/docs/modules/stackablectl/partials/commands/stack.adoc @@ -21,6 +21,9 @@ Options: Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually '$HOME/.cache/stackablectl' when not explicitly set. + --release + Target a specific Stackable release + -h, --help Print help (see a summary with '-h') diff --git a/extra/completions/_stackablectl b/extra/completions/_stackablectl index d78dcd60..2786659a 100644 --- a/extra/completions/_stackablectl +++ b/extra/completions/_stackablectl @@ -436,6 +436,7 @@ esac ;; (stack) _arguments "${_arguments_options[@]}" : \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -472,6 +473,7 @@ yaml\:"Print output formatted as YAML"))' \ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -500,6 +502,7 @@ yaml\:"Print output formatted as YAML"))' \ table\:"Print output formatted as a table" json\:"Print output formatted as JSON" yaml\:"Print output formatted as YAML"))' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ @@ -535,6 +538,7 @@ minikube\:"Use a minikube cluster"))' \ '-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: ' \ +'--release=[Target a specific Stackable release]:RELEASE: ' \ '-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' \ diff --git a/extra/completions/stackablectl.bash b/extra/completions/stackablectl.bash index 6b0c1005..b218bb20 100644 --- a/extra/completions/stackablectl.bash +++ b/extra/completions/stackablectl.bash @@ -4673,12 +4673,16 @@ _stackablectl() { return 0 ;; stackablectl__stack) - opts="-l -d -s -r -h -V --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" + opts="-l -d -s -r -h -V --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version list describe install help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -4797,7 +4801,7 @@ _stackablectl() { return 0 ;; stackablectl__stack__describe) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " + opts="-o -l -d -s -r -h -V --output --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -4811,6 +4815,10 @@ _stackablectl() { COMPREPLY=($(compgen -W "plain table json yaml" -- "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -4999,7 +5007,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 --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --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 --product-namespace --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5053,6 +5061,10 @@ _stackablectl() { COMPREPLY=($(compgen -f "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 @@ -5171,7 +5183,7 @@ _stackablectl() { return 0 ;; stackablectl__stack__list) - opts="-o -l -d -s -r -h -V --output --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" + opts="-o -l -d -s -r -h -V --output --release --log-level --no-cache --demo-file --stack-file --release-file --helm-repo-stable --helm-repo-test --helm-repo-dev --help --version" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -5185,6 +5197,10 @@ _stackablectl() { COMPREPLY=($(compgen -W "plain table json yaml" -- "${cur}")) return 0 ;; + --release) + COMPREPLY=($(compgen -f "${cur}")) + return 0 + ;; --log-level) COMPREPLY=($(compgen -f "${cur}")) return 0 diff --git a/extra/completions/stackablectl.elv b/extra/completions/stackablectl.elv index e105d2d9..f237a783 100644 --- a/extra/completions/stackablectl.elv +++ b/extra/completions/stackablectl.elv @@ -325,6 +325,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;release;help;help'= { } &'stackablectl;stack'= { + cand --release 'Target a specific Stackable release' 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)' @@ -349,6 +350,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;stack;list'= { cand -o 'o' cand --output 'output' + cand --release 'Target a specific Stackable release' 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)' @@ -369,6 +371,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| &'stackablectl;stack;describe'= { cand -o 'o' cand --output 'output' + cand --release 'Target a specific Stackable release' 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)' @@ -399,6 +402,7 @@ set edit:completion:arg-completer[stackablectl] = {|@words| 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 --release 'Target a specific Stackable release' 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)' diff --git a/extra/completions/stackablectl.fish b/extra/completions/stackablectl.fish index 606fd9ea..99eb4781 100644 --- a/extra/completions/stackablectl.fish +++ b/extra/completions/stackablectl.fish @@ -195,6 +195,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 help" -f -a "install" -d 'Install a specific release' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from help" -f -a "uninstall" -d 'Uninstall a release' complete -c stackablectl -n "__fish_stackablectl_using_subcommand release; and __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' +complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -s l -l log-level -d 'Log level this application uses' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -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 stack; and not __fish_seen_subcommand_from list describe install help" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -210,6 +211,7 @@ complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -f -a "install" -d 'Install a specific stack' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and not __fish_seen_subcommand_from list describe install help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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 stack; and __fish_seen_subcommand_from list" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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 stack; 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 stack; and __fish_seen_subcommand_from list" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -221,6 +223,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 list" -s h -l help -d 'Print help (see more with \'--help\')' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from list" -s V -l version -d 'Print version' complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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 stack; and __fish_seen_subcommand_from describe" -l release -d 'Target a specific Stackable release' -r complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; 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 stack; 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 stack; and __fish_seen_subcommand_from describe" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F @@ -239,6 +242,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 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 complete -c stackablectl -n "__fish_stackablectl_using_subcommand stack; and __fish_seen_subcommand_from install" -s s -l stack-file -d 'Provide one or more additional (custom) stack file(s)' -r -F diff --git a/extra/completions/stackablectl.nu b/extra/completions/stackablectl.nu index 068794bb..02e9ef04 100644 --- a/extra/completions/stackablectl.nu +++ b/extra/completions/stackablectl.nu @@ -281,6 +281,7 @@ module completions { # Interact with stacks, which are ready-to-use product combinations export extern "stackablectl stack" [ + --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 --demo-file(-d): string # Provide one or more additional (custom) demo file(s) @@ -300,6 +301,7 @@ module completions { # List available stacks export extern "stackablectl stack list" [ --output(-o): string@"nu-complete stackablectl stack list output_type" + --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 --demo-file(-d): string # Provide one or more additional (custom) demo file(s) @@ -320,6 +322,7 @@ module completions { export extern "stackablectl stack describe" [ stack_name: string # Name of the stack to describe --output(-o): string@"nu-complete stackablectl stack describe output_type" + --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 --demo-file(-d): string # Provide one or more additional (custom) demo file(s) @@ -350,6 +353,7 @@ module completions { --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 + --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 --demo-file(-d): string # Provide one or more additional (custom) demo file(s) diff --git a/rust/stackable-cockpit/Cargo.toml b/rust/stackable-cockpit/Cargo.toml index 6a83a80d..b2beb804 100644 --- a/rust/stackable-cockpit/Cargo.toml +++ b/rust/stackable-cockpit/Cargo.toml @@ -20,6 +20,7 @@ indexmap.workspace = true k8s-openapi.workspace = true kube.workspace = true rand.workspace = true +regex.workspace = true reqwest.workspace = true semver.workspace = true serde_json.workspace = true diff --git a/rust/stackable-cockpit/src/platform/release/spec.rs b/rust/stackable-cockpit/src/platform/release/spec.rs index ec0199a4..22f5ce56 100644 --- a/rust/stackable-cockpit/src/platform/release/spec.rs +++ b/rust/stackable-cockpit/src/platform/release/spec.rs @@ -1,7 +1,8 @@ use futures::{StreamExt as _, TryStreamExt}; use indexmap::IndexMap; +use regex::Regex; use serde::{Deserialize, Serialize}; -use snafu::{ResultExt, Snafu}; +use snafu::{OptionExt, ResultExt, Snafu}; use tokio::task::JoinError; use tracing::{info, instrument}; @@ -16,6 +17,8 @@ use crate::{ }, }; +use super::ReleaseList; + type Result = std::result::Result; #[derive(Debug, Snafu)] @@ -31,6 +34,12 @@ pub enum Error { #[snafu(display("failed to launch background task"))] BackgroundTask { source: JoinError }, + + #[snafu(display("release list is empty"))] + EmptyReleaseList, + + #[snafu(display("latest release doesn't have expected format"))] + LatestReleaseFormat, } #[derive(Clone, Debug, Deserialize, Serialize)] @@ -119,3 +128,16 @@ impl ReleaseSpec { .collect() } } + +impl ReleaseList { + /// Retrieves the latest release from the list and applies a sanity check to the release format. + pub fn latest_release(&self) -> Result { + let release = self.inner().first().context(EmptyReleaseListSnafu)?.0; + let sanity_check = Regex::new("^[0-9]{2}.[0-9]{1,2}$").unwrap(); + if sanity_check.is_match(release) { + Ok(release.to_string()) + } else { + LatestReleaseFormatSnafu {}.fail() + } + } +} diff --git a/rust/stackablectl/src/cli/mod.rs b/rust/stackablectl/src/cli/mod.rs index 26ce624f..1f9ec1ef 100644 --- a/rust/stackablectl/src/cli/mod.rs +++ b/rust/stackablectl/src/cli/mod.rs @@ -18,9 +18,9 @@ use crate::{ args::{CommonFileArgs, CommonRepoArgs}, cmds::{cache, completions, debug, demo, operator, release, stack, stacklet}, constants::{ - DEMOS_REPOSITORY_URL_BASE, ENV_KEY_DEMO_FILES, ENV_KEY_RELEASE_FILES, ENV_KEY_STACK_FILES, - REMOTE_RELEASE_FILE, USER_DIR_APPLICATION_NAME, USER_DIR_ORGANIZATION_NAME, - USER_DIR_QUALIFIER, + DEMOS_REPOSITORY_DEMOS_SUBPATH, DEMOS_REPOSITORY_STACKS_SUBPATH, DEMOS_REPOSITORY_URL_BASE, + ENV_KEY_DEMO_FILES, ENV_KEY_RELEASE_FILES, ENV_KEY_STACK_FILES, REMOTE_RELEASE_FILE, + USER_DIR_APPLICATION_NAME, USER_DIR_ORGANIZATION_NAME, USER_DIR_QUALIFIER, }, output::{ErrorContext, Output, ResultContext}, }; @@ -85,12 +85,13 @@ Cached files are saved at '$XDG_CACHE_HOME/stackablectl', which is usually impl Cli { /// Returns a list of demo files, consisting of entries which are either a path or URL. The list of files combines - /// the default demo file URL, [`REMOTE_DEMO_FILE`], files provided by the ENV variable [`ENV_KEY_DEMO_FILES`], and - /// lastly, files provided by the CLI argument `--demo-file`. + /// the default demo file URL constructed from [`DEMOS_REPOSITORY_URL_BASE`] and the provided branch, files provided + /// by the ENV variable [`ENV_KEY_DEMO_FILES`], and lastly, files provided by the CLI argument `--demo-file`. pub fn get_demo_files(&self, branch: &str) -> Result, PathOrUrlParseError> { let branch_url = format!( - "{base}/{branch}/demos/demos-v2.yaml", - base = DEMOS_REPOSITORY_URL_BASE + "{base}/{branch}/{demos}", + base = DEMOS_REPOSITORY_URL_BASE, + demos = DEMOS_REPOSITORY_DEMOS_SUBPATH ); let mut files = get_files(&branch_url, ENV_KEY_DEMO_FILES)?; @@ -102,12 +103,13 @@ impl Cli { } /// Returns a list of stack files, consisting of entries which are either a path or URL. The list of files combines - /// the default stack file URL, [`REMOTE_STACK_FILE`], files provided by the ENV variable [`ENV_KEY_STACK_FILES`], - /// and lastly, files provided by the CLI argument `--stack-file`. + /// the default stack file URL constructed from [`DEMOS_REPOSITORY_URL_BASE`] and the provided branch, files provided + /// by the ENV variable [`ENV_KEY_STACK_FILES`], and lastly, files provided by the CLI argument `--stack-file`. pub fn get_stack_files(&self, branch: &str) -> Result, PathOrUrlParseError> { let branch_url = format!( - "{base}/{branch}/stacks/stacks-v2.yaml", - base = DEMOS_REPOSITORY_URL_BASE + "{base}/{branch}/{stacks}", + base = DEMOS_REPOSITORY_URL_BASE, + stacks = DEMOS_REPOSITORY_STACKS_SUBPATH ); let mut files = get_files(&branch_url, ENV_KEY_STACK_FILES)?; diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index 337369d6..83d85dc0 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Row, Table, }; -use snafu::{OptionExt, ResultExt, Snafu}; +use snafu::{ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -11,6 +11,7 @@ use stackable_cockpit::{ common::list, constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, platform::{ + self, demo::{self, DemoInstallParameters}, release, stack, }, @@ -133,8 +134,8 @@ pub enum CmdError { #[snafu(display("no release with name '{name}'"))] NoSuchRelease { name: String }, - #[snafu(display("empty release list"))] - EmptyReleaseList, + #[snafu(display("failed to get latest release"))] + LatestRelease { source: platform::release::Error }, #[snafu(display("failed to build demo/stack/release list"))] BuildList { source: list::Error }, @@ -179,13 +180,10 @@ impl DemoArgs { } } None => { - let release = release_list - .inner() - .first() - .context(EmptyReleaseListSnafu)? - .0; - - format!("release-{release}") + format!( + "release-{release}", + release = release_list.latest_release().context(LatestReleaseSnafu)? + ) } }; diff --git a/rust/stackablectl/src/cmds/stack.rs b/rust/stackablectl/src/cmds/stack.rs index 1c6954b0..af706ed3 100644 --- a/rust/stackablectl/src/cmds/stack.rs +++ b/rust/stackablectl/src/cmds/stack.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Table, }; -use snafu::{OptionExt, ResultExt, Snafu}; +use snafu::{ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -11,7 +11,7 @@ use stackable_cockpit::{ common::list, constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, platform::{ - release, + self, release, stack::{self, StackInstallParameters}, }, utils::{ @@ -120,8 +120,8 @@ pub enum CmdError { #[snafu(display("failed to serialize JSON output"))] SerializeJsonOutput { source: serde_json::Error }, - #[snafu(display("empty release list"))] - EmptyReleaseList, + #[snafu(display("failed to get latest release"))] + LatestRelease { source: platform::release::Error }, #[snafu(display("failed to build stack/release list"))] BuildList { source: list::Error }, @@ -162,13 +162,10 @@ impl StackArgs { } } None => { - let release = release_list - .inner() - .first() - .context(EmptyReleaseListSnafu)? - .0; - - format!("release-{release}") + format!( + "release-{release}", + release = release_list.latest_release().context(LatestReleaseSnafu)? + ) } }; diff --git a/rust/stackablectl/src/constants.rs b/rust/stackablectl/src/constants.rs index 4c87c383..ed812e3d 100644 --- a/rust/stackablectl/src/constants.rs +++ b/rust/stackablectl/src/constants.rs @@ -3,12 +3,8 @@ pub const ENV_KEY_STACK_FILES: &str = "STACKABLE_STACK_FILES"; pub const ENV_KEY_DEMO_FILES: &str = "STACKABLE_DEMO_FILES"; pub const DEMOS_REPOSITORY_URL_BASE: &str = "https://raw.githubusercontent.com/stackabletech/demos"; - -pub const REMOTE_DEMO_FILE: &str = - "https://raw.githubusercontent.com/stackabletech/demos/main/demos/demos-v2.yaml"; - -pub const REMOTE_STACK_FILE: &str = - "https://raw.githubusercontent.com/stackabletech/demos/main/stacks/stacks-v2.yaml"; +pub const DEMOS_REPOSITORY_DEMOS_SUBPATH: &str = "demos/demos-v2.yaml"; +pub const DEMOS_REPOSITORY_STACKS_SUBPATH: &str = "stacks/stacks-v2.yaml"; pub const REMOTE_RELEASE_FILE: &str = "https://raw.githubusercontent.com/stackabletech/release/main/releases.yaml"; From 967fce03d781bfd74fc3d2bad7d95ec7a46c97e7 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Fri, 6 Dec 2024 17:24:54 +0100 Subject: [PATCH 05/10] refactor 'latest_release' and address PR feedback --- rust/stackable-cockpit/src/platform/release/spec.rs | 5 +++++ rust/stackablectl/src/cmds/demo.rs | 3 +++ rust/stackablectl/src/cmds/stack.rs | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/rust/stackable-cockpit/src/platform/release/spec.rs b/rust/stackable-cockpit/src/platform/release/spec.rs index 22f5ce56..9b3dd250 100644 --- a/rust/stackable-cockpit/src/platform/release/spec.rs +++ b/rust/stackable-cockpit/src/platform/release/spec.rs @@ -130,6 +130,11 @@ impl ReleaseSpec { } impl ReleaseList { + /// Checks if a value provided in the '--release' argument is in the release list + pub fn contains(&self, release: &str) -> bool { + self.inner().contains_key(release) + } + /// Retrieves the latest release from the list and applies a sanity check to the release format. pub fn latest_release(&self) -> Result { let release = self.inner().first().context(EmptyReleaseListSnafu)?.0; diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index 83d85dc0..39a7609f 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -173,6 +173,9 @@ impl DemoArgs { let release_branch = match &self.release { Some(release) => { + if !release_list.contains(release) { + return NoSuchReleaseSnafu { name: release }.fail(); + } if release == "dev" { "main".to_string() } else { diff --git a/rust/stackablectl/src/cmds/stack.rs b/rust/stackablectl/src/cmds/stack.rs index af706ed3..2231dc95 100644 --- a/rust/stackablectl/src/cmds/stack.rs +++ b/rust/stackablectl/src/cmds/stack.rs @@ -120,6 +120,9 @@ pub enum CmdError { #[snafu(display("failed to serialize JSON output"))] SerializeJsonOutput { source: serde_json::Error }, + #[snafu(display("no release with name '{name}'"))] + NoSuchRelease { name: String }, + #[snafu(display("failed to get latest release"))] LatestRelease { source: platform::release::Error }, @@ -155,6 +158,9 @@ impl StackArgs { let release_branch = match &self.release { Some(release) => { + if !release_list.contains(release) { + return NoSuchReleaseSnafu { name: release }.fail(); + } if release == "dev" { "main".to_string() } else { From 8a3d9484c6669a925a9c7a18922170a2a47dec63 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Tue, 10 Dec 2024 09:10:31 +0100 Subject: [PATCH 06/10] add changelog entry --- rust/stackablectl/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index 2f0f0442..222efffc 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. - Add shell completions for Nushell and Elvish ([#337]). - SOCKS5 and HTTP proxy support ([#328]). +- Add new argument `--release` that allows installing a specific version of a demo or stack ([#340]). ### Fixed @@ -18,6 +19,7 @@ All notable changes to this project will be documented in this file. [#328]: https://github.com/stackabletech/stackable-cockpit/pull/328 [#336]: https://github.com/stackabletech/stackable-cockpit/pull/336 [#337]: https://github.com/stackabletech/stackable-cockpit/pull/337 +[#340]: https://github.com/stackabletech/stackable-cockpit/pull/340 ## [24.11.0] - 2024-11-18 From d2b16bb830e08e7d8b5a7b40498cef9a499a5809 Mon Sep 17 00:00:00 2001 From: Benedikt Labrenz Date: Tue, 10 Dec 2024 10:51:53 +0100 Subject: [PATCH 07/10] add changelog entry --- rust/stackablectl/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index 222efffc..64b3eb77 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -21,6 +21,10 @@ All notable changes to this project will be documented in this file. [#337]: https://github.com/stackabletech/stackable-cockpit/pull/337 [#340]: https://github.com/stackabletech/stackable-cockpit/pull/340 +### Removed + +- Remove argument `--offline` that was not implemented yet ([#340]). + ## [24.11.0] - 2024-11-18 ### Changed From a9bd54d1f04b5822b3d8f5e5ece4b1595e64c108 Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 18 Dec 2024 12:14:38 +0100 Subject: [PATCH 08/10] chore: Restructure changelog --- rust/stackablectl/CHANGELOG.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/rust/stackablectl/CHANGELOG.md b/rust/stackablectl/CHANGELOG.md index 64b3eb77..720507fc 100644 --- a/rust/stackablectl/CHANGELOG.md +++ b/rust/stackablectl/CHANGELOG.md @@ -4,13 +4,22 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added + +- Add new argument `--release` that allows installing a specific version of a demo or stack ([#340]). + +### Removed + +- Remove argument `--offline` that was not implemented yet ([#340]). + +[#340]: https://github.com/stackabletech/stackable-cockpit/pull/340 + ## [24.11.1] - 2024-11-20 ### Added - Add shell completions for Nushell and Elvish ([#337]). - SOCKS5 and HTTP proxy support ([#328]). -- Add new argument `--release` that allows installing a specific version of a demo or stack ([#340]). ### Fixed @@ -19,11 +28,6 @@ All notable changes to this project will be documented in this file. [#328]: https://github.com/stackabletech/stackable-cockpit/pull/328 [#336]: https://github.com/stackabletech/stackable-cockpit/pull/336 [#337]: https://github.com/stackabletech/stackable-cockpit/pull/337 -[#340]: https://github.com/stackabletech/stackable-cockpit/pull/340 - -### Removed - -- Remove argument `--offline` that was not implemented yet ([#340]). ## [24.11.0] - 2024-11-18 From 01915ed526d81ef956e1cd7792f82df0080d18f9 Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 18 Dec 2024 12:18:44 +0100 Subject: [PATCH 09/10] refactor: Simplify List type This add a Deref impl for the List type, which removed the need to call .inner() to retrieve the IndexMap. Instead IndexMap's methods can now be used by deref'ing. Also, the SpecIter trait now consumes self, which removes two superflous calls to .clone(). --- rust/stackable-cockpit/src/common/list.rs | 25 ++++++++-------- .../src/platform/demo/mod.rs | 4 +-- .../src/platform/release/mod.rs | 7 ++--- .../src/platform/release/spec.rs | 29 +------------------ .../src/platform/stack/mod.rs | 4 +-- rust/stackablectl/src/cmds/demo.rs | 29 +++++++++---------- rust/stackablectl/src/cmds/release.rs | 6 ++-- rust/stackablectl/src/cmds/stack.rs | 26 ++++++++--------- 8 files changed, 49 insertions(+), 81 deletions(-) diff --git a/rust/stackable-cockpit/src/common/list.rs b/rust/stackable-cockpit/src/common/list.rs index 62b269bd..66b721e4 100644 --- a/rust/stackable-cockpit/src/common/list.rs +++ b/rust/stackable-cockpit/src/common/list.rs @@ -1,4 +1,4 @@ -use std::marker::PhantomData; +use std::{marker::PhantomData, ops::Deref}; use indexmap::IndexMap; use serde::{Deserialize, Serialize}; @@ -18,7 +18,7 @@ pub enum Error { } pub trait SpecIter { - fn inner(&self) -> &IndexMap; + fn inner(self) -> IndexMap; } /// A [`List`] describes a list of specs. The list can contain any specs, for @@ -54,7 +54,7 @@ where .context(FileTransferSnafu)?; for (spec_name, spec) in specs.inner() { - map.insert(spec_name.clone(), spec.clone()); + map.insert(spec_name, spec); } } @@ -63,17 +63,16 @@ where inner: map, }) } +} - /// Returns a reference to the inner [`IndexMap`] - pub fn inner(&self) -> &IndexMap { - &self.inner - } +impl Deref for List +where + L: for<'a> Deserialize<'a> + Serialize + SpecIter, + S: for<'a> Deserialize<'a> + Serialize + Clone, +{ + type Target = IndexMap; - /// Returns an optional reference to a single spec of type `S` by `name` - pub fn get(&self, name: T) -> Option<&S> - where - T: AsRef, - { - self.inner.get(name.as_ref()) + fn deref(&self) -> &Self::Target { + &self.inner } } diff --git a/rust/stackable-cockpit/src/platform/demo/mod.rs b/rust/stackable-cockpit/src/platform/demo/mod.rs index 9bcd9548..2b745a48 100644 --- a/rust/stackable-cockpit/src/platform/demo/mod.rs +++ b/rust/stackable-cockpit/src/platform/demo/mod.rs @@ -18,8 +18,8 @@ pub struct DemosV2 { } impl SpecIter for DemosV2 { - fn inner(&self) -> &IndexMap { - &self.demos + fn inner(self) -> IndexMap { + self.demos } } diff --git a/rust/stackable-cockpit/src/platform/release/mod.rs b/rust/stackable-cockpit/src/platform/release/mod.rs index 318ec406..78ca0495 100644 --- a/rust/stackable-cockpit/src/platform/release/mod.rs +++ b/rust/stackable-cockpit/src/platform/release/mod.rs @@ -15,12 +15,9 @@ pub struct Releases { } impl SpecIter for Releases { - fn inner(&self) -> &IndexMap { - &self.releases + fn inner(self) -> IndexMap { + self.releases } } pub type ReleaseList = crate::common::list::List; - -#[derive(Default)] -pub struct Release {} diff --git a/rust/stackable-cockpit/src/platform/release/spec.rs b/rust/stackable-cockpit/src/platform/release/spec.rs index 9b3dd250..ec0199a4 100644 --- a/rust/stackable-cockpit/src/platform/release/spec.rs +++ b/rust/stackable-cockpit/src/platform/release/spec.rs @@ -1,8 +1,7 @@ use futures::{StreamExt as _, TryStreamExt}; use indexmap::IndexMap; -use regex::Regex; use serde::{Deserialize, Serialize}; -use snafu::{OptionExt, ResultExt, Snafu}; +use snafu::{ResultExt, Snafu}; use tokio::task::JoinError; use tracing::{info, instrument}; @@ -17,8 +16,6 @@ use crate::{ }, }; -use super::ReleaseList; - type Result = std::result::Result; #[derive(Debug, Snafu)] @@ -34,12 +31,6 @@ pub enum Error { #[snafu(display("failed to launch background task"))] BackgroundTask { source: JoinError }, - - #[snafu(display("release list is empty"))] - EmptyReleaseList, - - #[snafu(display("latest release doesn't have expected format"))] - LatestReleaseFormat, } #[derive(Clone, Debug, Deserialize, Serialize)] @@ -128,21 +119,3 @@ impl ReleaseSpec { .collect() } } - -impl ReleaseList { - /// Checks if a value provided in the '--release' argument is in the release list - pub fn contains(&self, release: &str) -> bool { - self.inner().contains_key(release) - } - - /// Retrieves the latest release from the list and applies a sanity check to the release format. - pub fn latest_release(&self) -> Result { - let release = self.inner().first().context(EmptyReleaseListSnafu)?.0; - let sanity_check = Regex::new("^[0-9]{2}.[0-9]{1,2}$").unwrap(); - if sanity_check.is_match(release) { - Ok(release.to_string()) - } else { - LatestReleaseFormatSnafu {}.fail() - } - } -} diff --git a/rust/stackable-cockpit/src/platform/stack/mod.rs b/rust/stackable-cockpit/src/platform/stack/mod.rs index 0c649c05..4883f3af 100644 --- a/rust/stackable-cockpit/src/platform/stack/mod.rs +++ b/rust/stackable-cockpit/src/platform/stack/mod.rs @@ -18,8 +18,8 @@ pub struct StacksV2 { } impl SpecIter for StacksV2 { - fn inner(&self) -> &IndexMap { - &self.stacks + fn inner(self) -> IndexMap { + self.stacks } } diff --git a/rust/stackablectl/src/cmds/demo.rs b/rust/stackablectl/src/cmds/demo.rs index 39a7609f..0fbb2b76 100644 --- a/rust/stackablectl/src/cmds/demo.rs +++ b/rust/stackablectl/src/cmds/demo.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Row, Table, }; -use snafu::{ResultExt, Snafu}; +use snafu::{ensure, OptionExt as _, ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -11,7 +11,6 @@ use stackable_cockpit::{ common::list, constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, platform::{ - self, demo::{self, DemoInstallParameters}, release, stack, }, @@ -131,11 +130,11 @@ pub enum CmdError { #[snafu(display("no stack with name '{name}'"))] NoSuchStack { name: String }, - #[snafu(display("no release with name '{name}'"))] - NoSuchRelease { name: String }, + #[snafu(display("no release '{release}'"))] + NoSuchRelease { release: String }, #[snafu(display("failed to get latest release"))] - LatestRelease { source: platform::release::Error }, + LatestRelease, #[snafu(display("failed to build demo/stack/release list"))] BuildList { source: list::Error }, @@ -173,9 +172,11 @@ impl DemoArgs { let release_branch = match &self.release { Some(release) => { - if !release_list.contains(release) { - return NoSuchReleaseSnafu { name: release }.fail(); - } + ensure!( + release_list.contains_key(release), + NoSuchReleaseSnafu { release } + ); + if release == "dev" { "main".to_string() } else { @@ -183,10 +184,8 @@ impl DemoArgs { } } None => { - format!( - "release-{release}", - release = release_list.latest_release().context(LatestReleaseSnafu)? - ) + let (release_name, _) = release_list.first().context(LatestReleaseSnafu)?; + format!("release-{release}", release = release_name,) } }; @@ -228,7 +227,7 @@ async fn list_cmd(args: &DemoListArgs, cli: &Cli, list: demo::List) -> Result Result serde_json::to_string(&list.inner()).context(SerializeJsonOutputSnafu), - OutputType::Yaml => serde_yaml::to_string(&list.inner()).context(SerializeYamlOutputSnafu), + OutputType::Json => serde_json::to_string(&*list).context(SerializeJsonOutputSnafu), + OutputType::Yaml => serde_yaml::to_string(&*list).context(SerializeYamlOutputSnafu), } } diff --git a/rust/stackablectl/src/cmds/release.rs b/rust/stackablectl/src/cmds/release.rs index 2b644f5a..5a22bfc6 100644 --- a/rust/stackablectl/src/cmds/release.rs +++ b/rust/stackablectl/src/cmds/release.rs @@ -138,7 +138,7 @@ impl ReleaseArgs { .await .context(BuildListSnafu)?; - if release_list.inner().is_empty() { + if release_list.is_empty() { return Ok("No releases".into()); } @@ -161,7 +161,7 @@ async fn list_cmd( match args.output_type { OutputType::Plain | OutputType::Table => { - if release_list.inner().is_empty() { + if release_list.is_empty() { return Ok("No releases".into()); } @@ -176,7 +176,7 @@ async fn list_cmd( .set_content_arrangement(arrangement) .load_preset(preset); - for (index, (release_name, release_spec)) in release_list.inner().iter().enumerate() { + for (index, (release_name, release_spec)) in release_list.iter().enumerate() { table.add_row(vec![ (index + 1).to_string(), release_name.to_string(), diff --git a/rust/stackablectl/src/cmds/stack.rs b/rust/stackablectl/src/cmds/stack.rs index 2231dc95..a2ca9423 100644 --- a/rust/stackablectl/src/cmds/stack.rs +++ b/rust/stackablectl/src/cmds/stack.rs @@ -3,7 +3,7 @@ use comfy_table::{ presets::{NOTHING, UTF8_FULL}, ContentArrangement, Table, }; -use snafu::{ResultExt, Snafu}; +use snafu::{ensure, OptionExt as _, ResultExt, Snafu}; use stackable_operator::kvp::{LabelError, Labels}; use tracing::{debug, info, instrument}; @@ -11,7 +11,7 @@ use stackable_cockpit::{ common::list, constants::{DEFAULT_OPERATOR_NAMESPACE, DEFAULT_PRODUCT_NAMESPACE}, platform::{ - self, release, + release, stack::{self, StackInstallParameters}, }, utils::{ @@ -120,11 +120,11 @@ pub enum CmdError { #[snafu(display("failed to serialize JSON output"))] SerializeJsonOutput { source: serde_json::Error }, - #[snafu(display("no release with name '{name}'"))] - NoSuchRelease { name: String }, + #[snafu(display("no release '{release}'"))] + NoSuchRelease { release: String }, #[snafu(display("failed to get latest release"))] - LatestRelease { source: platform::release::Error }, + LatestRelease, #[snafu(display("failed to build stack/release list"))] BuildList { source: list::Error }, @@ -158,9 +158,11 @@ impl StackArgs { let release_branch = match &self.release { Some(release) => { - if !release_list.contains(release) { - return NoSuchReleaseSnafu { name: release }.fail(); - } + ensure!( + release_list.contains_key(release), + NoSuchReleaseSnafu { release } + ); + if release == "dev" { "main".to_string() } else { @@ -168,10 +170,8 @@ impl StackArgs { } } None => { - format!( - "release-{release}", - release = release_list.latest_release().context(LatestReleaseSnafu)? - ) + let (release_name, _) = release_list.first().context(LatestReleaseSnafu)?; + format!("release-{release}", release = release_name,) } }; @@ -213,7 +213,7 @@ fn list_cmd( .set_content_arrangement(arrangement) .load_preset(preset); - for (index, (stack_name, stack)) in stack_list.inner().iter().enumerate() { + for (index, (stack_name, stack)) in stack_list.iter().enumerate() { table.add_row(vec![ (index + 1).to_string(), stack_name.clone(), From 0e419255fe86813c6b1e85abb607896b61a6ad8e Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 18 Dec 2024 12:21:12 +0100 Subject: [PATCH 10/10] chore: Remove unused regex dependency --- Cargo.lock | 1 - Cargo.nix | 4 ---- rust/stackable-cockpit/Cargo.toml | 1 - 3 files changed, 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39b47022..e35fbd0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,7 +3036,6 @@ dependencies = [ "k8s-openapi", "kube", "rand", - "regex", "reqwest", "rstest", "semver", diff --git a/Cargo.nix b/Cargo.nix index 536f07ab..c6aa1843 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -9668,10 +9668,6 @@ rec { name = "rand"; packageId = "rand"; } - { - name = "regex"; - packageId = "regex"; - } { name = "reqwest"; packageId = "reqwest"; diff --git a/rust/stackable-cockpit/Cargo.toml b/rust/stackable-cockpit/Cargo.toml index b2beb804..6a83a80d 100644 --- a/rust/stackable-cockpit/Cargo.toml +++ b/rust/stackable-cockpit/Cargo.toml @@ -20,7 +20,6 @@ indexmap.workspace = true k8s-openapi.workspace = true kube.workspace = true rand.workspace = true -regex.workspace = true reqwest.workspace = true semver.workspace = true serde_json.workspace = true