You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT
What happened:
As part of this PR [https://github.com//pull/82] testing, we found that there is a delay in setting the status of IamRole resource and due to that same request comes again with the status "" instead of Ready which makes IamRole creation again. Apart from the fact, how to gracefully handle that scenario which is being take care in #82 but the issue in the first place is that the request came back for reconciliation. That is due to the fact that resource status got updated and that resulted in a requeue. We already implemented predicate function to ignore the reconciliation for the status update but looks like it is not working as expected.
What you expected to happen:
Status update should not result in reconciliation event there by a delay in setting iam role status should not impact the IamRole creation.
How to reproduce it (as minimally and precisely as possible):
Its an intermittent issue but attaching the logs
Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT
What happened:
As part of this PR [https://github.com//pull/82] testing, we found that there is a delay in setting the status of IamRole resource and due to that same request comes again with the status "" instead of Ready which makes IamRole creation again. Apart from the fact, how to gracefully handle that scenario which is being take care in #82 but the issue in the first place is that the request came back for reconciliation. That is due to the fact that resource status got updated and that resulted in a requeue. We already implemented predicate function to ignore the reconciliation for the status update but looks like it is not working as expected.
What you expected to happen:
Status update should not result in reconciliation event there by a delay in setting iam role status should not impact the IamRole creation.
How to reproduce it (as minimally and precisely as possible):
Its an intermittent issue but attaching the logs
Anything else we need to know?:
Environment:
Other debugging information (if applicable):
$ kubectl logs
2021-07-15T00:03:40.177Z DEBUG awsapi.iam.CreateRole Attaching Inline role policies {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
2021-07-15T00:03:40.177Z DEBUG awsapi.iam.UpdateRole Initiating api call {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
2021-07-15T00:03:40.270Z DEBUG awsapi.iam.UpdateRole Initiating api call {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp", "api": "UpdateAssumeRolePolicy"}
2021-07-15T00:03:40.373Z DEBUG awsapi.iam.UpdateRole AssumeRole Policy is successfully updated {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
2021-07-15T00:03:40.373Z DEBUG awsapi.iam.AttachInlineRolePolicy Initiating api call {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
2021-07-15T00:03:40.511Z DEBUG awsapi.iam.AttachInlineRolePolicy Successfully completed attaching InlineRolePolicy {"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
I0715 00:03:40.511563 1 event.go:281] Event(v1.ObjectReference{Kind:"Iamrole", Namespace:"dev-patterns-iam-usw2-devp", Name:"iamrole", UID:"0fe679b7-c327-4e04-843c-5ad9149f06e5", APIVersion:"iammanager.keikoproj.io/v1alpha1", ResourceVersion:"86803885", FieldPath:""}): type: 'Normal' reason: 'Ready' Successfully created/updated iam role
2021-07-15T00:03:40.521Z INFO controllers.iamrole_controller.HandleReconcile Successfully reconciled
^^ K8s event got created that State is ready but new request came backk again with State "" (You can see that in following logs)
{"request_id": "99ab2cab-dc2e-44d3-bf8e-e4d24db8f462", "iam_role_cr": "iamrole"}
2021-07-15T00:03:40.521Z INFO controllers.iamrole_controller.Reconcile Start of the request {"request_id": "96b21253-6307-4835-afed-dd7a798e8fe5"}
2021-07-15T00:03:40.521Z INFO controllers.iamrole_controller.HandleReconcile state of the custom resource {"request_id": "96b21253-6307-4835-afed-dd7a798e8fe5", "iam_role_cr": "iamrole", "state": ""}
2021-07-15T00:03:40.521Z DEBUG controllers.iamrole_controller.HandleReconcile roleName constructed successfully {"request_id": "96b21253-6307-4835-afed-dd7a798e8fe5", "iam_role_cr": "iamrole", "roleName": "k8s-dev-patterns-iam-usw2-devp"}
2021-07-15T00:03:40.521Z DEBUG internal.utils.utils.defaultTrustPolicy Default trust policy from cm {"request_id": "96b21253-6307-4835-afed-dd7a798e8fe5", "trust_policy": "{"Version": "2012-10-17","Statement": [{"Effect":
The text was updated successfully, but these errors were encountered: