@@ -202,38 +202,39 @@ func (rc RegistryChecker) Tick() {
202
202
func (rc * RegistryChecker ) reconcile (obj interface {}) {
203
203
images := ExtractImages (obj )
204
204
205
- for _ , image := range images {
206
- for _ , ignoredImageRegex := range rc .ignoredImagesRegex {
207
- if ignoredImageRegex .MatchString (image ) {
208
- continue
205
+ imagesLoop:
206
+ for _ , image := range images {
207
+ for _ , ignoredImageRegex := range rc .ignoredImagesRegex {
208
+ if ignoredImageRegex .MatchString (image ) {
209
+ continue imagesLoop
210
+ }
209
211
}
210
- }
211
-
212
- var skipObject bool
213
212
214
- switch typedObj := obj .(type ) {
215
- case * appsv1.Deployment :
216
- if typedObj .Status .Replicas == 0 {
217
- skipObject = true
213
+ var skipObject bool
214
+
215
+ switch typedObj := obj .(type ) {
216
+ case * appsv1.Deployment :
217
+ if typedObj .Status .Replicas == 0 {
218
+ skipObject = true
219
+ }
220
+ case * appsv1.StatefulSet :
221
+ if typedObj .Status .Replicas == 0 {
222
+ skipObject = true
223
+ }
224
+ case * appsv1.DaemonSet :
225
+ if typedObj .Status .CurrentNumberScheduled == 0 {
226
+ skipObject = true
227
+ }
218
228
}
219
- case * appsv1.StatefulSet :
220
- if typedObj .Status .Replicas == 0 {
221
- skipObject = true
222
- }
223
- case * appsv1.DaemonSet :
224
- if typedObj .Status .CurrentNumberScheduled == 0 {
225
- skipObject = true
229
+
230
+ if skipObject {
231
+ rc .imageStore .ReconcileImage (image , []store.ContainerInfo {})
232
+ continue
226
233
}
227
- }
228
234
229
- if skipObject {
230
- rc .imageStore .ReconcileImage (image , []store.ContainerInfo {})
231
- continue
235
+ containerInfos := rc .controllerIndexers .GetContainerInfosForImage (image )
236
+ rc .imageStore .ReconcileImage (image , containerInfos )
232
237
}
233
-
234
- containerInfos := rc .controllerIndexers .GetContainerInfosForImage (image )
235
- rc .imageStore .ReconcileImage (image , containerInfos )
236
- }
237
238
}
238
239
239
240
func (rc * RegistryChecker ) reconcileUpdate (a , b interface {}) {
0 commit comments