Skip to content

Commit

Permalink
easier to read code (#1842)
Browse files Browse the repository at this point in the history
Signed-off-by: wind57 <[email protected]>
  • Loading branch information
wind57 authored Jan 19, 2025
1 parent 34e97dd commit 0ac5f2f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ protected static void beforeAll() {
util = new Util(K3S);
}

protected static KubernetesDiscoveryProperties discoveryProperties(boolean useEndpointSlices) {
return new KubernetesDiscoveryProperties(true, false, Set.of(NAMESPACE, NAMESPACE_A), true, 60, false, null,
protected static KubernetesDiscoveryProperties discoveryProperties(boolean useEndpointSlices,
Set<String> discoveryNamespaces) {
return new KubernetesDiscoveryProperties(true, false, discoveryNamespaces, true, 60, false, null,
Set.of(443, 8443), Map.of(), null, KubernetesDiscoveryProperties.Metadata.DEFAULT, 0, useEndpointSlices,
false, null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ KubernetesClient kubernetesClient() {
@Bean
@Primary
KubernetesDiscoveryProperties kubernetesDiscoveryProperties() {
return discoveryProperties(true);
return discoveryProperties(true, Set.of(NAMESPACE, NAMESPACE_A));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ KubernetesClient kubernetesClient() {
@Bean
@Primary
KubernetesDiscoveryProperties kubernetesDiscoveryProperties() {
return discoveryProperties(true);
return discoveryProperties(true, Set.of(NAMESPACE));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ KubernetesClient kubernetesClient() {
@Bean
@Primary
KubernetesDiscoveryProperties kubernetesDiscoveryProperties() {
return discoveryProperties(false);
return discoveryProperties(false, Set.of(NAMESPACE, NAMESPACE_A));
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ KubernetesClient kubernetesClient() {
@Bean
@Primary
KubernetesDiscoveryProperties kubernetesDiscoveryProperties() {
return discoveryProperties(false);
return discoveryProperties(false, Set.of(NAMESPACE));
}

}
Expand Down

0 comments on commit 0ac5f2f

Please sign in to comment.