-
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
Update DockerImageReferences when tagging across image streams #9238
Update DockerImageReferences when tagging across image streams #9238
Conversation
583d21a
to
7d726a8
Compare
Printer ObjectPrinter | ||
} | ||
|
||
// NewCmdCreateServiceAccount is a macro command to create a new image stream |
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.
Outdated godoc.
Could you please better describe commit message of "Allow mutation of image dockerImageReference"? |
// New returns a new ImageStreamMapping for use with Create. | ||
func (r *REST) New() runtime.Object { | ||
return &api.ImageStreamMapping{} | ||
func NewImageStreamMappingStrategy(defaultRegistry api.DefaultRegistry) Strategy { |
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.
NewStrategy
? Also the godoc doesn't match.
We should set up a controller for fixing such cases for existing entries. It could handle a lot of other cases we don't address today:
|
We're not going to do a controller because there are other use cases
for changing these values - ie when an external registry changes and
the admin has to react. The migrate PR will implement that.
We are not going to do a global map lookup, it's more complex and
doesn't fit our API style (which is simple denormalized objects).
Prune should handle removing tags.
|
7d726a8
to
e23f741
Compare
@@ -310,8 +310,8 @@ func TestUpdateResetsMetadata(t *testing.T) { | |||
t.Errorf("unexpected docker image: %#v", image.DockerImageMetadata) | |||
return false | |||
} | |||
if image.DockerImageReference != "openshift/ruby-19-centos-2" { | |||
t.Errorf("image reference changed: %s", image.DockerImageReference) | |||
if image.DockerImageReference == "openshift/ruby-19-centos-2" { |
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.
Could you also check against expected value?
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.
One nit. LGTM otherwise. |
Can we finally get around to removing storing image.dockerImageReference in etcd? |
switch len(args) { | ||
case 0: | ||
return fmt.Errorf("image stream name is required") | ||
case 1: |
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 at least have --image
or something like that, which will create a non-empty ImageStream?
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.
Not here. That's what tag does.
I think i've flipped - we want to store the image reference. It's strictly less complex than a mapping solution, and now that we have a migration story developing it's manageable. |
e23f741
to
fbc0514
Compare
[merge] |
[Test]ing while waiting on the merge queue |
fbc0514
to
c9c49d3
Compare
continuous-integration/openshift-jenkins/test Running (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4782/) |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4789/) (Image: devenv-rhel7_4363) |
c9c49d3
to
5dbc59d
Compare
Reference tags are not imported, but simply linked
Enables simple creation of an image stream
Admins should be able to update dockerImageReference on an image so that migrations can be performed via the API.
If the caller does not provide a DIR, set the DIR to be the pullthrough location for this image stream. This enables non-registry clients to submit images more easily, primarily for testing, but will also be used in future registry to avoid the need to set the value.
The hasScheduled flag was being reset
If the image reference we are copying in an image stream points to the internal registry, update the docker pull spec to the current image stream so that deleting the original image stream has no impact. Add more extensive tests of this behavior.
Evaluated for origin test up to 33b455a |
Evaluated for origin merge up to 33b455a |
The docker image reference to an internal image (in the local registry) should be updated during a tag, so if the original image stream is deleted pulls don't fail.
I.e.
Also adds:
dockerImageReference
on anImage
to be updatedoc create imagestream
ImageStreamMapping
should defaultdockerImageReference
if not set--reference
tooc tag