Skip to content

Commit 406a61e

Browse files
committed
Re-order reconcile steps.
The Identity provider needs the S3 objects, so let's create them first and avoid flakey failures.
1 parent e7fbac4 commit 406a61e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/cloud/services/iam/iam.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ func (s *Service) ReconcileOIDCProvider(ctx context.Context) error {
7676
return errors.New("s3 bucket configuration required to associate OIDC provider")
7777
}
7878

79-
if err := s.reconcileIdentityProvider(ctx); err != nil {
79+
if err := s.reconcileBucketContents(ctx); err != nil {
8080
return err
8181
}
8282

83-
if err := s.reconcileBucketContents(ctx); err != nil {
83+
if err := s.reconcileIdentityProvider(ctx); err != nil {
8484
return err
8585
}
8686

87+
conditions.MarkTrue(s.scope.InfraCluster(), infrav1.OIDCProviderReadyCondition)
88+
8789
if err := s.reconcileTrustPolicyConfigMap(ctx); err != nil {
8890
return fmt.Errorf("failed to reconcile trust policy config map: %w", err)
8991
}
9092

91-
conditions.MarkTrue(s.scope.InfraCluster(), infrav1.OIDCProviderReadyCondition)
92-
9393
return nil
9494
}
9595

0 commit comments

Comments
 (0)