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

Make it possible to overwrite image TS with label #1992

Merged
merged 2 commits into from May 9, 2019

Conversation

@hiddeco
Copy link
Member

hiddeco commented Apr 29, 2019

This adds support for overwriting the image created at timestamp with labels which are set during build. Supported labels (for now) are the Open Container Image (OCI) spec and the (legacy) Label Schema (LS) spec.

We prioritize OCI over LS, with a fallback to the CreatedAt from the registry.

Fixes #891, addresses #1799, #1797, #746

@hiddeco hiddeco requested review from 2opremio and squaremo Apr 29, 2019
@hiddeco hiddeco added this to the v1.13.0 milestone Apr 30, 2019
@hiddeco

This comment has been minimized.

Copy link
Member Author

hiddeco commented Apr 30, 2019

As this PR changes behaviour (by prioritizing labels over the CreatedAt date from the registry) and is more a feature than a bugfix, I marked this as a v1.13.0 milestone.

image/image.go Outdated Show resolved Hide resolved
image/image.go Outdated Show resolved Hide resolved
image/image.go Show resolved Hide resolved
Copy link
Collaborator

2opremio left a comment

Minor comments, otherwise LGTM

@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from 2743fd0 to ccf6c52 May 1, 2019
@2opremio

This comment has been minimized.

Copy link
Collaborator

2opremio commented May 2, 2019

LGTM

This adds support for overwriting the image created at timestamp with
labels which are set during build. Supported labels (for now) are the
Open Container Image (OCI) spec[1] and the (legacy) Label Schema (LS)
spec[2].

We prioritize OCI over LS, with a fallback to the CreatedAt.

This should serve a wide range of users who either have internal rules
for image builds (e.g. timestamp set to null as reported in #1797) or
want a stable reliable pointer they can have control over (#746, #891).
[1]: https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys
[2]: http://label-schema.org/rc1/#build-time-labels
@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from ccf6c52 to 0208f1a May 9, 2019
Copy link
Member

squaremo left a comment

LGTM2

@hiddeco hiddeco force-pushed the bug/891-timestamp-from-labels branch from acd4706 to a39a860 May 9, 2019
@hiddeco hiddeco merged commit 3b6c58b into master May 9, 2019
4 checks passed
4 checks passed
tag-filter tag-filter
Details
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: e2e-testing Your tests passed on CircleCI!
Details
helm-lint helm-lint
Details
@hiddeco hiddeco deleted the bug/891-timestamp-from-labels branch May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.