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

Could Keel update annotations? #243

Closed
captncraig opened this issue Jul 27, 2018 · 3 comments
Closed

Could Keel update annotations? #243

captncraig opened this issue Jul 27, 2018 · 3 comments

Comments

@captncraig
Copy link

Let's say I would like to have annotations on my deployments. Maybe I want to show the actual SHA of the source commit used to build the container. Or a link to the build job or the repo or whatever.

If I inserted this metadata into my docker image at build time, (using docker labels most likely), would it make sense for keel to apply those labels as kubernetes annotations whenever it updates the deployment? That would be a really convenient feature.

Are there perhaps unintended consequences to doing that? I don't feel like there would be anything except maybe conflicting with other user-generated annotations or something. If it was opt-in, or driven by other annotations, that may help there, but more config is not my favorite. Maybe just a keel.sh/annotate: "true" annotation could activate that mode.

I feel like keel is a good tool to do something like this since it is already updating the deployment. If the docker labels are not easily availible or something though, another dedicated operator could also work.

@captncraig
Copy link
Author

Although the more I think about it, it does get more complicated. I feel like maybe what I want is to annotate the deployment itself, but also the spec so that the replica sets (and maybe pods?) themselves get annotated appropriately so you can see exactly which versions are running during a rolling deploy and stuff. Is there another way people solve this kind of problem?

@rusenask
Copy link
Collaborator

Hi, it already updates annotation so you can see rollout history with each version bump. We could easily update more things there if we want to :)
https://github.com/keel-hq/keel/blob/master/provider/kubernetes/versioned_updates.go#L172-L176

The only thing about images and labels on them is that keel doesn't really try to look into the images. For example if a webhooks comes that image is updated then it just updates deployments, it will never try to download it from somewhere and inspect it. So this feature could be dependant on trigger type (maybe with poll trigger it would return it through the registry API)

@rusenask
Copy link
Collaborator

rusenask commented Aug 3, 2018

Closing this due to no activity

@rusenask rusenask closed this as completed Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants