-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Feature request: Option to update just the image tag in a deployment #29097
Comments
Are you suggesting something like:
|
Not necessarily the subcommand, but yeah something like that. I currently On Tue, 19 Jul 2016 at 1:53 AM, Phillip Wittrock notifications@github.com
|
Handle in ci/cd pipeline? Heres how I do it: |
I am against doing this because tag is not unique in an image spec, eg. I can use the sha hash of the image instead - moreover I think it's more sane to use hashes vs tags but that's another discussion. |
set image works fine too |
is this command usable with python client?? https://github.com/kubernetes-incubator/client-python |
Can anyone point this |
@joan38 I do this, but docs UI seems to have gone downhill. So can't find anything now 🤷♂️ url = ("http://{kube_master}/apis/extensions/v1beta1/namespaces/{ns}/"
"deployments/{d}".format(kube_master=args.kube_master,
ns=args.namespace,
d=args.deployment))
headers = {'Content-Type': 'application/strategic-merge-patch+json'}
payload = '{"spec":{"template":{"spec":{"containers":[{"name": "%s", "image":"%s"}]}}}}' % (args.deployment, image_name)
r = requests.patch(url, headers=headers, data=payload) |
Sorry to comment on this old issue. I want to update my image after some search i have found below straight command. |
There is no issue with using it on production depending on your deployment workflow |
Currently, to update the container image running in a deployment, we do something like this:
or perhaps using
patch
to update theimage
field.While this works fine, I think container image names are rarely changed, and we just update the image tag. So it might be a good idea to keep
tag
as a separate field. Then we can do, "set image-tag for this deployment name" without fetching and using the image name again.Thoughts?
The text was updated successfully, but these errors were encountered: