-
Notifications
You must be signed in to change notification settings - Fork 303
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
Add multiproject manager which will be responsible for starting and tracking controllers per ProviderConfig #2762
Conversation
2da2971
to
5a6457c
Compare
4ec70b4
to
e2a19f4
Compare
e2a19f4
to
0264293
Compare
pkg/multiproject/manager/manager.go
Outdated
} | ||
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
pkg/multiproject/manager/manager.go
Outdated
|
||
type ProviderConfigControllersManager struct { | ||
controllers map[string]*ControllerSet | ||
mu sync.Mutex |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done
0264293
to
ff66158
Compare
eee8537
to
2f1d13d
Compare
ready for rereview @gauravkghildiyal |
/lgtm |
2f1d13d
to
db1b624
Compare
8eefd79
to
8e9fa98
Compare
…racking controllers per ClusterSlice
8e9fa98
to
7b20d53
Compare
/lgtm |
/lgtm |
[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:
Approvers can indicate their approval by writing |
/unhold |
/assign @gauravkghildiyal
based on 3 previous prs