@@ -191,6 +191,7 @@ func (r *OCIRepositoryReconciler) Reconcile(ctx context.Context, req ctrl.Reques
191
191
summarizeHelper := summarize .NewHelper (r .EventRecorder , patchHelper )
192
192
summarizeOpts := []summarize.Option {
193
193
summarize .WithConditions (ociRepositoryReadyCondition ),
194
+ summarize .WithBiPolarityConditionTypes (sourcev1 .SourceVerifiedCondition ),
194
195
summarize .WithReconcileResult (recResult ),
195
196
summarize .WithReconcileError (retErr ),
196
197
summarize .WithIgnoreNotFound (),
@@ -294,6 +295,14 @@ func (r *OCIRepositoryReconciler) reconcileSource(ctx context.Context, obj *sour
294
295
ctxTimeout , cancel := context .WithTimeout (ctx , obj .Spec .Timeout .Duration )
295
296
defer cancel ()
296
297
298
+ // Remove previously failed source verification status conditions. The
299
+ // failing verification should be recalculated. But an existing successful
300
+ // verification need not be removed as it indicates verification of previous
301
+ // version.
302
+ if conditions .IsFalse (obj , sourcev1 .SourceVerifiedCondition ) {
303
+ conditions .Delete (obj , sourcev1 .SourceVerifiedCondition )
304
+ }
305
+
297
306
options := r .craneOptions (ctxTimeout , obj .Spec .Insecure )
298
307
299
308
// Generate the registry credential keychain either from static credentials or using cloud OIDC
0 commit comments