@@ -137,6 +137,7 @@ type Inputs struct {
137137 GRPCRoutes krt.Collection [* gatewayv1.GRPCRoute ]
138138 TCPRoutes krt.Collection [* gatewayalpha.TCPRoute ]
139139 TLSRoutes krt.Collection [* gatewayalpha.TLSRoute ]
140+ ListenerSets krt.Collection [* gatewayx.XListenerSet ]
140141 ReferenceGrants krt.Collection [* gateway.ReferenceGrant ]
141142 BackendTrafficPolicy krt.Collection [* gatewayx.XBackendTrafficPolicy ]
142143 BackendTLSPolicies krt.Collection [* gatewayalpha3.BackendTLSPolicy ]
@@ -200,12 +201,14 @@ func NewController(
200201 inputs .TLSRoutes = buildClient [* gatewayalpha.TLSRoute ](c , kc , gvr .TLSRoute , opts , "informer/TLSRoutes" )
201202 inputs .BackendTLSPolicies = buildClient [* gatewayalpha3.BackendTLSPolicy ](c , kc , gvr .BackendTLSPolicy , opts , "informer/BackendTLSPolicies" )
202203 inputs .BackendTrafficPolicy = buildClient [* gatewayx.XBackendTrafficPolicy ](c , kc , gvr .XBackendTrafficPolicy , opts , "informer/XBackendTrafficPolicy" )
204+ inputs .ListenerSets = buildClient [* gatewayx.XListenerSet ](c , kc , gvr .XListenerSet , opts , "informer/XListenerSet" )
203205 } else {
204206 // If disabled, still build a collection but make it always empty
205207 inputs .TCPRoutes = krt .NewStaticCollection [* gatewayalpha.TCPRoute ](nil , nil , opts .WithName ("disable/TCPRoutes" )... )
206208 inputs .TLSRoutes = krt .NewStaticCollection [* gatewayalpha.TLSRoute ](nil , nil , opts .WithName ("disable/TLSRoutes" )... )
207209 inputs .BackendTLSPolicies = krt .NewStaticCollection [* gatewayalpha3.BackendTLSPolicy ](nil , nil , opts .WithName ("disable/BackendTLSPolicies" )... )
208210 inputs .BackendTrafficPolicy = krt .NewStaticCollection [* gatewayx.XBackendTrafficPolicy ](nil , nil , opts .WithName ("disable/XBackendTrafficPolicy" )... )
211+ inputs .ListenerSets = krt .NewStaticCollection [* gatewayx.XListenerSet ](nil , nil , opts .WithName ("disable/XListenerSet" )... )
209212 }
210213
211214 references := NewReferenceSet (
@@ -220,6 +223,19 @@ func NewController(
220223 status .RegisterStatus (c .status , GatewayClassStatus , GetStatus )
221224
222225 ReferenceGrants := BuildReferenceGrants (ReferenceGrantsCollection (inputs .ReferenceGrants , opts ))
226+ ListenerSetStatus , ListenerSets := ListenerSetCollection (
227+ inputs .ListenerSets ,
228+ inputs .Gateways ,
229+ GatewayClasses ,
230+ inputs .Namespaces ,
231+ ReferenceGrants ,
232+ inputs .Secrets ,
233+ options .DomainSuffix ,
234+ c .gatewayContext ,
235+ c .tagWatcher ,
236+ opts ,
237+ )
238+ status .RegisterStatus (c .status , ListenerSetStatus , GetStatus )
223239
224240 DestinationRules := DestinationRuleCollection (
225241 inputs .BackendTrafficPolicy ,
@@ -234,6 +250,7 @@ func NewController(
234250 // Do not register yet.
235251 GatewaysStatus , Gateways := GatewayCollection (
236252 inputs .Gateways ,
253+ ListenerSets ,
237254 GatewayClasses ,
238255 inputs .Namespaces ,
239256 ReferenceGrants ,
@@ -475,8 +492,8 @@ func (c *Controller) HasSynced() bool {
475492 return true
476493}
477494
478- func (c * Controller ) SecretAllowed (resourceName string , namespace string ) bool {
479- return c .outputs .ReferenceGrants .SecretAllowed (nil , resourceName , namespace )
495+ func (c * Controller ) SecretAllowed (ourKind config. GroupVersionKind , resourceName string , namespace string ) bool {
496+ return c .outputs .ReferenceGrants .SecretAllowed (nil , ourKind , resourceName , namespace )
480497}
481498
482499func pushXds [T any ](xds model.XDSUpdater , f func (T ) model.ConfigKey ) func (events []krt.Event [T ]) {
0 commit comments