Skip to content

feat: add support for commands in various exec routines#8406

Merged
agoose77 merged 1 commit into
2i2c-org:mainfrom
agoose77:feat-ctx-dev
May 27, 2026
Merged

feat: add support for commands in various exec routines#8406
agoose77 merged 1 commit into
2i2c-org:mainfrom
agoose77:feat-ctx-dev

Conversation

@agoose77

Copy link
Copy Markdown
Contributor

I regularly want to be able to do something in a pipeline against a 2i2c cluster, e.g. compute the size of the /home disk for disk resizing. This PR adds a standard mechanism (via typer.Context) to pass through commands to the shell spawned in a pod (a pattern we use frequently).

This can now be done using

deployer exec homes 2i2c-aws-us staging -- /bin/df /home

Tip

For posterity, I often use the deployment labeling to get a shell where I want it, e.g.

kubectl exec -it -n prod deployment/hub -- /bin/bash -l

"run",
"--rm", # Deletes the pod when the process completes, successfully or otherwise
"-it", # Give us a shell!
"--override-type",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I switched to JSON Patch here, because the pod merge was not behaving properly w.r.t args / command

@agoose77 agoose77 added the deployer:skip-deploy Skips deployment of anything (support, staging, prod) label May 27, 2026
@agoose77 agoose77 merged commit 3b3c2e7 into 2i2c-org:main May 27, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployer:skip-deploy Skips deployment of anything (support, staging, prod)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant