Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ProviderConfig Controller #2792

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

panslava
Copy link
Contributor

/assign @gauravkghildiyal

This will be the very last to review

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: panslava

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 13, 2025
@panslava panslava force-pushed the multi-project-cluster-slice-controller branch 2 times, most recently from 8ca2383 to 64a3448 Compare January 13, 2025 20:14
@panslava
Copy link
Contributor Author

/retest

@panslava panslava force-pushed the multi-project-cluster-slice-controller branch from 64a3448 to 63b6cbe Compare January 13, 2025 20:32
@panslava
Copy link
Contributor Author

/retest

@panslava panslava force-pushed the multi-project-cluster-slice-controller branch 2 times, most recently from 0c861ed to fd75ee7 Compare January 15, 2025 20:37
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 15, 2025
- Introduced a new ProviderConfigController to track ProviderConfig resources and start NEG controllers.
- Added initialization and running the ProviderConfigController in multi-project mode in main.go.
@panslava panslava force-pushed the multi-project-cluster-slice-controller branch from fd75ee7 to 6fde296 Compare January 16, 2025 21:18
@panslava panslava force-pushed the multi-project-cluster-slice-controller branch from 6fde296 to 717f4c9 Compare January 16, 2025 21:20
@gauravkghildiyal
Copy link
Member

Thanks @panslava!

I'm yet to take a look, but glancing through: now that we've started making use of our libraries/packages, are there some useful unit / integration tests that we can add?

workersNum = 5
)

type ProviderConfigController struct {
Copy link
Member

Choose a reason for hiding this comment

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

Please add a detailed comment regarding what this Controller does and it's responsibilities. Let's also add a very brief comment for the package (which likely is very similar, but very small)

namer,
stopCh,
)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be checking for the incorrect error


const multiProjectLeaderElectionLockName = "ingress-gce-multi-project-lock"

func StartWithLeaderElection(
Copy link
Member

Choose a reason for hiding this comment

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

Please add comments for the public functions.

}
}

ctxConfig := ingresscontext.ControllerContextConfig{
Copy link
Member

Choose a reason for hiding this comment

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

ctxConfig doesn't seem to be getting used?


informersFactory := informers.NewSharedInformerFactoryWithOptions(kubeClient, ctxConfig.ResyncPeriod)

providerConfigInformer := providerconfiginformers.NewSharedInformerFactory(providerConfigClient, ctxConfig.ResyncPeriod).Flags().V1().ProviderConfigs().Informer()
Copy link
Member

Choose a reason for hiding this comment

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

Who starts this informer?

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants