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
egressgw: use Resource[T] to consume CiliumEgressGatewayPolicy #26960
Conversation
/test |
7bf967e
to
38b1d6e
Compare
/test-runtime |
/privileged |
/test |
3512bd7
to
1c7b154
Compare
/test |
da30942
to
8095e86
Compare
/test |
/ci-e2e |
/ci-e2e |
/ci-e2e |
/ci-e2e |
/ci-e2e |
/test |
} | ||
} | ||
|
||
func (manager *Manager) handlePolicyEvent(event resource.Event[*Policy]) { |
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: this looks like it could just be merged into the above function.
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 split it out since processEvents
is going to get more complicated as we migrate away from the monolithic k8s watchers. AFAIK we'll add at least Endpoint and Node. So I'd prefer to keep them split.
Don't rely on hive to construct a Manager, it's more trouble than it's worth. Instead create the necessary dependencies manually. This gives us much more control over which types are used for certain interfaces without having to fiddle with hive rules. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
The testsuite leaves around dummy interfaces if the test aborts for some reason. Use tb.Cleanup to avoid this behaviour. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Replace the copy pasta'd k8s watcher for CiliumEgressGatewayPolicy with resource.Resource. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
/test |
egressgw: manually construct Manager in tests
egressgw: use tb.Cleanup to tear down dummy interfaces
egressgw: use Resource[T] to consume CiliumEgressGatewayPolicy