Skip to content

Commit b17618a

Browse files
asaubertklauser
authored andcommitted
gatewayapi: add listenersets to sysdump
Signed-off-by: Andrew Sauber <andrew.sauber@isovalent.com>
1 parent 405a129 commit b17618a

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

cilium-cli/sysdump/constants.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const (
116116
timestampPlaceholderFileName = "<ts>"
117117
gatewayClassesFileName = "gatewayapi-gatewayclasses-<ts>.yaml"
118118
gatewaysFileName = "gatewayapi-gateways-<ts>.yaml"
119+
listenerSetsFileName = "gatewayapi-listenersets-<ts>.yaml"
119120
httpRoutesFileName = "gatewayapi-httproutes-<ts>.yaml"
120121
tlsRoutesFileName = "gatewayapi-tlsroutes-<ts>.yaml"
121122
grpcRoutesFileName = "gatewayapi-grpcroutes-<ts>.yaml"
@@ -187,6 +188,12 @@ var (
187188
Version: "v1",
188189
}
189190

191+
listenerSet = schema.GroupVersionResource{
192+
Group: "gateway.networking.k8s.io",
193+
Resource: "listenersets",
194+
Version: "v1",
195+
}
196+
190197
referenceGrant = schema.GroupVersionResource{
191198
Group: "gateway.networking.k8s.io",
192199
Resource: "referencegrants",

cilium-cli/sysdump/sysdump.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,21 @@ func (c *Collector) getGatewayAPITasks() []Task {
21322132
return nil
21332133
},
21342134
},
2135+
{
2136+
Description: "Collecting ListenerSet entries",
2137+
Quick: true,
2138+
Task: func(ctx context.Context) error {
2139+
n := corev1.NamespaceAll
2140+
v, err := c.Client.ListUnstructured(ctx, listenerSet, &n, metav1.ListOptions{})
2141+
if err != nil {
2142+
return fmt.Errorf("failed to collect ListenerSet entries: %w", err)
2143+
}
2144+
if err := c.WriteYAML(listenerSetsFileName, v); err != nil {
2145+
return fmt.Errorf("failed to collect ListenerSet entries: %w", err)
2146+
}
2147+
return nil
2148+
},
2149+
},
21352150
{
21362151
Description: "Collecting ReferenceGrant entries",
21372152
Quick: true,

0 commit comments

Comments
 (0)