Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting a new image for a service #2628

Open
xavier-romero opened this issue Jan 14, 2025 · 3 comments
Open

Allow setting a new image for a service #2628

xavier-romero opened this issue Jan 14, 2025 · 3 comments
Labels
cli For bugs relating to the CLI feature request painful Painful bug

Comments

@xavier-romero
Copy link

Background & motivation

For testing upgrading versions of production environment I'd like to use Kurtosis to fully reproduce/document the procedure.
For this, I'd love to have the option to JUST change the docker image for a running service.

Desired behaviour

I'd love to be able to do something like this:
kurtosis service update enclave_name service_name --image whatever_docker_image:tag
So that just:

  • Stops and removes the docker
  • Recreates the service with the new image maintaining all existing config/properties/files/ports/etc.

Whatever impact it could have on the whole stack is under user responsability.

How important is this to you?

Painful; the lack of this feature makes using Kurtosis frictionful.

What area of the product does this pertain to?

CLI: the Command Line Interface

@github-actions github-actions bot added cli For bugs relating to the CLI painful Painful bug labels Jan 14, 2025
@samlaf
Copy link
Contributor

samlaf commented Feb 13, 2025

Belive kurtosis service add enclave_name SAME_SERVICE_NAME new_image_name will do what you are looking for. I've been using it to change the flags passed to a service. Having something like kubectl edit would be nice though, for cases where the service is already started with a huge number of commands, flags, files, ports, etc. Having to rewrite them all by hand (correctly!) if they were created programatically by some starlark code can be painful.

@tedim52
Copy link
Collaborator

tedim52 commented Feb 13, 2025

@samlaf just made me realize this as well actually - that logic is here:

Although with the service add you would have to provide all the other again - so an update that upserts the config would be useful.

@xavier-romero
Copy link
Author

Indeed there are services with many ports, artifacts, env, etc, that are set by starlark code. Asking the user to recreate everything is rude and painful.
If at least we had a simple way to achieve it. Something like that could do the trick as well:
kurtosis service dump enclave_name service_name --json | jq '.image = "new_image"' | kurtosis service add enclave_name service_name --json-input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli For bugs relating to the CLI feature request painful Painful bug
Projects
None yet
Development

No branches or pull requests

3 participants