Skip to content

IAM controller leaves on orphaned role when patching .spec.name #2268

@demikl

Description

@demikl

Describe the bug

When I change the .spec.name field in an already synced roles.iam resource, a new role with the updated name is effectively created, but the old IAM role is not deleted.

Steps to reproduce

  1. create a valid roles.iam resource with .spec.name = foo
  2. wait for it to be successfully reconciled (the IAM role foo should now exist)
  3. patch the resource by modifying .spec.name = bar
  4. wait for it to be successfully reconciled (the IAM role bar should now exist)
  5. the IAM role foo still exists but is not managed anymore by the ACK IAM controller

Expected outcome

The old IAM role should be deleted, as if the role.iam resource has been deleted.

Environment

  • Kubernetes version

1.30

  • Using EKS (yes/no), if so version?

yes : eks.24

  • AWS service targeted (S3, RDS, etc.)

IAM controller, v1.3.13

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.service/iamIndicates issues or PRs that are related to iam-controller.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions