diff --git a/internal/gather/gather.go b/internal/gather/gather.go index 5a9a55a76..4e8c1188a 100644 --- a/internal/gather/gather.go +++ b/internal/gather/gather.go @@ -240,6 +240,7 @@ func gatherOperator(dataType string, info Info) bool { gatherGlobalnetDaemonSet(&info, info.OperatorNamespace()) gatherLighthouseAgentDeployment(&info, info.OperatorNamespace()) gatherLighthouseCoreDNSDeployment(&info, info.OperatorNamespace()) + gatherGatewayLBService(&info, info.OperatorNamespace()) default: return false } diff --git a/internal/gather/operator.go b/internal/gather/operator.go index 5afa3df8d..fdde707bf 100644 --- a/internal/gather/operator.go +++ b/internal/gather/operator.go @@ -44,6 +44,12 @@ func gatherGatewayDaemonSet(info *Info, namespace string) { gatherDaemonSet(info, namespace, metav1.ListOptions{LabelSelector: gatewayPodLabel}) } +func gatherGatewayLBService(info *Info, namespace string) { + gatherService(info, namespace, metav1.ListOptions{FieldSelector: fields.Set(map[string]string{ + "metadata.name": names.GatewayComponent, + }).String()}) +} + func gatherMetricsPodDaemonSet(info *Info, namespace string) { gatherDaemonSet(info, namespace, metav1.ListOptions{LabelSelector: metricsProxyPodLabel}) } diff --git a/internal/gather/resource.go b/internal/gather/resource.go index af440be48..f7adead0a 100644 --- a/internal/gather/resource.go +++ b/internal/gather/resource.go @@ -109,6 +109,11 @@ func gatherConfigMaps(info *Info, namespace string, listOptions metav1.ListOptio ResourcesToYAMLFile(info, corev1.SchemeGroupVersion.WithResource("configmaps"), namespace, listOptions) } +//nolint:gocritic // hugeParam: listOptions - match K8s API. +func gatherService(info *Info, namespace string, listOptions metav1.ListOptions) { + ResourcesToYAMLFile(info, corev1.SchemeGroupVersion.WithResource("services"), namespace, listOptions) +} + func scrubSensitiveData(info *Info, dataString string) string { if info.IncludeSensitiveData { return dataString