mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-16 00:13:23 +00:00
bugfix trusted policy
This commit is contained in:
@@ -155,16 +155,17 @@ func (r *IRSAReconciler) reconcile(ctx context.Context, obj *irsav1alpha1.IRSA,
|
||||
return err
|
||||
}
|
||||
roleManager := awsclient.RoleManager{
|
||||
RoleName: obj.Spec.IamRole.Name,
|
||||
Namespaces: serviceAccount.Namespaces,
|
||||
Policies: obj.Spec.IamPolicies,
|
||||
AccountId: accountId,
|
||||
RoleName: obj.Spec.IamRole.Name,
|
||||
ServiceAccount: serviceAccount,
|
||||
Policies: obj.Spec.IamPolicies,
|
||||
AccountId: accountId,
|
||||
}
|
||||
issuerMeta, err := issuer.NewS3IssuerMeta(&irsaSetup.Spec.Discovery.S3)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = r.AwsClient.IamClient().CreateIRSARole(ctx,
|
||||
err = r.AwsClient.IamClient().CreateIRSARole(
|
||||
ctx,
|
||||
issuerMeta,
|
||||
roleManager,
|
||||
)
|
||||
|
||||
@@ -183,9 +183,9 @@ var _ = Describe("IRSA Controller", func() {
|
||||
}
|
||||
By("creating the mock ISASetup")
|
||||
if tt.irsaSetupObj != nil {
|
||||
err := k8sClient.Get(ctx, client.ObjectKeyFromObject(tt.irsaSetupObj), tt.irsaSetupObj)
|
||||
err := k8sClient.Get(ctx, client.ObjectKeyFromObject(tt.irsaSetupObj), &irsav1alpha1.IRSASetup{})
|
||||
if err != nil && errors.IsNotFound(err) {
|
||||
Expect(k8sClient.Create(ctx, tt.obj)).To(Succeed())
|
||||
Expect(k8sClient.Create(ctx, tt.irsaSetupObj)).To(Succeed())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user