Conversation
|
@mfojtik fyi |
| !c.Options.ImagePolicyConfig.DisableScheduledImport, | ||
| ) | ||
| if c.Options.ImagePolicyConfig.DisableScheduledImport { | ||
| glog.V(2).Infof("Scheduled image import is disabled - the 'scheduled' flag on image streams will be ignored") |
There was a problem hiding this comment.
wonder if there is a way to communicate this to users (if I create scheduled import as a user, I have no idea it is disabled, right?)
There was a problem hiding this comment.
The image stream controller could know that and could add an annotation with that info. I'll defer to @smarterclayton for opinion, since he has mixed feelings, but I agree it would be beneficial for users to know this.
e1b4c43 to
a135f1c
Compare
a135f1c to
47b6759
Compare
|
[test] @smarterclayton this is ready for final review |
|
Flake #14044 [test] |
|
|
||
| // RunImageImportController starts the image import trigger controller process. | ||
| func (c *MasterConfig) RunImageImportController() { | ||
| isInformer := c.Informers.ImageStreams() |
There was a problem hiding this comment.
nuke this, you used this just once
| controller, scheduledController := factory.Create() | ||
| controller.Run() | ||
| ctrl, sched := imagecontroller.NewImageStreamControllers( | ||
| isInformer, |
There was a problem hiding this comment.
c.Informers.ImageStreams()
| } | ||
| controller, scheduledController := factory.Create() | ||
| controller.Run() | ||
| ctrl, sched := imagecontroller.NewImageStreamControllers( |
| glog.V(2).Infof("Scheduled image import is disabled - the 'scheduled' flag on image streams will be ignored") | ||
| } else { | ||
| scheduledController.RunUntil(utilwait.NeverStop) | ||
| sched.Run(utilwait.NeverStop) |
There was a problem hiding this comment.
scheduledController (hate cryptic short forms)
pkg/image/controller/factory.go
Outdated
| q := cache.NewResyncableFIFO(cache.MetaNamespaceKeyFunc) | ||
| cache.NewReflector(lw, &api.ImageStream{}, q, f.ResyncInterval).Run() | ||
| // instantiate informer based image stream controller | ||
| ctrl := newImageStreamController(isInformer, isNamespacer) |
6091735 to
15f9c8e
Compare
|
Flake #13827 [test] |
|
|
||
| stream, err := c.getByKey(key.(string)) | ||
| if err == nil && stream != nil { | ||
| glog.V(3).Infof("Queued import of stream %s/%s...", stream.Namespace, stream.Name) |
There was a problem hiding this comment.
It's slightly different than what we've had before. But this is this and it was 3 back then.
|
@mfojtik roger that, I'll try to update that tomorrow. |
| } | ||
| stream, err := c.lister.ImageStreams(namespace).Get(name, metav1.GetOptions{}) | ||
| if apierrs.IsNotFound(err) { | ||
| glog.V(4).Infof("Image stream has been deleted: %v", key) |
There was a problem hiding this comment.
Doesn't need a log line
| if !needsScheduling(sharedStream) { | ||
| return ErrNotImportable | ||
| } | ||
| stream := *sharedStream |
There was a problem hiding this comment.
Not sufficient, this is mutating a shared cache
|
Logic looks ok except for a few things, want to see this rebased and green tests. |
bb96e00 to
54306a3
Compare
|
I've rebased and squashed all the changes to a single commit. @mfojtik where's that commit coming from, I can't find that code anywhere in origin :/ I've left there TODO. Let's merge this in on green tests and I'll work out a followup with the init changes, wdyt? |
|
Evaluated for origin test up to 54306a3 |
|
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/1592/) (Base Commit: 37d5498) |
|
@mfojtik @smarterclayton any objections on merging this in? |
|
@soltysh i'm fine merging this but you should follow up with the controller initialization :-) |
|
[merge] |
|
[merge][severity: blocker] memory use is still p0 for 3.6 |
|
[merge][severity: blocker] flake: #14349 |
|
Evaluated for origin merge up to 54306a3 |
|
continuous-integration/openshift-jenkins/merge FAILURE (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/794/) (Base Commit: 4b3473a) (Extended Tests: blocker) |
|
Blocked by hate, force merging |

This builds on top of the rebase PR, so only last commit matters here, but I wanted to start the discussion.
@smarterclayton mind taking a look if this is going in the right direction? While working on it I was wondering why we want to have two separate controllers one for scheduled and the other for regular image stream operations, isn't having a single sufficient?