@@ -28,6 +28,7 @@ import (
28
28
"sync"
29
29
"time"
30
30
31
+ "github.com/fluxcd/source-controller/pkg/azure"
31
32
"golang.org/x/sync/errgroup"
32
33
"golang.org/x/sync/semaphore"
33
34
corev1 "k8s.io/api/core/v1"
@@ -400,6 +401,17 @@ func (r *BucketReconciler) reconcileSource(ctx context.Context, obj *sourcev1.Bu
400
401
conditions .MarkTrue (obj , sourcev1 .FetchFailedCondition , e .Reason , e .Error ())
401
402
return sreconcile .ResultEmpty , e
402
403
}
404
+ case sourcev1 .AzureBucketProvider :
405
+ if err = azure .ValidateSecret (secret ); err != nil {
406
+ e := & serror.Event {Err : err , Reason : sourcev1 .AuthenticationFailedReason }
407
+ conditions .MarkTrue (obj , sourcev1 .FetchFailedCondition , e .Reason , e .Error ())
408
+ return sreconcile .ResultEmpty , e
409
+ }
410
+ if provider , err = azure .NewClient (obj , secret ); err != nil {
411
+ e := & serror.Event {Err : err , Reason : "ClientError" }
412
+ conditions .MarkTrue (obj , sourcev1 .FetchFailedCondition , e .Reason , e .Error ())
413
+ return sreconcile .ResultEmpty , e
414
+ }
403
415
default :
404
416
if err = minio .ValidateSecret (secret ); err != nil {
405
417
e := & serror.Event {Err : err , Reason : sourcev1 .AuthenticationFailedReason }
0 commit comments