SREP-1897 Add DeregisterTargets permission #2616
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
bug
What this PR does?
This PR adds the
elasticloadbalancing:DeregisterTargetspermission for the target groups withaws:ResourceTag/red-hat-managed.Why we need it?
In ROSA HCP, we have seen some cases where the
aws-cloud-controller-managergot permission denied when trying to reconcile target groups. The denied deregister blocking the controller to move on registering new instances to target groups, causing the ingress not able to provide service.The
elasticloadbalancing:DeregisterTargetspermission is required byaws-cloud-controller-manageras seen here https://github.com/kubernetes/cloud-provider-aws/blob/dc94f586f2c0b45a0b7083ed79d0ad46f31fa68c/pkg/providers/v1/aws_loadbalancer.go#L881See SREP-1897 for reproducing steps and more details.
Which Jira/Github issue(s) this PR fixes?
https://issues.redhat.com/browse/SREP-1897
Special notes for your reviewer:
Tested in a HCP cluster, by adding the below inline policy to the role
kube-system-kube-controller-manager:After adding this inline policy, the DeregisterTargets was allowed, and the target group reconciliation was unblocked.
Pre-checks (if applicable):
Tested latest changes against a cluster
Included documentation changes with PR
If this is a new object that is not intended for the FedRAMP environment (if unsure, please reach out to team FedRAMP), please exclude it with: