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
{{ message }}
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
During my testing of this operator to ensure it's production readiness I encountered an issue where the operator would crash on reconcilation if the resources it had previously created were removed from AWS.
2022-03-08T10:29:21.117Z INFO controllers.Aws successfully created trust role policy (irsa-op-irsa-controlller-default-s3-get-lister) on aws
2022-03-08T10:29:21.552Z INFO controllers.Aws successfully attached role (irsa-op-irsa-controlller-default-s3-get-lister) & policy (arn:aws:iam::703320575624:policy/irsa-operator/irsa-controlller/default/s3-get-lister/policy/irsa-op-irsa-controlller-default-s3-get-lister) on aws
Remove the created resources (note: the below resource names will vary depending on your cluster, operator name and namespace):
aws iam detach-role-policy --policy-arn arn:aws:iam::<accountid>:policy/irsa-operator/irsa-controlller/default/s3-get-lister/policy/irsa-op-irsa-controlller-default-s3-get-lister --role-name irsa-op-irsa-controlller-default-s3-get-lister
aws iam delete-policy --policy-arn arn:aws:iam::<accountid>:policy/irsa-operator/irsa-controlller/default/s3-get-lister/policy/irsa-op-irsa-controlller-default-s3-get-lister
aws iam delete-role --role-name irsa-op-irsa-controlller-default-s3-get-lister
Now either make a modification to the resource and apply it:
kubectl delete po -n irsa-controller irsa-controller-irsa-operator-7c87c75f4d-6lmtg
Expected Outcome
Operator pod should reconcile the changes and recreate the deleted resources. The operator pod logs should output the modifications made.
Actual Outcome
The operator is unable to reconcile the differences and the following output is constantly spammed by the pod:
2022-03-08T10:42:46.162Z INFO controllers.IamRoleServiceAccount [default/s3-get-lister] : Failed to create policy : Operation cannot be fulfilled on policies.irsa.voodoo.io "s3-get-lister": the object has been modified; please apply your changes to the latest version and try again
2022-03-08T10:42:46.261Z INFO controllers.IamRoleServiceAccount [default/s3-get-lister] : Failed to create policy : Operation cannot be fulfilled on policies.irsa.voodoo.io "s3-get-lister": the object has been modified; please apply your changes to the latest version and try again
2022-03-08T10:42:46.361Z INFO controllers.IamRoleServiceAccount [default/s3-get-lister] : Failed to create policy : Operation cannot be fulfilled on policies.irsa.voodoo.io "s3-get-lister": the object has been modified; please apply your changes to the latest version and try again
When recreating the operator pod, it fails to start and outputs the following logs:
Problem Statement
During my testing of this operator to ensure it's production readiness I encountered an issue where the operator would crash on reconcilation if the resources it had previously created were removed from AWS.
Steps to Reproduce
Create a resource:
Ensure operator creates resource successfully:
2022-03-08T10:29:21.117Z INFO controllers.Aws successfully created trust role policy (irsa-op-irsa-controlller-default-s3-get-lister) on aws 2022-03-08T10:29:21.552Z INFO controllers.Aws successfully attached role (irsa-op-irsa-controlller-default-s3-get-lister) & policy (arn:aws:iam::703320575624:policy/irsa-operator/irsa-controlller/default/s3-get-lister/policy/irsa-op-irsa-controlller-default-s3-get-lister) on aws
Remove the created resources (note: the below resource names will vary depending on your cluster, operator name and namespace):
Now either make a modification to the resource and apply it:
or recreate the operator pod:
Expected Outcome
Operator pod should reconcile the changes and recreate the deleted resources. The operator pod logs should output the modifications made.
Actual Outcome
The operator is unable to reconcile the differences and the following output is constantly spammed by the pod:
When recreating the operator pod, it fails to start and outputs the following logs:
The text was updated successfully, but these errors were encountered: