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

Add image label support to ko builder #6597

Merged

Conversation

halvards
Copy link
Contributor

Description
This enables users to label images built by the ko builder, similar to the LABEL instruction in Dockerfiles.

The Open Container Initiative Image Format Specification lists a number of pre-defined annotation (label) keys. Some image registries use these, An example is GitHub Container Registry, which uses the org.opencontainers.image.source label to connect a Git repository to a container image.

Tracking: #6041

@halvards halvards requested a review from a team as a code owner September 13, 2021 08:26
@halvards halvards requested a review from tejal29 September 13, 2021 08:26
@google-cla google-cla bot added the cla: yes label Sep 13, 2021
@codecov
Copy link

codecov bot commented Sep 13, 2021

Codecov Report

Merging #6597 (fe497f9) into main (290280e) will decrease coverage by 0.39%.
The diff coverage is 80.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6597      +/-   ##
==========================================
- Coverage   70.48%   70.09%   -0.40%     
==========================================
  Files         515      520       +5     
  Lines       23150    23611     +461     
==========================================
+ Hits        16317    16549     +232     
- Misses       5776     5985     +209     
- Partials     1057     1077      +20     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/flags.go 89.00% <0.00%> (-1.82%) ⬇️
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
pkg/diag/recommender/container_errors.go 0.00% <0.00%> (ø)
pkg/diag/validator/pod.go 1.32% <0.00%> (ø)
pkg/skaffold/build/buildpacks/logger.go 0.00% <ø> (ø)
pkg/skaffold/build/cluster/logs.go 0.00% <ø> (-16.67%) ⬇️
pkg/skaffold/config/options.go 100.00% <ø> (ø)
pkg/skaffold/build/jib/errors.go 48.93% <50.00%> (ø)
cmd/skaffold/app/cmd/cmd.go 70.32% <66.66%> (-0.73%) ⬇️
pkg/diag/validator/resource.go 47.05% <66.66%> (ø)
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3e1279...fe497f9. Read the comment docs.

@halvards halvards added the kokoro:run runs the kokoro jobs on a PR label Sep 13, 2021
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Sep 13, 2021
This enables users to label images built by the ko builder, similar to
the `LABEL` instruction in `Dockerfile`s.

The Open Container Initiative Image Format Specification lists a number
of pre-defined annotation (label) keys. Some image registries use these,
e.g., GitHub Container Registry:
https://docs.github.com/en/packages/learn-github-packages/connecting-a-repository-to-a-package#connecting-a-repository-to-a-container-image-using-the-command-line

**Tracking:** GoogleContainerTools#6041
@halvards halvards force-pushed the ko-builder-image-labels branch from 94c2cdd to fe497f9 Compare September 21, 2021 00:56
@halvards halvards added the kokoro:run runs the kokoro jobs on a PR label Sep 22, 2021
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Sep 22, 2021
Copy link
Contributor

@MarlonGamez MarlonGamez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@MarlonGamez MarlonGamez merged commit 0f837c0 into GoogleContainerTools:main Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants