ROSAENG-906: Request AWS additional SQS permissions for ROSA Managed Policies (Spot Instance Support) - #2782
Conversation
|
@ratnam915: This pull request references ROSAENG-906 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
WalkthroughIAM policy statements are added to the HCP controller manager credentials policies in both standard AWS and FedRAMP GovCloud environments, granting permissions for SQS message deletion and receipt operations on resources tagged with ChangesNode Pool SQS Permissions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Please remove this change, FedRAMP uses the same managed policies from AWS, unsure why this file is here.
| ], | ||
| "Condition": { | ||
| "StringEquals": { | ||
| "aws:ResourceTag/red-hat": "true" |
There was a problem hiding this comment.
why red-hat resource tag versus the "aws:ResourceTag/red-hat-managed": "true" in this case ?
There was a problem hiding this comment.
@rafael-azevedo : The SQS queues for the spot termination handler are created by HyperShift at runtime specifically for the Node Termination Handler. The red-hat-managed tag is used for infrastructure resources (EC2 instances, security groups, network interfaces) that are created during cluster provisioning and managed as part of the cluster lifecycle.
The red-hat tag is already an established pattern in this same policy for non-infrastructure resources — see the ManagedKMSRestrictedResourceTag and CreateGrantRestricted statements which use aws:ResourceTag/red-hat: true for KMS keys. The SQS queues follow the same pattern since they are operator-managed resources, not cluster infrastructure.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rafael-azevedo, ratnam915 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@ratnam915: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
sqs:ReceiveMessageandsqs:DeleteMessagepermissions to theROSANodePoolManagementPolicy(openshift_hcp_capa_controller_manager_credentials_policy.json) for both commercial and FedRAMP partitions.aws:ResourceTag/red-hat: truecondition to restrict access to Red Hat-managed SQS queues only.Context
ROSA HCP is adding Spot instance support for NodePools. The AWS Node Termination Handler (NTH) needs to long-poll an SQS queue for EC2 spot interruption and rebalance recommendation events, and remove processed messages after acting on them. Without these permissions in the managed policy, the NTH deployment will fail to poll the SQS queue and spot interruption events will not be handled gracefully.
This MCC change is the source of truth for what gets submitted to AWS to publish a new version of
ROSANodePoolManagementPolicy. A companion HyperShift PR keeps the inline (dev/test) policies in sync.Test plan
sqs:DeleteMessage,sqs:ReceiveMessage) present in both variantsarn:aws:sqs, FedRAMP usesarn:aws-us-gov:sqsaws:ResourceTag/red-hat: true) present and identical in both variantsReferences
Summary by CodeRabbit