Skip to content

Commit 195951c

Browse files
committed
Update K8sServerFinder
Signed-off-by: Seppe Volkaerts <seppevolkaerts@hotmail.com>
1 parent 55c3ed0 commit 195951c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

k8s-server-finder/src/main/kotlin/org/lanternpowered/terre/serverfinder/K8sServerFinder.kt

+2-4
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ object K8sServerFinder {
8686
val defaultPort = config[ServerFinderConfigSpec.defaultPort]
8787

8888
fun listServices(watch: Boolean) = if (namespace.isNotBlank()) {
89-
api.listNamespacedServiceCall(namespace, null, null, null, null, labelSelector, null, null,
90-
null, null, watch, null)
89+
api.listNamespacedService(namespace).labelSelector(labelSelector).watch(watch).buildCall(null)
9190
} else {
92-
api.listServiceForAllNamespacesCall(null, null, null, labelSelector, null, null, null,
93-
null, null, watch, null)
91+
api.listServiceForAllNamespaces().labelSelector(labelSelector).watch(watch).buildCall(null)
9492
}
9593

9694
val watch = Watch.createWatch<V1Service>(client, listServices(true),

0 commit comments

Comments
 (0)