-
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
merge imagestreamtag list on patch #17091
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,7 +184,9 @@ type ImageStreamSpec struct { | |
// Specify the source for the tags to be imported in each tag via the spec.tags.from reference instead. | ||
DockerImageRepository string `json:"dockerImageRepository,omitempty" protobuf:"bytes,1,opt,name=dockerImageRepository"` | ||
// tags map arbitrary string values to specific image locators | ||
Tags []TagReference `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"` | ||
// +patchMergeKey=name | ||
// +patchStrategy=merge | ||
Tags []TagReference `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=tags"` | ||
} | ||
|
||
// ImageLookupPolicy describes how an image stream can be used to override the image references | ||
|
@@ -272,7 +274,9 @@ type ImageStreamStatus struct { | |
PublicDockerImageRepository string `json:"publicDockerImageRepository,omitempty" protobuf:"bytes,3,opt,name=publicDockerImageRepository"` | ||
// Tags are a historical record of images associated with each tag. The first entry in the | ||
// TagEvent array is the currently tagged image. | ||
Tags []NamedTagEventList `json:"tags,omitempty" protobuf:"bytes,2,rep,name=tags"` | ||
// +patchMergeKey=tag | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well, that explains my issues. API changes after openshift/api was made :( |
||
// +patchStrategy=merge | ||
Tags []NamedTagEventList `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"tag" protobuf:"bytes,2,rep,name=tags"` | ||
} | ||
|
||
// NamedTagEventList relates a tag to its image history. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"kind": "ImageStream", | ||
"apiVersion": "v1", | ||
"metadata": { | ||
"name": "ruby", | ||
"annotations": { | ||
"openshift.io/display-name": "Ruby" | ||
} | ||
}, | ||
"spec": { | ||
"tags": [ | ||
{ | ||
"name": "2.4", | ||
"annotations": { | ||
"openshift.io/display-name": "Ruby Patched", | ||
"openshift.io/provider-display-name": "Red Hat, Inc.", | ||
"description": "Build and run Ruby 2.4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.4/README.md.", | ||
"iconClass": "icon-ruby", | ||
"tags": "builder,ruby", | ||
"supports": "ruby:2.4,ruby", | ||
"version": "2.4 patched", | ||
"sampleRepo": "https://github.com/openshift/ruby-ex.git" | ||
}, | ||
"from": { | ||
"kind": "DockerImage", | ||
"name": "centos/ruby-24-centos7:latest" | ||
} | ||
}, | ||
{ | ||
"name": "newtag", | ||
"from": { | ||
"kind": "DockerImage", | ||
"name": "centos/ruby-24-centos7:latest" | ||
} | ||
} | ||
] | ||
} | ||
} |
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.
Can we add a test to test-cmd that verifies this merges correctly?
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.
done.
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.
Turns out, that was a really good idea.
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.
no need to encourage him...