Skip to content

Commit

Permalink
Include submariner-gateway LB service in subctl gather
Browse files Browse the repository at this point in the history
Fixes: #1194

Signed-off-by: Yossi Boaron <[email protected]>
  • Loading branch information
yboaron authored and tpantelis committed Aug 5, 2024
1 parent 8f361c8 commit f03f6e5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/gather/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 6 additions & 0 deletions internal/gather/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
}
Expand Down
5 changes: 5 additions & 0 deletions internal/gather/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f03f6e5

Please sign in to comment.