Skip to content

Conversation

@arghosh93
Copy link
Contributor

This PR is to stop adding Egress IP to public load balancer
backend pool regardless of presence of an OutBoundRule in any
Azure cluster.

This change comes with a consequence of no outbound connectivity
except to the infrastructure subnet even if there is no OutBoundRule.

However this is required to tackle following situation:

- If an infra node is being used as an egressNode then health
check for egress IP also succeeds when it is added to public load
balancer and LB considers it as a legitimate ingress router backend.

- Limits the number of egress IP which can be created on a cluster
due to some Azure specific limitation.

this PR also let cobtroller remove any egress IP
added to public load balancer backend pool previously.

@openshift-ci-robot openshift-ci-robot added jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 26, 2025
@openshift-ci-robot
Copy link

@arghosh93: This pull request references Jira Issue OCPBUGS-57447, which is invalid:

  • expected the bug to target the "4.21.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR is to stop adding Egress IP to public load balancer
backend pool regardless of presence of an OutBoundRule in any
Azure cluster.

This change comes with a consequence of no outbound connectivity
except to the infrastructure subnet even if there is no OutBoundRule.

However this is required to tackle following situation:

  • If an infra node is being used as an egressNode then health
    check for egress IP also succeeds when it is added to public load
    balancer and LB considers it as a legitimate ingress router backend.

  • Limits the number of egress IP which can be created on a cluster
    due to some Azure specific limitation.

this PR also let cobtroller remove any egress IP
added to public load balancer backend pool previously.

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.

@arghosh93
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 26, 2025
@openshift-ci-robot
Copy link

@arghosh93: This pull request references Jira Issue OCPBUGS-57447, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @huiran0826

In response to this:

/jira refresh

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.

@openshift-ci openshift-ci bot requested a review from huiran0826 September 26, 2025 11:19
@arghosh93 arghosh93 changed the title OCPBUGS-57447: Refrain from adding Egress IP to public LB backend pool OCPBUGS-57447,OCPBUGS-45056: Refrain from adding Egress IP to public LB backend pool Sep 26, 2025
@openshift-ci-robot openshift-ci-robot added jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. and removed jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. labels Sep 26, 2025
@openshift-ci-robot
Copy link

@arghosh93: This pull request references Jira Issue OCPBUGS-57447, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @huiran0826

The bug has been updated to refer to the pull request using the external bug tracker.

This pull request references Jira Issue OCPBUGS-45056, which is invalid:

  • expected the bug to target either version "4.21." or "openshift-4.21.", but it targets "4.20.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

This PR is to stop adding Egress IP to public load balancer
backend pool regardless of presence of an OutBoundRule in any
Azure cluster.

This change comes with a consequence of no outbound connectivity
except to the infrastructure subnet even if there is no OutBoundRule.

However this is required to tackle following situation:

  • If an infra node is being used as an egressNode then health
    check for egress IP also succeeds when it is added to public load
    balancer and LB considers it as a legitimate ingress router backend.

  • Limits the number of egress IP which can be created on a cluster
    due to some Azure specific limitation.

this PR also let cobtroller remove any egress IP
added to public load balancer backend pool previously.

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.

@arghosh93
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 26, 2025
@openshift-ci-robot
Copy link

@arghosh93: This pull request references Jira Issue OCPBUGS-57447, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact:
/cc @huiran0826

This pull request references Jira Issue OCPBUGS-45056, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.21.0) matches configured target version for branch (4.21.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, POST)

No GitHub users were found matching the public email listed for the QA contact in Jira ([email protected]), skipping review request.

In response to this:

/jira refresh

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.

Copy link
Member

@arkadeepsen arkadeepsen left a comment

Choose a reason for hiding this comment

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

Do we have any tests which can be used to verify the changes made in this PR will correctly solve the issue?

@arghosh93
Copy link
Contributor Author

Do we have any tests which can be used to verify the changes made in this PR will correctly solve the issue?

We lack knowledge of API of different cloud providers to fake it. That is the main reason behind not having enough unit tests.

@pperiyasamy
Copy link
Member

@arghosh93 Does this PR introduce any limitations on pod egress traffic? From my understanding, if we skip adding the EgressIP to the load balancer backend pools, the egress traffic will be restricted to the infra subnet. Is that correct?

@arghosh93
Copy link
Contributor Author

@arghosh93 Does this PR introduce any limitations on pod egress traffic? From my understanding, if we skip adding the EgressIP to the load balancer backend pools, the egress traffic will be restricted to the infra subnet. Is that correct?

Yes @pperiyasamy , that is correct. The plan is to document this limitation along with a suggestion of using NAT gateway instead of a general purpose public load balancer. I am also gonna notify support team members so that everyone is well aware.

@pperiyasamy
Copy link
Member

pperiyasamy commented Oct 16, 2025

@arghosh93 Does this PR introduce any limitations on pod egress traffic? From my understanding, if we skip adding the EgressIP to the load balancer backend pools, the egress traffic will be restricted to the infra subnet. Is that correct?

Yes @pperiyasamy , that is correct. The plan is to document this limitation along with a suggestion of using NAT gateway instead of a general purpose public load balancer. I am also gonna notify support team members so that everyone is well aware.

Thanks @arghosh93 , If this is agreed by everyone, i'm fine with it. one comment on the sync function.

// backend pool regardless of the presence of an OutBoundRule.
// During upgrade this function removes any egress IP added to
// public load balancer backend pool previously.
func (a *Azure) SyncLBBackend(ip net.IP, node *corev1.Node) error {
Copy link
Member

Choose a reason for hiding this comment

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

have you tested this SyncLBBackend function with so many EIPs already in place ? because AFAIK Azure APIs are so slow and not sure how it works when you want to sync already existing IPs.
have you explored sync IPs belong to a node with single API call ? something similar to processing existing items (like this) before watching CloudPrivateIPConfig objects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have tested with around 10 egress IPs. I have not seen much delay. We can ask QE to test with more egress IPs. There is a slack thread where ARO team did some testing with this PR.
https://redhat-internal.slack.com/archives/C09G14XDR9B/p1759942816358369?thread_ts=1759848001.402299&cid=C09G14XDR9B
Egress IPs are queued separately and may be difficult to obtain all at once. This is also a one time thing and expected to be run mostly during the upgrade.
I do not anticipate it taking much time and going beyond the upgrade completion time.

Copy link
Member

Choose a reason for hiding this comment

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

let's wait for @kyrtapz opinion on this.

@pperiyasamy
Copy link
Member

/retest-required

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 30, 2025
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 6, 2025
This PR is to stop adding Egress IP to public load balancer
backend pool regardless of presence of an OutBoundRule in any
Azure cluster.

This change comes with a consequence of no outbound connectivity
except to the infrastructure subnet even if there is no OutBoundRule.

However this is required to tackle following situation:

- If an infra node is being used as an egressNode then health
check for egress IP also succeeds when it is added to public load
balancer and LB considers it as a legitimate ingress router backend.

- Limits the number of egress IP which can be created on a cluster
due to some Azure specific limitation.

Signed-off-by: Arnab Ghosh <[email protected]>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 7, 2025
@arghosh93 arghosh93 force-pushed the OCPBUGS-57447 branch 2 times, most recently from 1600d22 to bf35222 Compare November 7, 2025 08:25
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
pkg/controller/cloudprivateipconfig/cloudprivateipconfig_controller.go (1)

184-190: Treat missing nodes as a successful no-op.

If the assigned node has already been deleted, nodesLister.Get returns IsNotFound. We now bubble that up as an error, so this branch requeues forever for stale CloudPrivateIPConfigs during rollouts. Mirror the delete path: swallow IsNotFound (and a nil node) and skip SyncLBBackend, since there’s nothing left to clean. Only return real errors.

-	node, err := c.nodesLister.Get(cloudPrivateIPConfig.Spec.Node)
-	if err != nil {
-		return err
-	}
+	node, err := c.nodesLister.Get(cloudPrivateIPConfig.Spec.Node)
+	if apierrors.IsNotFound(err) || node == nil {
+		return nil
+	}
+	if err != nil {
+		return err
+	}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1600d22 and bf35222.

📒 Files selected for processing (7)
  • pkg/cloudprovider/aws.go (1 hunks)
  • pkg/cloudprovider/azure.go (10 hunks)
  • pkg/cloudprovider/cloudprovider.go (2 hunks)
  • pkg/cloudprovider/cloudprovider_fake.go (1 hunks)
  • pkg/cloudprovider/gcp.go (1 hunks)
  • pkg/cloudprovider/openstack.go (1 hunks)
  • pkg/controller/cloudprivateipconfig/cloudprivateipconfig_controller.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/cloudprovider/gcp.go
  • pkg/cloudprovider/aws.go
  • pkg/cloudprovider/cloudprovider.go
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/cloudprovider/cloudprovider_fake.go
  • pkg/controller/cloudprivateipconfig/cloudprivateipconfig_controller.go
  • pkg/cloudprovider/openstack.go
  • pkg/cloudprovider/azure.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
pkg/cloudprovider/openstack.go (1)

548-551: Fix typo in comment.

The comment contains a typo: "dont" should be "don't".

Apply this diff:

-	// We dont add Egress IP to OpenStack public LB backend; nothing to do
+	// We don't add Egress IP to OpenStack public LB backend; nothing to do
🧹 Nitpick comments (1)
pkg/cloudprovider/aws.go (1)

225-228: Fix typo in comment.

The comment contains a minor typo: "dont" should be "don't".

Apply this diff:

-	// We dont add Egress IP to AWS public LB backend; nothing to do
+	// We don't add Egress IP to AWS public LB backend; nothing to do
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between bf35222 and 335bd7a.

📒 Files selected for processing (7)
  • pkg/cloudprovider/aws.go (1 hunks)
  • pkg/cloudprovider/azure.go (10 hunks)
  • pkg/cloudprovider/cloudprovider.go (2 hunks)
  • pkg/cloudprovider/cloudprovider_fake.go (1 hunks)
  • pkg/cloudprovider/gcp.go (1 hunks)
  • pkg/cloudprovider/openstack.go (1 hunks)
  • pkg/controller/cloudprivateipconfig/cloudprivateipconfig_controller.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/cloudprovider/cloudprovider.go
  • pkg/cloudprovider/cloudprovider_fake.go
  • pkg/cloudprovider/gcp.go
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/cloudprovider/openstack.go
  • pkg/cloudprovider/azure.go
  • pkg/controller/cloudprivateipconfig/cloudprivateipconfig_controller.go
  • pkg/cloudprovider/aws.go

@arghosh93
Copy link
Contributor Author

/retest-required

@pperiyasamy
Copy link
Member

/payload 4.21 ci blocking
/payload 4.21 nightly blocking

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 11, 2025

@pperiyasamy: trigger 5 job(s) of type blocking for the ci release of OCP 4.21

  • periodic-ci-openshift-release-master-ci-4.21-upgrade-from-stable-4.20-e2e-aws-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.21-upgrade-from-stable-4.20-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.21-e2e-gcp-ovn-upgrade
  • periodic-ci-openshift-hypershift-release-4.21-periodics-e2e-aks
  • periodic-ci-openshift-hypershift-release-4.21-periodics-e2e-aws-ovn

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/30b57f60-bee3-11f0-9164-d0c4d8ab18a3-0

trigger 13 job(s) of type blocking for the nightly release of OCP 4.21

  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-upgrade-ovn-single-node
  • periodic-ci-openshift-release-master-nightly-4.21-e2e-aws-ovn-upgrade-fips
  • periodic-ci-openshift-release-master-ci-4.21-e2e-azure-ovn-upgrade
  • periodic-ci-openshift-release-master-ci-4.21-upgrade-from-stable-4.20-e2e-gcp-ovn-rt-upgrade
  • periodic-ci-openshift-hypershift-release-4.21-periodics-e2e-aws-ovn-conformance
  • periodic-ci-openshift-release-master-nightly-4.21-e2e-aws-ovn-serial-1of2
  • periodic-ci-openshift-release-master-nightly-4.21-e2e-aws-ovn-serial-2of2
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-1of3
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-2of3
  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview-serial-3of3
  • periodic-ci-openshift-release-master-nightly-4.21-e2e-metal-ipi-ovn-bm
  • periodic-ci-openshift-release-master-nightly-4.21-e2e-metal-ipi-ovn-ipv6

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/30b57f60-bee3-11f0-9164-d0c4d8ab18a3-1

@pperiyasamy
Copy link
Member

/lgtm

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

openshift-ci bot commented Nov 11, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: arghosh93, arkadeepsen, pperiyasamy

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

The pull request process is described here

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

@yingwang-0320
Copy link

/verified by pre-merge testing

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Nov 12, 2025
@openshift-ci-robot
Copy link

@yingwang-0320: This PR has been marked as verified by pre-merge testing.

In response to this:

/verified by pre-merge testing

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.

Copy link
Contributor

@kyrtapz kyrtapz left a comment

Choose a reason for hiding this comment

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

I have some suggestions but I really want to make sure that we have a solid doc plan for this change, what is the version you plan to backport this to?


// SyncLBBackend removes any egress IP which is already added to backend pool of
// a public load balancer. This is mostly Azure specific and may be removed later.
SyncLBBackend(ip net.IP, node *corev1.Node) error
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a very azure specific function...
And there is no point in running it for newly created EIPs that just got assigned right?
In my view this should be something that runs once, during startup, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To stop it running for newly created IPs, I have introduced lbBackendPoolSynced bool in Azure struct and setting it after running AssignPrivateIP. At the begining of SyncLBBackend function I am also checking if lbBackendPoolSynced is set or not. If set then I am returning instantly.
I agree that this is a Azure specific function but I thought it is unusual to run at main function.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wasn't talking about the main function. We already have a initCredentials interface method that is being ran from NewCloudProviderClient. We can add another method that would run once after the provided was configured and we could include that logic in there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about invoking a method from initCredentials so that we run SyncLBBackend once and only for Azure. But, Azure struct does not have cloudPrivateIPConfigLister. So, do you suggest to include cloudPrivateIPConfigLister to Azure struct and invoke a method from initCredentials which should list all EIPs and do changes for LB backend pool only once?

As per current implementation I do agree that there is chance of invoking SyncLBBackend multiple times for a single EIP but in Azure struct there is a map lbBackendPoolSynced which tracks if we have already synced backend pool for any egress IP or not and if it is already done then we return immediately from SyncLBBackend. So, I assume low impact.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's fine to pass the lister if it is required. I am even ok to put it in the initCredentials but if you end up doing that please rename it in a separate commit.

if err != nil {
return err
}
if err := c.cloudProviderClient.SyncLBBackend(ip, node); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this called from the node controller instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need cloudProviderClient to run this and that is available with CloudPrivateIPConfigController. Can you please explain if I misunderstood your point?

Copy link
Contributor

Choose a reason for hiding this comment

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

We are already using cloudProviderClient in the node controller:

nodeEgressIPConfigs, err := n.cloudProviderClient.GetNodeEgressIPConfiguration(node, cpicIPs)

but let's not run the sync on every update as per my previous comment.

ipConfigurations = append(ipConfigurations, newIPConfiguration)
networkInterface.Properties.IPConfigurations = ipConfigurations
// Send the request
klog.Warningf("Egress IP %s will have no outbound connectivity except for the infrastructure subnet: "+
Copy link
Contributor

Choose a reason for hiding this comment

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

As we have discussed in the past this has to have a proper docs in OCP. Is there a card created for it? Are you going to ensure this will be backported to all releases that this change will affect?
This also means that we are a going to significantly change behavior in a Z stream release for the backports so a release note is certainly required too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This issue can be seen from Openshift 4.18 , where the egress IP gets added to the interface of the assigned node. So, the current plan is to backport till 4.18.
I have asked @jab-rh to assign a doc contact for this Jira. As discussed earlier, I have plan to send an email to the support team so that they are aware.
I have set 'Release note type' as 'Removed functionality' in the jira ticket.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I think that this might be enough.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2025
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Nov 18, 2025
case nodeNameToAdd == "" && nodeNameToDel == "":
node, err := c.nodesLister.Get(cloudPrivateIPConfig.Spec.Node)
if err != nil && apierrors.IsNotFound(err) {
klog.Infof("Source node: %s no longer exists for CloudPrivateIPConfig: %q", cloudPrivateIPConfig.Spec.Node, key)
Copy link
Contributor

Choose a reason for hiding this comment

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

You still have to exit here? node is empty here

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
pkg/cloudprovider/cloudprovider.go (1)

141-175: Validate Azure informers are non-nil to avoid nil deref/panic.
cloudPrivateIPConfigInformer.Lister() / nodeInformer.Lister() will panic if callers pass nil (even accidentally) when PlatformType is Azure.

 func NewCloudProviderClient(cfg CloudProviderConfig,
 	platformStatus *configv1.PlatformStatus,
 	featureGates featuregates.FeatureGate,
 	cloudPrivateIPConfigInformer cloudnetworkinformers.CloudPrivateIPConfigInformer,
 	nodeInformer coreinformers.NodeInformer) (CloudProviderIntf, error) {
 	var cloudProviderIntf CloudProviderIntf
@@
 	switch cfg.PlatformType {
 	case PlatformTypeAzure:
+		if cloudPrivateIPConfigInformer == nil || nodeInformer == nil {
+			return nil, fmt.Errorf("azure requires CloudPrivateIPConfigInformer and NodeInformer")
+		}
 		var azurePlatformStatus *configv1.AzurePlatformStatus
 		if platformStatus != nil && platformStatus.Type == PlatformTypeAzure {
 			azurePlatformStatus = platformStatus.Azure
 		}
 
 		cloudProviderIntf = &Azure{
@@
 			lbBackendPoolSynced:          make(map[string]bool),
 			cloudPrivateIPConfigLister:   cloudPrivateIPConfigInformer.Lister(),
 			nodesLister:                  nodeInformer.Lister(),
 		}
🧹 Nitpick comments (1)
pkg/cloudprovider/openstack.go (1)

70-76: OpenStack.init() wrapper looks correct (minor simplification possible).
This aligns with the new CloudProviderIntf.init() flow.

Optional: the trailing return nil is redundant.

 func (o *OpenStack) init() error {
 	if err := o.initCredentials(); err != nil {
 		return err
 	}
-
-	return nil
+	return nil
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 6730d47 and ef0e716.

📒 Files selected for processing (8)
  • cmd/cloud-network-config-controller/main.go (1 hunks)
  • pkg/cloudprovider/aws.go (1 hunks)
  • pkg/cloudprovider/azure.go (10 hunks)
  • pkg/cloudprovider/cloudprovider.go (5 hunks)
  • pkg/cloudprovider/cloudprovider_fake.go (1 hunks)
  • pkg/cloudprovider/gcp.go (1 hunks)
  • pkg/cloudprovider/openstack.go (1 hunks)
  • pkg/controller/node/node_controller.go (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pkg/controller/node/node_controller.go
🚧 Files skipped from review as they are similar to previous changes (3)
  • pkg/cloudprovider/gcp.go
  • pkg/cloudprovider/cloudprovider_fake.go
  • pkg/cloudprovider/aws.go
🧰 Additional context used
📓 Path-based instructions (1)
**

⚙️ CodeRabbit configuration file

-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.

Files:

  • pkg/cloudprovider/openstack.go
  • pkg/cloudprovider/cloudprovider.go
  • cmd/cloud-network-config-controller/main.go
  • pkg/cloudprovider/azure.go
🧬 Code graph analysis (2)
cmd/cloud-network-config-controller/main.go (1)
pkg/cloudprovider/cloudprovider.go (1)
  • NewCloudProviderClient (141-193)
pkg/cloudprovider/azure.go (1)
pkg/cloudprivateipconfig/cloudprivateipconfig.go (1)
  • NameToIP (28-39)
🔇 Additional comments (1)
pkg/cloudprovider/cloudprovider.go (1)

141-193: Call site has been properly updated. The only NewCloudProviderClient() call in the codebase (cmd/cloud-network-config-controller/main.go:145-149) correctly passes all five required parameters matching the updated signature. No compilation issues remain.

The consensus is to not add egress IP to public load balancer
backend pool regardless of the presence of an OutBoundRule.
During upgrade this PR let cobtroller removes any egress IP
added to public load balancer backend pool previously.

Signed-off-by: Arnab Ghosh <[email protected]>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 12, 2025

@arghosh93: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openstack-ovn-serial-e2e-only c2b5065 link false /test e2e-openstack-ovn-serial-e2e-only
ci/prow/e2e-aws-ovn-serial c2b5065 link false /test e2e-aws-ovn-serial
ci/prow/hypershift-e2e-aks dac9638 link true /test hypershift-e2e-aks
ci/prow/security dac9638 link false /test security

Full PR test history. Your PR dashboard.

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.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/severity-critical Referenced Jira bug's severity is critical for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants