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

--push-latest-tag by default #94

Closed
consideRatio opened this issue Jul 17, 2020 · 2 comments · Fixed by #96
Closed

--push-latest-tag by default #94

consideRatio opened this issue Jul 17, 2020 · 2 comments · Fixed by #96
Labels
enhancement New feature or request

Comments

@consideRatio
Copy link
Member

Proposed change

To publish a latest image tag by default and make it configurable by a flag.

Who would use this feature?

It would allow for example a GitHub action setup to do a security scan of the latest image be able to do it without having a lot of code to extract the latest tagged image using chartpress or similar. This is a discussion arising from jupyterhub/zero-to-jupyterhub-k8s#1712 (comment).

(Optional): Suggest a solution

We add a boolean flag which defaults to something that makes us also push latest image tags when we --push the images. I suggest --push-latest-tag=false as the override of this default or perhaps --no-push-latest-tag or something like that.

@manics
Copy link
Member

manics commented Jul 21, 2020

A latest tag sounds fine if it's clear what it means- is it the latest tagged release, or the latest dev release? This probably should be indicated in the readme of the corresponding Docker Hub images.

@minrk
Copy link
Member

minrk commented Sep 7, 2020

Yeah, most of our charts explicitly and deliberately do not have a latest tag, to push toward always-pinned images. So there aren't any of our repos (jupyterhub, binderhub), where we would use this, unless I misunderstand.

If we are talking about adding latest just for security scans, I don't think that's the right approach. Instead, I think making it as easy as possible, e.g. a command like chartpress --list-images that outputs the list of tagged image, which could be consumed, e.g. by:

for image in $(chartpress --list-images); do
    echo $image
    trivy --exit-code 0 --severity HIGH ${image}
    trivy --exit-code 1 --severity CRITICAL ${image}
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants