Skip to content

Commit 583d2b9

Browse files
authored
in removePullSecretFromApplicationPullSecret consider for secret (#288)
replacement only image repositories in ready state Signed-off-by: Robert Cerven <rcerven@redhat.com>
1 parent cee4845 commit 583d2b9

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

internal/controller/imagerepository_controller.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,12 @@ func (r *ImageRepositoryReconciler) removePullSecretFromApplicationPullSecret(ct
12621262
if otherIR.ObjectMeta.Name == imageRepository.ObjectMeta.Name {
12631263
continue
12641264
}
1265+
1266+
// Skip IR which isn't in ready state
1267+
if otherIR.Status.State != imagerepositoryv1alpha1.ImageRepositoryStateReady {
1268+
continue
1269+
}
1270+
12651271
// Must match the same registry URL
12661272
if otherIR.Status.Image.URL != imageRepository.Status.Image.URL {
12671273
continue

0 commit comments

Comments
 (0)