Skip to content

Commit 3730ed3

Browse files
feat: Add experimental debug container command (#204)
* Basic ability to create and attach a debug container * Add support for copying env from a target container, as well as running a custom command * Send TTY window size * Read asynchronously from stdin * Default to the default namespace * Fix stdin not being re-registered correctly with the waker * Add debug error messages * Let AsyncStdin reset its state once shut down * Docs, demarcate as experimental * Move debug container name to span * Changelog * ci: use install-nix-action * fix(nix): add shebang to script (stackabletech/operator-templating#325) * Move dependencies into root Cargo.toml * Uglify formatting * Change the container prefix from sble-debug- to stackablectl-debug- * Default to the target container's image * Run debug container as root --------- Co-authored-by: Nick Larsen <nick.larsen@stackable.tech>
1 parent 499ac11 commit 3730ed3

File tree

13 files changed

+711
-35
lines changed

13 files changed

+711
-35
lines changed

Cargo.lock

Lines changed: 92 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@ k8s-openapi = { version = "0.20", default-features = false, features = [
3333
kube = { version = "0.87", default-features = false, features = [
3434
"client",
3535
"rustls-tls",
36+
"ws",
3637
] }
3738
lazy_static = "1.4"
39+
libc = "0.2.153"
3840
once_cell = "1.18"
3941
phf = "0.11"
4042
phf_codegen = "0.11"
@@ -49,14 +51,16 @@ serde = { version = "1.0", features = ["derive"] }
4951
serde_json = "1.0"
5052
serde_yaml = "0.9"
5153
sha2 = "0.10"
52-
snafu = "0.7"
54+
snafu = { version = "0.7", features = ["futures"] }
5355
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.64.0" }
5456
tera = "1.18"
57+
termion = "3.0.0"
5558
tokio = { version = "1.29.0", features = [
5659
"rt-multi-thread",
5760
"macros",
5861
"fs",
5962
"process",
63+
"io-std",
6064
] }
6165
tower-http = "0.4"
6266
tracing = "0.1"

docs/modules/stackablectl/partials/commands/index.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ Command line tool to interact with the Stackable Data Platform
66
Usage: stackablectl [OPTIONS] <COMMAND>
77
88
Commands:
9-
operator Interact with single operator instead of the full platform
10-
release Interact with all operators of the platform which are released together
11-
stack Interact with stacks, which are ready-to-use product combinations
12-
stacklet Interact with deployed stacklets, which are bundles of resources and containers required to run the product
13-
demo Interact with demos, which are end-to-end usage demonstrations of the Stackable data platform
14-
completions Generate shell completions for this tool
15-
cache Interact with locally cached files
16-
help Print this message or the help of the given subcommand(s)
9+
operator Interact with single operator instead of the full platform
10+
release Interact with all operators of the platform which are released together
11+
stack Interact with stacks, which are ready-to-use product combinations
12+
stacklet Interact with deployed stacklets, which are bundles of resources and containers required to run the product
13+
demo Interact with demos, which are end-to-end usage demonstrations of the Stackable data platform
14+
completions Generate shell completions for this tool
15+
cache Interact with locally cached files
16+
experimental-debug EXPERIMENTAL: Launch a debug container for a Pod
17+
help Print this message or the help of the given subcommand(s)
1718
1819
Options:
1920
-l, --log-level <LOG_LEVEL>

extra/completions/_stackablectl

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)