Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c9aec77
feat: Add uninstall demo/stack feature
xeniape Mar 12, 2026
d8476f3
Merge branch 'main' into feat/add-demo-stack-deletion
xeniape Mar 12, 2026
5b366b4
changelog, some fixes after merge, cargo clippy
xeniape Mar 12, 2026
d6dc693
pre-commit fixes
xeniape Mar 12, 2026
f80624a
pre-commit fix
xeniape Mar 12, 2026
1066138
regenerate-nix
xeniape Mar 12, 2026
73515e2
Merge branch 'main' into feat/add-demo-stack-deletion
xeniape Mar 23, 2026
0e0658f
adjustments after main merge
xeniape Mar 23, 2026
9f9b923
further uninstall adjustments
xeniape Mar 23, 2026
7da2228
small word fix
xeniape Mar 23, 2026
70fd483
cargo update
xeniape Mar 24, 2026
c187cff
add documentation
xeniape Mar 24, 2026
e71437a
delete namespace function
xeniape Mar 25, 2026
4d1ff73
use Label struct for label
xeniape Mar 25, 2026
6d0edef
rename function
xeniape Mar 25, 2026
2367a88
code readability
xeniape Mar 25, 2026
1a00526
reduce nesting
xeniape Mar 25, 2026
043f0f1
delete object refactoring
xeniape Mar 26, 2026
7dfe50e
small docs adjustment
xeniape Mar 26, 2026
d794c7e
Revert "small docs adjustment"
xeniape Mar 26, 2026
5574319
Update rust/stackablectl/src/cmds/demo.rs
xeniape Mar 26, 2026
1bc08a2
stackspec in uninstall refactoring
xeniape Mar 26, 2026
0f3cf7f
confirm dialog for canceling delete, refactor install confim dialog
xeniape Mar 26, 2026
506fbcf
function comment for helm uninstall
xeniape Mar 30, 2026
a6e2feb
rename variable
xeniape Mar 30, 2026
18e7f70
refactor namespace confirmation
xeniape Mar 30, 2026
ad7dd15
add stack parameter on demo uninstall
xeniape Mar 30, 2026
ba64478
Update rust/stackable-cockpit/src/utils/k8s/client.rs
xeniape Mar 30, 2026
a2fbb1c
import deref
xeniape Mar 30, 2026
cdbd185
refactor namespace assignment
xeniape Apr 1, 2026
73f231c
Merge branch 'main' into feat/add-demo-stack-deletion
xeniape Apr 1, 2026
30f6d96
refactor namespace deletion function
xeniape Apr 1, 2026
55eeceb
bump operator-rs and use deref on label key
xeniape Apr 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
325 changes: 187 additions & 138 deletions Cargo.lock

Large diffs are not rendered by default.

557 changes: 360 additions & 197 deletions Cargo.nix

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ clap = { version = "4.5", features = ["derive", "env"] }
clap_complete = "4.5"
clap_complete_nushell = "4.5"
comfy-table = { version = "7.1", features = ["custom_styling"] }
dialoguer = "0.12.0"
directories = "6.0"
dotenvy = "0.15"
either = "1.15.0"
futures = "0.3"
indexmap = { version = "2.2", features = ["serde"] }
indicatif = "0.18"
Expand All @@ -49,7 +51,7 @@ serde_json = "1.0"
serde_yaml = "0.9"
sha2 = "0.10"
snafu = { version = "0.9", features = ["futures"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", default-features = false, features = ["crds", "kube-ws"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.109.0", default-features = false, features = ["crds", "kube-ws"] }
tera = "1.20"
termion = "4.0"
tokio = { version = "1.38", features = ["rt-multi-thread", "macros", "fs", "process", "io-std"] }
Expand Down
14 changes: 7 additions & 7 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion docs/modules/stackablectl/pages/commands/demo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,31 @@ $ stackablectl stacklets list

== Uninstalling a Demo

Currently, there is no support for uninstalling a demo again. However, this functionality will come soon.
To uninstall a demo, you can run the following command, specifying the namespace the demo was installed in.

[source,console]
----
$ stackablectl demo uninstall trino-taxi-data -n <NAMESPACE>

----

[NOTE]
====
The uninstall command deletes the namespace the demo was installed in. Therefore it is not possible to uninstall demos in the `default` namespace.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be opt-in behaviour. Or rather, if we created the namespace, it gets deleted.

There could be existing namespaces that shouldn't be deleted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One such example is if we have the monitoring stack installed, and want to add and remove demos.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to #187 (comment) "Update after a discussion on 2025-11-26:" it was decided the first version provides no option to be less destructive. Not sure which meeting that was or if it makes sense to change the requirements now.

Copy link
Copy Markdown
Member Author

@xeniape xeniape Mar 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were also problems with deleting everything without deleting the namespace, see stackabletech/hdfs-operator#761 (comment). So maybe for the first version / MVP it is fine for now like this? But feel free to disagree

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left an idea below in how we could do it: #429 (comment)

But of course, if this implements what we agreed on, that's fine.
It does feel a little dangerous though.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree it feels dangerous, tried to avoid it at first but ran into the problems above, which unfortunately won't be solved by your idea I think. The manifests we would delete with that approach were also deleted with the help of the labels, so would be the same situation, unless I misunderstood something 😞

Another thing might be adding a confirmation dialogue like the one I added to the installation for the namespace. That it asks if the user really wants to uninstall since that would delete the namespace, and cancel the deletion otherwise.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0f3cf7f (this PR) Maybe this addresses your concern a bit, let me know what you think :)

====

[WARNING]
====
Currently, some resources deployed by the demo are either still lingering after the deletion process or need to be deleted before running the uninstall command.

* All demos
** MutatingWebhookConfiguration `restarter-sts-enricher.stackable.tech` is not deleted
* end-to-end-security, argo-cd-git-ops, hbase-hdfs-load-cycling-data, jupyterhub-pyspark-hdfs-anomaly-detection-taxi-data
** ClusterroleBinding `hdfs-clusterrolebinding-nodes` is not deleted
* argo-cd-git-ops
** Delete the ArgoCD Applications `airflow`, `airflow-postgres`, `minio`, and `sealed-secrets`
** Then you can delete the namespaces `stackable-airflow`, `minio`, and `sealed-secrets`
** Delete the ArgoCD ApplicationSet `stackable-operators` and wait for ArgoCD to delete the Applications of that ApplicationSet
** Only after deleting the above, run the `stackablectl demo uninstall` command, otherwise the deletion might get stuck
** `*.argoproj.io` CRDs and `sealedsecrets.bitnami.com` CRD are not deleted
====
36 changes: 36 additions & 0 deletions docs/modules/stackablectl/pages/commands/stack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,39 @@ Installed stack logging
Use "stackablectl operator installed" to display the installed operators
Use "stackablectl stacklet list" to display the installed stacklets
----

== Uninstalling a Stack

To uninstall a stack, you can run the following command, specifying the namespace the stack was installed in.

[source,console]
----
$ stackablectl stack uninstall logging -n <NAMESPACE>

----

[NOTE]
====
The uninstall command deletes the namespace the stack was installed in. Therefore it is not possible to uninstall stacks in the `default` namespace.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as my comment about demos.

====

[WARNING]
====
Currently, some resources deployed by the stack are either still lingering after the deletion process or need to be deleted before running the uninstall command.

* All stacks
** MutatingWebhookConfiguration `restarter-sts-enricher.stackable.tech` is not deleted
* argo-cd-git-ops, hdfs-hbase, jupyterhub-pyspark-hdfs
** ClusterroleBinding `hdfs-clusterrolebinding-nodes` is not deleted
* argo-cd-git-ops
** Delete the ArgoCD Applications `airflow`, `airflow-postgres`, `minio`, and `sealed-secrets`
** Then you can delete the namespaces `stackable-airflow`, `minio`, and `sealed-secrets`
** Delete the ArgoCD ApplicationSet `stackable-operators` and wait for ArgoCD to delete the Applications of that ApplicationSet
** Only after deleting the above, run the `stackablectl stack uninstall` command, otherwise the deletion might get stuck
** `*.argoproj.io` CRDs and `sealedsecrets.bitnami.com` CRD are not deleted
* monitoring
** `*.monitoring.coreos.com` CRDs are not deleted
* observability
** Delete OpenTelemetryCollector `otel-collector-grpc-external` and `otel-collector-grpc`
** Only after deleting the above, run the `stackablectl stack uninstall` command, otherwise the deletion might get stuck
====
9 changes: 5 additions & 4 deletions docs/modules/stackablectl/partials/commands/demo.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Interact with demos, which are end-to-end usage demonstrations of the Stackable
Usage: stackablectl demo [OPTIONS] <COMMAND>
Commands:
list List available demos
describe Print out detailed demo information
install Install a specific demo
help Print this message or the help of the given subcommand(s)
list List available demos
describe Print out detailed demo information
install Install a specific demo
uninstall Uninstall a specific stack. Caution: This will delete the provided stack namespace, the operators and provided operator namespace, and all Stackable CRDs
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Expand Down
9 changes: 5 additions & 4 deletions docs/modules/stackablectl/partials/commands/stack.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Interact with stacks, which are ready-to-use product combinations
Usage: stackablectl stack [OPTIONS] <COMMAND>
Commands:
list List available stacks
describe Describe a specific stack
install Install a specific stack
help Print this message or the help of the given subcommand(s)
list List available stacks
describe Describe a specific stack
install Install a specific stack
uninstall Uninstall a specific stack. Caution: This will delete the provided stack namespace, the operators and provided operator namespace, and all Stackable CRDs
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Expand Down
Loading
Loading