Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update well-known policy for ebsCSIController #7451

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Update well-known policy for ebsCSIController #7451

merged 1 commit into from
Jan 22, 2024

Conversation

teraflik
Copy link
Contributor

@teraflik teraflik commented Jan 4, 2024

Description

The IAM condition key StringLike was used incorrectly in the policy and it doesn't work with wildcard (*) in the key itself. Wildcards are only supported in the value of the key.

This fixes an issue in cases where a volume dynamically provisioned via the older in-tree CSI plugin is being deleted by the new EBS CSI driver, because such volumes don't have the tags used in the policy.

rpc error: code = Internal desc = Could not delete volume ID "vol-0894ac8afbxxxxx": DeleteDisk could not delete volume: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:sts::xxxxxxx:assumed-role/ebs-csi-controller-preprod-eu/170435858907323xxxx is not authorized to perform: ec2:DeleteVolume on resource: arn:aws:ec2:eu-west-1:xxxxxxx:volume/vol-0894ac8afbxxxxx because no identity-based policy allows the ec2:DeleteVolume action.

The changes made are inspired from the AWS managed AmazonEBSCSIDriverPolicy.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello teraflik 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

@teraflik
Copy link
Contributor Author

Sorry to ping you @cPu1 / @TiberiuGC but do you think this can be moved forward?

Copy link
Member

@yuxiang-zhang yuxiang-zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found the corresponding update: kubernetes-sigs/aws-ebs-csi-driver@b1d476c

@teraflik
Copy link
Contributor Author

Thanks @yuxiang-zhang for finding that. Now approval to run the workflow is needed to proceed.

@teraflik
Copy link
Contributor Author

Updated the test case.

The IAM condition key StringLike was used incorrectly in the policy and it doesn't work with wildcard (*) in the key itself. Wildcard is only supported in the value of the key. This fixes issue in cases where a volume dynamically provisioned via the older in-tree CSI plugin is being deleted by the new EBS CSI driver, because such volumes don't have the tags used in the policy.

The changes made are inspired from the AWS managed AmazonEBSCSIDriverPolicy.
@teraflik
Copy link
Contributor Author

Missed a comma in json, fixed now.

@yuxiang-zhang yuxiang-zhang merged commit b4d258d into eksctl-io:main Jan 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants