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

L4 controller references cache objects #2135

Closed
aojea opened this issue May 22, 2023 · 0 comments · Fixed by #2152
Closed

L4 controller references cache objects #2135

aojea opened this issue May 22, 2023 · 0 comments · Fixed by #2152
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@aojea
Copy link
Member

aojea commented May 22, 2023

It seems that the controller build new objects that reference the existing object of the cache, I don't understand well enough to know if this is on. purpose, but it is risky since the cache is shared and I find very brittle if this new object works on a reference to the cache, maybe is safer to deepcopy the Service

// Use the same function for both create and updates. If controller crashes and restarts,
// all existing services will show up as Service Adds.
l4ilbParams := &loadbalancers.L4ILBParams{
Service: service,
Cloud: l4c.ctx.Cloud,
Namer: l4c.namer,
Recorder: l4c.ctx.Recorder(service.Namespace),
DualStackEnabled: l4c.enableDualStack,
}

l4NetLBParams := &loadbalancers.L4NetLBParams{
Service: svc,
Cloud: lc.ctx.Cloud,
Namer: lc.namer,
Recorder: lc.ctx.Recorder(svc.Namespace),
DualStackEnabled: lc.enableDualStack,
}
l4netLB := loadbalancers.NewL4NetLB(l4NetLBParams)

/kind bug
/assign @cezarygerard @panslava

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants