This commit is contained in:
erabii
2024-12-09 15:36:15 +02:00
committed by GitHub
parent 776ec1ed4b
commit 57024629bf

View File

@@ -57,19 +57,15 @@ abstract class Fabric8DiscoveryBase {
util = new Util(K3S);
}
protected static KubernetesClient client() {
String kubeConfigYaml = K3S.getKubeConfigYaml();
Config config = Config.fromKubeconfig(kubeConfigYaml);
return new KubernetesClientBuilder().withConfig(config).build();
}
@TestConfiguration
static class TestConfig {
@Bean
@Primary
KubernetesClient kubernetesClient() {
return client();
String kubeConfigYaml = K3S.getKubeConfigYaml();
Config config = Config.fromKubeconfig(kubeConfigYaml);
return new KubernetesClientBuilder().withConfig(config).build();
}
}