|
@@ -9,6 +9,7 @@ import lombok.SneakyThrows;
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
+import org.springframework.util.ResourceUtils;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.FileReader;
|
|
@@ -50,8 +51,8 @@ public class KubernetesConfiguration {
|
|
|
@SneakyThrows
|
|
|
public ApiClient apiClient() {
|
|
|
// File config = ResourceUtils.getFile("classpath:kubernetes/config"); // 开发环境可用,生产环境不行,无法从jar 包读取
|
|
|
-// File config = new File("D:\\idea-project\\simulation-cloud\\simulation-resource-scheduler\\src\\main\\resources\\kubernetes\\config"); //windows
|
|
|
- File config = new File("/root/.kube/config"); //linux
|
|
|
+ File config = new File("E:\\project\\simulation-cloud\\simulation-resource-scheduler\\src\\main\\resources\\kubernetes\\config"); //windows
|
|
|
+// File config = new File("/root/.kube/config"); //linux
|
|
|
//
|
|
|
// ClassPathResource classPathResource = new ClassPathResource("kubernetes/config");
|
|
|
// InputStream inputStream = classPathResource.getInputStream();
|