Skip to content

Add missing EFS CSI driver permissions (S3 Files, DescribeMountTargets) to efsCSIController well-known policy - #8907

Open
SivaSaiKrishnaSuryadevara wants to merge 1 commit into
eksctl-io:mainfrom
SivaSaiKrishnaSuryadevara:efs-csi-controller-policy-upstream-sync
Open

SivaSaiKrishnaSuryadevara wants to merge 1 commit into
eksctl-io:mainfrom
SivaSaiKrishnaSuryadevara:efs-csi-controller-policy-upstream-sync

Conversation

@SivaSaiKrishnaSuryadevara

Copy link
Copy Markdown

Description

Closes #8906.

Adds the actions the EFS CSI driver's example policy (docs/iam-policy-example.json) requires but the efsCSIController well-known policy lacks:

  • Describe statement (Resource: *): elasticfilesystem:DescribeMountTargets, ec2:DescribeAvailabilityZones, s3files:ListAccessPoints, s3files:ListFileSystems.
  • s3files:CreateAccessPoint, s3files:TagResource and s3files:DeleteAccessPoint, each added to the statement of its elasticfilesystem: counterpart so it carries the same tag condition.

The s3files:* actions came with the driver's S3 Files support (kubernetes-sigs/aws-efs-csi-driver@92c7793). No conditions or resources change; the existing RequestTag condition on TagResource and StringLike on DeleteAccessPoint are left as they are to keep this PR to added actions only.

iam_test.go renders a service account with all well-known policies but only asserts the Load Balancer Controller document. This PR adds the same assertion for PolicyEFSCSIController, so the rendered EFS policy is now pinned by a test.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
    • Not needed: the userdocs do not list the policy's actions.
  • Manually tested
    • Not deployed to a cluster. go test ./pkg/cfn/builder/ passes with the change; the new assertion fails against the previous statements.
  • 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)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

…olicy

Add elasticfilesystem:DescribeMountTargets, ec2:DescribeAvailabilityZones and the s3files:* actions the driver requires for S3 Files support, and assert the rendered PolicyEFSCSIController document in iam_test.go.

Closes eksctl-io#8906

Signed-off-by: Siva sai krishna Suryadevara <83085232+SivaSaiKrishnaSuryadevara@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Sync efsCSIController well-known policy with the EFS CSI driver's example policy (S3 Files, DescribeMountTargets)

1 participant