-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 arbitrary labels to docker images #11209
Add arbitrary labels to docker images #11209
Conversation
@@ -622,6 +622,19 @@ type BuildOutput struct { | |||
// up the authentication for executing the Docker push to authentication | |||
// enabled Docker Registry (or Docker Hub). | |||
PushSecret *kapi.LocalObjectReference `json:"pushSecret,omitempty" protobuf:"bytes,2,opt,name=pushSecret"` | |||
|
|||
// labels define a list of labels that are applied to the resulting image. If there are | |||
// multiple labels with the same name then the last one in the list is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validation should complain about multiple labels with the same name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea was that the BuildDefaults admission plugin will prepend labels to the list making them effectively defaults and BuildOverrides will append them making them mandatory. Not really a problem though, this logic can be extended to remove the duplicate entry.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now.
|
||
// labels define a list of labels that are applied to the resulting image. If there are | ||
// multiple labels with the same name then the last one in the list is used. | ||
Labels []ImageLabel `json:"labels,omitempty" protobuf:"bytes,3,rep,name=labels"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's confusing that these will result in docker labels, not API labels on the object that the to
reference points to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I rename the field to imageLabels
or dockerLabels
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd vote for imageLabels
, curious what others think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed the field to imageLabels
.
577ed67
to
2e6f31e
Compare
updated:
|
2e6f31e
to
5f7ed01
Compare
Added simple extended test. |
Documentation: openshift/openshift-docs#3015 |
5f7ed01
to
aff38d0
Compare
@bparees PTAL |
[test] |
[testextended][extended:core(builds)] |
@mmilata please squash the 2 non-bump commits |
API approved |
flake #11240 |
aff38d0
to
d2c807f
Compare
@bparees, squashed & rebased on current master |
Evaluated for origin testextended up to d2c807f |
Evaluated for origin test up to d2c807f |
[merge] |
Evaluated for origin merge up to d2c807f |
Both failures seem to be caused by AWS capacity problem:
|
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/565/) (Extended Tests: core(builds)) |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9844/) |
looks like flake #11024 |
[merge] |
@mfojtik, why is the bot ignoring this?:) |
@mmilata it is not, see: #11209 (comment) |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/9994/) (Base Commit: c728fe9) (Image: devenv-rhel7_5169) |
Trello card: https://trello.com/c/HB9IwGj5/925-5-add-arbitrary-labels-to-docker-images
Documentation: openshift/openshift-docs#3015
Missing: