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 multiproject manager which will be responsible for starting and tracking controllers per ProviderConfig #2762

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

panslava
Copy link
Contributor

@panslava panslava commented Dec 6, 2024

/assign @gauravkghildiyal

based on 3 previous prs

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 6, 2024
@panslava panslava force-pushed the multi-project-manager branch from 2da2971 to 5a6457c Compare December 9, 2024 19:53
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 9, 2024
@panslava panslava force-pushed the multi-project-manager branch 2 times, most recently from 4ec70b4 to e2a19f4 Compare December 9, 2024 22:52
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 13, 2024
@panslava panslava force-pushed the multi-project-manager branch from e2a19f4 to 0264293 Compare December 13, 2024 22:47
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Dec 13, 2024
}
negControllerStopCh, err := neg.StartNEGController(cscm.informersFactory, cscm.kubeClient, cscm.svcNegClient, cscm.eventRecorderClient, cscm.kubeSystemUID, cscm.clusterNamer, cscm.l4Namer, cscm.lpConfig, cscm.defaultCloudConfig, cscm.globalStopCh, cscm.logger, cs)
if err != nil {
return fmt.Errorf("failed to start NEG controller for project %s: %v", csKey, err)
Copy link
Member

Choose a reason for hiding this comment

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

IF the StartNEGController call fails, do we expect the caller of StartControllersForProviderConfig to trigger removal of finalizer?

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 think it's better to attempt cleaning finalizer inside this function in case of an error

Added this, thanks for the suggestion


type ProviderConfigControllersManager struct {
controllers map[string]*ControllerSet
mu sync.Mutex
Copy link
Member

Choose a reason for hiding this comment

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

nit: Let's use a mutex hat for the variables we want this mutex to control

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, done

@panslava panslava force-pushed the multi-project-manager branch from 0264293 to ff66158 Compare December 28, 2024 00:08
@panslava panslava changed the title Add multiproject manager which will be responsible for starting and tracking controllers per ClusterSlice Add multiproject manager which will be responsible for starting and tracking controllers per ProviderConfig Dec 28, 2024
@panslava panslava force-pushed the multi-project-manager branch 3 times, most recently from eee8537 to 2f1d13d Compare December 28, 2024 00:16
@panslava
Copy link
Contributor Author

ready for rereview @gauravkghildiyal

@gauravkghildiyal
Copy link
Member

/lgtm
/hold (for submitting parent PR. Will LGTM again once the other merges and we rebase)

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Jan 2, 2025
@panslava panslava force-pushed the multi-project-manager branch from 2f1d13d to db1b624 Compare January 3, 2025 00:36
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@panslava panslava force-pushed the multi-project-manager branch 2 times, most recently from 8eefd79 to 8e9fa98 Compare January 3, 2025 22:44
@panslava panslava force-pushed the multi-project-manager branch from 8e9fa98 to 7b20d53 Compare January 3, 2025 23:18
@gauravkghildiyal
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2025
@gauravkghildiyal
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 4, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauravkghildiyal, 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:
  • OWNERS [gauravkghildiyal,panslava]

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

@panslava
Copy link
Contributor Author

panslava commented Jan 6, 2025

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 6, 2025
@k8s-ci-robot k8s-ci-robot merged commit fa404a1 into kubernetes:master Jan 6, 2025
5 checks passed
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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