Skip to content

Commit 393d2ee

Browse files
committed
feat(gateway): report a GatewayClass that does not serve TLSRoute
A GatewayClass lists the features it serves in status.supportedFeatures, and TLS passthrough is TLSRoute. On a class that leaves it out the passthrough listeners are accepted and serve nothing, so the TenantGateway now reads Ready=False/GatewayClassUnsupported naming the class instead of Ready. A class that lists no features at all is not judged: implementations predating the field leave it empty. The class writes that list after it is accepted and may change it when its controller is upgraded, so a GatewayClass event requeues the TenantGateways on it. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent 8bb3672 commit 393d2ee

8 files changed

Lines changed: 267 additions & 8 deletions

File tree

‎docs/gateway-classes.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Nothing in this mechanism checks that a class name corresponds to a `GatewayClas
101101
- **A misspelled name in `edgeTerminatedClasses`.** It matches no class, so edge mode never engages for it and nothing says so. A tenant whose TLS really is terminated upstream stays in whichever mode the solver and wildcard-secret settings select, and its Gateway keeps terminating TLS itself.
102102
- **A class removed from `tenantSelectableClasses` while a tenant still names it.** That tenant's gateway release starts failing to render. Other tenants are unaffected.
103103
- **`className` changed while a tenant pins the outgoing name.** The allowed set is the *current* default plus `tenantSelectableClasses`, so the pin stops being valid and that tenant's gateway release fails. Add the outgoing class to `tenantSelectableClasses` before changing the default, or update the tenant first.
104+
- **A class whose `status.supportedFeatures` lists features but not `TLSRoute`.** A tenant Gateway that renders TLS-passthrough listeners on it reads `Ready=False` with reason `GatewayClassUnsupported`, naming the class, because nothing would serve those listeners. A class that lists no features at all is not judged, since implementations predating the field leave it empty.
104105
- **The publishing tenant selecting a class that terminates TLS differently from `className`.** Refused at render time, in both directions. The cluster-wide ACME `ClusterIssuer`s point their HTTP-01 solver at the publishing tenant's Gateway, and whether that solver pins `sectionName: http` is decided from `gateway.className` alone — a tenant's own choice does not travel on that channel. A publishing tenant that moved itself onto an edge class would keep a solver pinned to the `http` listener its Gateway no longer renders, and every HTTP-01 certificate in the cluster would stop issuing with nothing in any status naming the cause. Change `gateway.className` instead. The publishing tenant is the namespace named by `publishing.ingressName`, `tenant-root` by default.
105106
- **A comma or a non-string entry in either list.** The platform chart fails to render, naming the entry.
106107

‎internal/controller/tenantgateway/mapper.go‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,28 @@ func (r *Reconciler) mapRouteToTenantGateways(ctx context.Context, obj client.Ob
8787
return out
8888
}
8989

90+
// mapGatewayClassToTenantGateways requeues the TenantGateways on a
91+
// class, because GatewayClassUnsupported is judged from the class's
92+
// status.supportedFeatures, which a class writes after it is accepted
93+
// and may change on an upgrade of its controller, with nothing on the
94+
// TenantGateway changing.
95+
func (r *Reconciler) mapGatewayClassToTenantGateways(ctx context.Context, obj client.Object) []reconcile.Request {
96+
list := &gatewayv1alpha1.TenantGatewayList{}
97+
if err := r.List(ctx, list); err != nil {
98+
log.FromContext(ctx).Error(err, "list TenantGateways for GatewayClass mapper")
99+
return nil
100+
}
101+
var out []reconcile.Request
102+
for i := range list.Items {
103+
tgw := &list.Items[i]
104+
if gatewayClassName(tgw) != obj.GetName() {
105+
continue
106+
}
107+
out = append(out, reconcile.Request{NamespacedName: types.NamespacedName{Namespace: tgw.Namespace, Name: tgw.Name}})
108+
}
109+
return out
110+
}
111+
90112
// backendToTenantGateways returns an EventHandler that maps a Service
91113
// or ReferenceGrant change back to the TenantGateways whose withdrawal
92114
// decision it can flip.

‎internal/controller/tenantgateway/mapper_test.go‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package tenantgateway
1818

1919
import (
2020
"context"
21+
"slices"
2122
"testing"
2223

2324
corev1 "k8s.io/api/core/v1"
@@ -305,3 +306,38 @@ func TestServiceExistenceChanged(t *testing.T) {
305306
t.Error("a Service update must not reach the mapper; nothing here reads a Service beyond its existence")
306307
}
307308
}
309+
310+
// TestMapGatewayClassToTenantGateways pins that a GatewayClass event
311+
// requeues exactly the TenantGateways on that class, the unset class
312+
// counting as cilium: GatewayClassUnsupported is read off the class's
313+
// status, so without the requeue a class that fills in or extends
314+
// supportedFeatures leaves Ready where an earlier pass put it.
315+
func TestMapGatewayClassToTenantGateways(t *testing.T) {
316+
s := newScheme(t)
317+
tgw := func(ns, class string) *gatewayv1alpha1.TenantGateway {
318+
return &gatewayv1alpha1.TenantGateway{
319+
ObjectMeta: metav1.ObjectMeta{Name: "cozystack", Namespace: ns},
320+
Spec: gatewayv1alpha1.TenantGatewaySpec{Apex: ns + ".example.com", GatewayClassName: class},
321+
}
322+
}
323+
c := fake.NewClientBuilder().WithScheme(s).WithObjects(tgw("tenant-a", "other"), tgw("tenant-b", ""), tgw("tenant-c", "cilium")).Build()
324+
r := &Reconciler{Client: c, Scheme: s}
325+
326+
for _, tc := range []struct {
327+
class string
328+
want []string
329+
}{
330+
{"other", []string{"tenant-a"}},
331+
{"cilium", []string{"tenant-b", "tenant-c"}},
332+
{"unused", nil},
333+
} {
334+
reqs := r.mapGatewayClassToTenantGateways(context.TODO(), &gatewayv1.GatewayClass{ObjectMeta: metav1.ObjectMeta{Name: tc.class}})
335+
var got []string
336+
for _, req := range reqs {
337+
got = append(got, req.Namespace)
338+
}
339+
if !slices.Equal(got, tc.want) {
340+
t.Errorf("class %s requeued %v, want %v", tc.class, got, tc.want)
341+
}
342+
}
343+
}

‎internal/controller/tenantgateway/rbac_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ func TestShippedClusterRoleNamesEveryTypeThisControllerReads(t *testing.T) {
6262
{"gateway.networking.k8s.io", "httproutes"},
6363
{"gateway.networking.k8s.io", "tlsroutes"},
6464
{"gateway.networking.k8s.io", "referencegrants"},
65+
{"gateway.networking.k8s.io", "gatewayclasses"},
6566
{"cert-manager.io", "certificates"},
6667
{"cert-manager.io", "issuers"},
6768
{"", "namespaces"},

‎internal/controller/tenantgateway/reconciler.go‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import (
4646
"sigs.k8s.io/controller-runtime/pkg/builder"
4747
"sigs.k8s.io/controller-runtime/pkg/client"
4848
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
49+
"sigs.k8s.io/controller-runtime/pkg/handler"
4950
"sigs.k8s.io/controller-runtime/pkg/log"
5051
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1"
5152
gatewayv1alpha2 "sigs.k8s.io/gateway-api/apis/v1alpha2"
@@ -113,6 +114,13 @@ func renderedPassthroughServices(tgw *gatewayv1alpha1.TenantGateway) []string {
113114
return tgw.Spec.TLSPassthroughServices
114115
}
115116

117+
func gatewayClassName(tgw *gatewayv1alpha1.TenantGateway) string {
118+
if tgw.Spec.GatewayClassName == "" {
119+
return "cilium"
120+
}
121+
return tgw.Spec.GatewayClassName
122+
}
123+
116124
// gatewayIssuerName returns the per-tenant ACME Issuer name. The
117125
// Issuer lives in the same namespace as the TenantGateway and is
118126
// referenced by every Certificate this controller renders.
@@ -131,6 +139,7 @@ const (
131139
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways;httproutes;tlsroutes,verbs=get;list;watch;create;update;patch;delete
132140
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gateways/status;httproutes/status;tlsroutes/status,verbs=get;update;patch
133141
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=referencegrants,verbs=get;list;watch
142+
// +kubebuilder:rbac:groups=gateway.networking.k8s.io,resources=gatewayclasses,verbs=get;list;watch
134143
// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch
135144
// +kubebuilder:rbac:groups=cert-manager.io,resources=certificates;issuers,verbs=get;list;watch;create;update;patch;delete
136145

@@ -1753,10 +1762,7 @@ func (r *Reconciler) renderGateway(tgw *gatewayv1alpha1.TenantGateway, dynHostna
17531762
})
17541763
}
17551764

1756-
className := tgw.Spec.GatewayClassName
1757-
if className == "" {
1758-
className = "cilium"
1759-
}
1765+
className := gatewayClassName(tgw)
17601766

17611767
// Gateway API caps spec.listeners at 64 and rejects the object
17621768
// wholesale past that — every app's HTTPS listener included. No
@@ -1791,9 +1797,6 @@ func (r *Reconciler) renderGateway(tgw *gatewayv1alpha1.TenantGateway, dynHostna
17911797
return gw, nil
17921798
}
17931799

1794-
// SetupWithManager wires the Reconciler into the controller manager
1795-
// with For (TenantGateway as primary), Owns (Gateway and Certificate
1796-
// as owned children), and Watches against HTTPRoute and TLSRoute so
17971800
// collectInheritingChildApexes returns the deduplicated, sorted
17981801
// list of apex hostnames from tenant namespaces that inherit this
17991802
// Gateway's publishing layer. A namespace counts as inheriting when
@@ -1926,12 +1929,17 @@ func (r *Reconciler) stripNamespaceGatewayLabel(ctx context.Context, name string
19261929
return r.Patch(ctx, ns, client.MergeFrom(before))
19271930
}
19281931

1932+
// SetupWithManager wires the Reconciler into the controller manager
1933+
// with For (TenantGateway as primary), Owns (Gateway and Certificate
1934+
// as owned children), Watches against HTTPRoute and TLSRoute so
19291935
// route additions in attached namespaces re-trigger reconciliation
19301936
// of the parent TenantGateway, and so do the objects a TLSRoute's
19311937
// backendRef resolves through: a route that forwards nowhere leaves
19321938
// the terminate listener standing, so the Service appearing — or the
19331939
// ReferenceGrant that admits a cross-namespace reference — is what
1934-
// lands the withdrawal that was deferred.
1940+
// lands the withdrawal that was deferred. A Watch against GatewayClass
1941+
// lets a class that changes its supportedFeatures re-judge the
1942+
// TenantGateways on it.
19351943
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
19361944
return ctrl.NewControllerManagedBy(mgr).
19371945
Named("tenantgateway-controller").
@@ -1957,5 +1965,9 @@ func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error {
19571965
&gatewayv1beta1.ReferenceGrant{},
19581966
r.backendToTenantGateways(),
19591967
).
1968+
Watches(
1969+
&gatewayv1.GatewayClass{},
1970+
handler.EnqueueRequestsFromMapFunc(r.mapGatewayClassToTenantGateways),
1971+
).
19601972
Complete(r)
19611973
}

‎internal/controller/tenantgateway/reconciler_test.go‎

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11200,3 +11200,146 @@ func TestReconcile_PlainServedRouteHoldsTheNameInEveryRecount(t *testing.T) {
1120011200
})
1120111201
}
1120211202
}
11203+
11204+
// programGateway writes the status a Gateway controller writes once it
11205+
// has accepted and programmed the Gateway and every listener.
11206+
func programGateway(t *testing.T, c client.Client, key types.NamespacedName) {
11207+
t.Helper()
11208+
gw := &gatewayv1.Gateway{}
11209+
if err := c.Get(context.TODO(), key, gw); err != nil {
11210+
t.Fatalf("get Gateway %s: %v", key, err)
11211+
}
11212+
ok := func(typ string) metav1.Condition {
11213+
return metav1.Condition{Type: typ, Status: metav1.ConditionTrue, Reason: typ, LastTransitionTime: metav1.Now()}
11214+
}
11215+
gw.Status.Conditions = []metav1.Condition{ok("Accepted"), ok("Programmed")}
11216+
gw.Status.Listeners = nil
11217+
for _, l := range gw.Spec.Listeners {
11218+
gw.Status.Listeners = append(gw.Status.Listeners, gatewayv1.ListenerStatus{
11219+
Name: l.Name,
11220+
Conditions: []metav1.Condition{ok("Accepted"), ok("Programmed")},
11221+
SupportedKinds: []gatewayv1.RouteGroupKind{},
11222+
})
11223+
}
11224+
if err := c.Status().Update(context.TODO(), gw); err != nil {
11225+
t.Fatalf("program Gateway %s: %v", key, err)
11226+
}
11227+
}
11228+
11229+
func readyCondition(t *testing.T, c client.Client, key types.NamespacedName) *metav1.Condition {
11230+
t.Helper()
11231+
got := &gatewayv1alpha1.TenantGateway{}
11232+
if err := c.Get(context.TODO(), key, got); err != nil {
11233+
t.Fatalf("get TenantGateway: %v", err)
11234+
}
11235+
for i := range got.Status.Conditions {
11236+
if got.Status.Conditions[i].Type == "Ready" {
11237+
return &got.Status.Conditions[i]
11238+
}
11239+
}
11240+
t.Fatalf("no Ready condition on %+v", got.Status)
11241+
return nil
11242+
}
11243+
11244+
// TestReconcile_ReadyNamesAClassThatCannotServePassthrough pins the
11245+
// portability contract: a GatewayClass declares what it supports in
11246+
// status.supportedFeatures, and a TenantGateway rendering passthrough
11247+
// listeners on one that lacks TLSRoute reports it rather than reading
11248+
// Ready on listeners nothing will serve. A class that declares nothing
11249+
// is not judged, since older implementations do not fill the field in.
11250+
func TestReconcile_ReadyNamesAClassThatCannotServePassthrough(t *testing.T) {
11251+
apiListener := []gatewayv1alpha1.TLSPassthroughListener{{Name: "api", Port: 6443, Hostname: "api.foo.example.com"}}
11252+
noTLSRoute := []gatewayv1.FeatureName{"Gateway", "HTTPRoute"}
11253+
for _, tc := range []struct {
11254+
name string
11255+
features []gatewayv1.FeatureName
11256+
mode gatewayv1alpha1.CertMode
11257+
services []string
11258+
listeners []gatewayv1alpha1.TLSPassthroughListener
11259+
noClass bool
11260+
wantClass bool
11261+
}{
11262+
{"class without TLSRoute, passthrough listener", noTLSRoute, gatewayv1alpha1.CertModeHTTP01, nil, apiListener, false, true},
11263+
{"class without TLSRoute, passthrough services", noTLSRoute, gatewayv1alpha1.CertModeHTTP01, []string{"api"}, nil, false, true},
11264+
{"class with TLSRoute", []gatewayv1.FeatureName{"Gateway", "HTTPRoute", "TLSRoute"}, gatewayv1alpha1.CertModeHTTP01, []string{"vm-exportproxy"}, apiListener, false, false},
11265+
{"class declaring nothing", nil, gatewayv1alpha1.CertModeHTTP01, []string{"vm-exportproxy"}, apiListener, false, false},
11266+
{"class without TLSRoute, no passthrough", noTLSRoute, gatewayv1alpha1.CertModeHTTP01, nil, nil, false, false},
11267+
// edge renders no passthrough listener, so the class has nothing
11268+
// it could fail to serve.
11269+
{"class without TLSRoute, edge", noTLSRoute, gatewayv1alpha1.CertModeEdge, []string{"api"}, nil, false, false},
11270+
// A class that does not exist is a misspelled name, which shows
11271+
// as GatewayNotAccepted rather than as a missing feature.
11272+
{"no such class", nil, gatewayv1alpha1.CertModeHTTP01, nil, apiListener, true, false},
11273+
} {
11274+
t.Run(tc.name, func(t *testing.T) {
11275+
s := newScheme(t)
11276+
tgw := &gatewayv1alpha1.TenantGateway{
11277+
ObjectMeta: metav1.ObjectMeta{Name: "cozystack", Namespace: "tenant-foo"},
11278+
Spec: gatewayv1alpha1.TenantGatewaySpec{
11279+
Apex: "foo.example.com",
11280+
CertMode: tc.mode,
11281+
GatewayClassName: "other",
11282+
TLSPassthroughServices: tc.services,
11283+
TLSPassthroughListeners: tc.listeners,
11284+
},
11285+
}
11286+
class := &gatewayv1.GatewayClass{
11287+
ObjectMeta: metav1.ObjectMeta{Name: "other"},
11288+
Spec: gatewayv1.GatewayClassSpec{ControllerName: "example.com/other"},
11289+
}
11290+
for _, f := range tc.features {
11291+
class.Status.SupportedFeatures = append(class.Status.SupportedFeatures, gatewayv1.SupportedFeature{Name: f})
11292+
}
11293+
objs := []client.Object{tgw}
11294+
if !tc.noClass {
11295+
objs = append(objs, class)
11296+
}
11297+
c := fake.NewClientBuilder().WithScheme(s).WithObjects(objs...).WithStatusSubresource(tgw, &gatewayv1.Gateway{}).Build()
11298+
r := &Reconciler{Client: c, Scheme: s}
11299+
key := types.NamespacedName{Name: "cozystack", Namespace: "tenant-foo"}
11300+
if _, err := r.Reconcile(context.TODO(), ctrl.Request{NamespacedName: key}); err != nil {
11301+
t.Fatalf("first reconcile: %v", err)
11302+
}
11303+
programGateway(t, c, key)
11304+
if _, err := r.Reconcile(context.TODO(), ctrl.Request{NamespacedName: key}); err != nil {
11305+
t.Fatalf("second reconcile: %v", err)
11306+
}
11307+
ready := readyCondition(t, c, key)
11308+
if got := ready.Reason == "GatewayClassUnsupported"; got != tc.wantClass {
11309+
t.Errorf("Ready=%s reason=%s (%s), want the class refusal: %v", ready.Status, ready.Reason, ready.Message, tc.wantClass)
11310+
}
11311+
if tc.wantClass && (ready.Status != metav1.ConditionFalse || !strings.Contains(ready.Message, "TLSRoute") || !strings.Contains(ready.Message, "other")) {
11312+
t.Errorf("refusal must be Ready=False naming the class and the feature: %+v", ready)
11313+
}
11314+
})
11315+
}
11316+
}
11317+
11318+
// TestClassLacksTLSRoute_GetErrorFailsTheReconcile pins that a failed
11319+
// GatewayClass read is returned rather than read as "not judged": a
11320+
// transient API error must not turn into a Ready verdict.
11321+
func TestClassLacksTLSRoute_GetErrorFailsTheReconcile(t *testing.T) {
11322+
s := newScheme(t)
11323+
tgw := &gatewayv1alpha1.TenantGateway{
11324+
ObjectMeta: metav1.ObjectMeta{Name: "cozystack", Namespace: "tenant-foo"},
11325+
Spec: gatewayv1alpha1.TenantGatewaySpec{
11326+
Apex: "foo.example.com",
11327+
CertMode: gatewayv1alpha1.CertModeHTTP01,
11328+
TLSPassthroughServices: []string{"api"},
11329+
},
11330+
}
11331+
c := fake.NewClientBuilder().WithScheme(s).
11332+
WithInterceptorFuncs(interceptor.Funcs{
11333+
Get: func(ctx context.Context, cl client.WithWatch, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
11334+
if _, isClass := obj.(*gatewayv1.GatewayClass); isClass {
11335+
return errors.New("apiserver unavailable")
11336+
}
11337+
return cl.Get(ctx, key, obj, opts...)
11338+
},
11339+
}).
11340+
Build()
11341+
r := &Reconciler{Client: c, Scheme: s}
11342+
if _, err := r.classLacksTLSRoute(context.TODO(), tgw); err == nil {
11343+
t.Fatal("classLacksTLSRoute swallowed a failed GatewayClass read")
11344+
}
11345+
}

‎internal/controller/tenantgateway/status.go‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ package tenantgateway
1919
import (
2020
"context"
2121
"fmt"
22+
"slices"
2223

24+
apierrors "k8s.io/apimachinery/pkg/api/errors"
2325
"k8s.io/apimachinery/pkg/api/meta"
2426
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2527
"k8s.io/apimachinery/pkg/types"
@@ -64,8 +66,21 @@ func (r *Reconciler) reconcileStatus(ctx context.Context, tgw *gatewayv1alpha1.T
6466

6567
gwAccepted, gwProgrammed := gatewayConditionStatus(gw.Status.Conditions)
6668

69+
unsupported, err := r.classLacksTLSRoute(ctx, tgw)
70+
if err != nil {
71+
return err
72+
}
73+
6774
var ready metav1.Condition
6875
switch {
76+
case unsupported:
77+
ready = metav1.Condition{
78+
Type: "Ready",
79+
Status: metav1.ConditionFalse,
80+
ObservedGeneration: tgw.Generation,
81+
Reason: "GatewayClassUnsupported",
82+
Message: fmt.Sprintf("GatewayClass %s does not list TLSRoute in status.supportedFeatures, so nothing serves the TLS-passthrough listeners this TenantGateway renders", gatewayClassName(tgw)),
83+
}
6984
case !gwAccepted:
7085
ready = metav1.Condition{
7186
Type: "Ready",
@@ -112,6 +127,30 @@ func (r *Reconciler) reconcileStatus(ctx context.Context, tgw *gatewayv1alpha1.T
112127
return r.Status().Update(ctx, tgw)
113128
}
114129

130+
// classLacksTLSRoute reports whether the spec renders TLS-passthrough
131+
// listeners on a GatewayClass that declares it does not serve TLSRoute.
132+
// A class that declares no features at all, or that does not exist, is
133+
// not judged: status.supportedFeatures is how a class says what it
134+
// serves, and implementations predating the field leave it empty.
135+
func (r *Reconciler) classLacksTLSRoute(ctx context.Context, tgw *gatewayv1alpha1.TenantGateway) (bool, error) {
136+
if len(renderedPassthroughServices(tgw)) == 0 && (len(tgw.Spec.TLSPassthroughListeners) == 0 || !rendersPassthroughListeners(tgw.Spec.CertMode)) {
137+
return false, nil
138+
}
139+
class := &gatewayv1.GatewayClass{}
140+
if err := r.Get(ctx, types.NamespacedName{Name: gatewayClassName(tgw)}, class); err != nil {
141+
if apierrors.IsNotFound(err) {
142+
return false, nil
143+
}
144+
return false, fmt.Errorf("get GatewayClass %s: %w", gatewayClassName(tgw), err)
145+
}
146+
if len(class.Status.SupportedFeatures) == 0 {
147+
return false, nil
148+
}
149+
return !slices.ContainsFunc(class.Status.SupportedFeatures, func(f gatewayv1.SupportedFeature) bool {
150+
return f.Name == "TLSRoute"
151+
}), nil
152+
}
153+
115154
// indexListenerStatus turns Gateway.Status.Listeners into a name→status
116155
// map for O(1) lookup per spec listener.
117156
func indexListenerStatus(in []gatewayv1.ListenerStatus) map[string]gatewayv1.ListenerStatus {

‎packages/system/cozystack-controller/templates/rbac.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ rules:
1919
- apiGroups: ["gateway.networking.k8s.io"]
2020
resources: ["referencegrants"]
2121
verbs: ["get", "list", "watch"]
22+
# Read-only, to report a class whose supportedFeatures leave out a
23+
# route kind the tenant Gateway renders listeners for.
24+
- apiGroups: ["gateway.networking.k8s.io"]
25+
resources: ["gatewayclasses"]
26+
verbs: ["get", "list", "watch"]
2227
- apiGroups: [""]
2328
resources: ["services"]
2429
verbs: ["get", "list", "watch"]

0 commit comments

Comments
 (0)