Skip to content

External-ccm: Add node scoped reconciliation - #544

Open
dghubble wants to merge 2 commits into
oracle:masterfrom
dghubble:dev/dghubble/node-scoped-reconciliation
Open

dghubble wants to merge 2 commits into
oracle:masterfrom
dghubble:dev/dghubble/node-scoped-reconciliation

Conversation

@dghubble

@dghubble dghubble commented Jul 28, 2026

Copy link
Copy Markdown

Summary

  • Add a --node-filter-requirements Kubernetes label selector that restricts node-scoped reconciliation to matching Nodes
  • Apply the selector to Kubernetes CCM controllers and OCI-specific Node informers while leaving non-Node resources unfiltered
  • Preserve the existing all-Nodes behavior when the selector is empty
  • Document the flag and selector syntax

Motivation

The OCI Cloud Controller Manager currently attempts to reconcile every Node in a cluster. This causes provider-specific operations to fail in hybrid clusters containing Nodes managed by other cloud providers. Node filtering lets operators define which Nodes the OCI CCM should manage.

Review fix

  • Ensure generic InformerFor calls return the canonical filtered Node informer
  • Add regression coverage for the order-sensitive shared informer cache bypass

Testing

  • go test ./pkg/cloudprovider/providers/oci -run 'TestNewNodeFilteredSharedInformerFactory' -count=1
  • go test ./pkg/cloudprovider/providers/oci -count=1

The CCM E2E suite was not run because a configured Kubernetes and OCI test cluster was not available.

* Add node label selector configuration for cloud controllers

* Filter OCI node informers without filtering other resources

* Document configuration and preserve all node behavior by default

Signed-off-by: Dalton Hubble <dghubble@gmail.com>
@oracle-contributor-agreement

Copy link
Copy Markdown

Thank you for your pull request and welcome to our community! To contribute, please sign the Oracle Contributor Agreement (OCA).
The following contributors of this PR have not signed the OCA:

To sign the OCA, please create an Oracle account and sign the OCA in Oracle's Contributor Agreement Application.

When signing the OCA, please provide your GitHub username. After signing the OCA and getting an OCA approval from Oracle, this PR will be automatically updated.

If you are an Oracle employee, please make sure that you are a member of the main Oracle GitHub organization, and your membership in this organization is public.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Required At least one contributor does not have an approved Oracle Contributor Agreement. label Jul 28, 2026

@l-technicore l-technicore left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for adding node-scoped reconciliation.

Testing requested

Could you please include the following in the PR description?

  • Manual test results, including the commands executed.
  • If possible, results from the CCM E2E suite using FOCUS='[ccm]'.

This would provide additional confidence that the filtering change does not regress the external CCM controllers.

Filtering bypass found during review

We found a filtering bypass through the generic InformerFor path. Although Node requests were delegated to nodeFactory, the caller-provided constructor was passed through unchanged. Such a constructor can create an unfiltered Node informer because WithTweakListOptions is only captured by the generated typed constructor.

Since informers are cached by resource type, calling this path first can also cause typed callers to reuse the unfiltered cache.

Proposed fix

I opened dghubble/oci-cloud-controller-manager#1 with the fix and regression coverage. It ensures all Node InformerFor calls return the canonical filtered informer.

@GouthamML

Copy link
Copy Markdown
Member

LGTM. will approve once the test results are shared and the aforementioned fix is in place

Signed-off-by: Lalit Singh <lalit.s.singh@oracle.com>
@dghubble

dghubble commented Sep 1, 2026

Copy link
Copy Markdown
Author

I've incorporated the suggested change and regression coverage. Inquiring with my company and yours about how to satisfy the CLA.

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

Labels

OCA Required At least one contributor does not have an approved Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants