-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: more Gateway API kind wrappers #16
Conversation
8c75a39
to
a314211
Compare
controller/topology_builder.go
Outdated
httpRoute, ok := obj.(*gwapiv1.HTTPRoute) | ||
if !ok { | ||
return nil, false | ||
} | ||
return httpRoute, true | ||
}) | ||
|
||
services := lo.FilterMap(lo.Values(objs[schema.GroupKind{Group: core.GroupName, Kind: "Service"}]), func(obj RuntimeObject, _ int) (*core.Service, bool) { | ||
services := lo.FilterMap(lo.Values(objs[machinery.ServiceGroupKind]), func(obj RuntimeObject, _ int) (*core.Service, bool) { |
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.
Let's also add the new types of resources here?
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 was originally thinking of just adding the new resource types to the machinary
package, and once we feel it is stable/usable enough, we'll add it here then 🤔
Although I don't feel strongly about this if you prefer them to be added here also. Let me know 👍
There seems to a failing unit test that I'll look into, for some reason the same test is passing locally but failing on the CI now 🤷 |
a314211
to
2326be8
Compare
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
Signed-off-by: KevFan <[email protected]>
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.
Left a minor suggestion only for completeness, but excellent work overall. Thanks!
Signed-off-by: KevFan <[email protected]>
Description
Closes: #11
Adds wrappers the the following so they can be used in the topology as targetable / object / policy:
gateway.networking.k8s.io/v1
GRPCRoute
(targetable)gateway.networking.k8s.io/v1beta1
ReferenceGrant
(object)gateway.networking.k8s.io/v1alpha3
BackendTLSPolicy
(policy)gateway.networking.k8s.io/v1alpha2
TCPRoute
(targetable)TLSRoute
(targetable)UDPRoute
(targetable)BackendLBPolicy
(policy)v1 (core)
Namespace
(targetable)Additionally adds the
LinkFunc
's for the newxRoute
kinds from above as part of the Gateway API Topologycontroller/topology_builder
for now, unless we want to enable these already as part of the controller package?Namespace
as a targetable in the topolgy was not added as part of this PR as this seems not as straightforward which might require some deeper considerations such as:Namespace
be also a parent toGateway
sinceGateway
is namespace scoped? (i.e.Gateway
will have bothGatewayClass
andNamespace
as parents ). Who will take precedence in this case?Namespace
can be a parent of whatever the resource in its namespace which are also targetable, does this matter? i.e. a Route in a namespace may not have a Gateway since a Route can use a Gateway from a different namespace as a parent reference