Skip to content

Conversation

@feichashao
Copy link
Contributor

@feichashao feichashao commented Dec 17, 2025

What type of PR is this?

bug

What this PR does?

This PR adds the elasticloadbalancing:DeregisterTargets permission for the target groups with aws:ResourceTag/red-hat-managed.

Why we need it?

In ROSA HCP, we have seen some cases where the aws-cloud-controller-manager got 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:DeregisterTargets permission is required by aws-cloud-controller-manager as seen here https://github.com/kubernetes/cloud-provider-aws/blob/dc94f586f2c0b45a0b7083ed79d0ad46f31fa68c/pkg/providers/v1/aws_loadbalancer.go#L881

See 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:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "SREP1897",
            "Effect": "Allow",
            "Action": [
                "elasticloadbalancing:DeregisterTargets"
            ],
            "Resource": [
                "*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:ResourceTag/red-hat-managed": "true"
                }
            }
        }
    ]
}

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:

    matchExpressions:
    - key: api.openshift.com/fedramp
      operator: NotIn
      values: ["true"]

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2025

@feichashao: all tests passed!

Full PR test history. Your PR dashboard.

Details

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

@rafael-azevedo
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 22, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feichashao, rafael-azevedo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants