@@ -43,6 +43,7 @@ import (
4343	aclapi "github.com/fluxcd/pkg/apis/acl" 
4444	eventv1 "github.com/fluxcd/pkg/apis/event/v1beta1" 
4545	"github.com/fluxcd/pkg/apis/meta" 
46+ 	"github.com/fluxcd/pkg/auth" 
4647	"github.com/fluxcd/pkg/cache" 
4748	"github.com/fluxcd/pkg/git" 
4849	"github.com/fluxcd/pkg/runtime/acl" 
@@ -372,6 +373,13 @@ func (r *ImageUpdateAutomationReconciler) reconcile(ctx context.Context, sp *pat
372373			result , retErr  =  ctrl.Result {}, nil 
373374			return 
374375		}
376+ 		if  errors .Is (err , source .ErrFeatureGateNotEnabled ) {
377+ 			const  gate  =  auth .FeatureGateObjectLevelWorkloadIdentity 
378+ 			const  msgFmt  =  "to use spec.serviceAccountName for provider authentication please enable the %s feature gate in the controller" 
379+ 			conditions .MarkStalled (obj , meta .FeatureGateDisabledReason , msgFmt , gate )
380+ 			result , retErr  =  ctrl.Result {}, nil 
381+ 			return 
382+ 		}
375383		e  :=  fmt .Errorf ("failed configuring source manager: %w" , err )
376384		conditions .MarkFalse (obj , meta .ReadyCondition , imagev1 .SourceManagerFailedReason , "%s" , e )
377385		result , retErr  =  ctrl.Result {}, e 
@@ -383,7 +391,7 @@ func (r *ImageUpdateAutomationReconciler) reconcile(ctx context.Context, sp *pat
383391		}
384392	}()
385393	// Update any stale Ready=False condition from SourceManager failure. 
386- 	if  conditions .HasAnyReason (obj , meta .ReadyCondition , aclapi .AccessDeniedCondition , imagev1 .InvalidSourceConfigReason , imagev1 .SourceManagerFailedReason ) {
394+ 	if  conditions .HasAnyReason (obj , meta .ReadyCondition , aclapi .AccessDeniedCondition , imagev1 .InvalidSourceConfigReason , imagev1 .SourceManagerFailedReason ,  meta . FeatureGateDisabledReason ) {
387395		conditions .MarkUnknown (obj , meta .ReadyCondition , meta .ProgressingReason , "reconciliation in progress" )
388396	}
389397
0 commit comments