Browse Source

配置

pull/10/head
fanshuai 1 year ago
parent
commit
27c0ee0376
1 changed files with 2 additions and 6 deletions
  1. +2
    -6
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java

+ 2
- 6
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/utils/K8sClientUtil.java View File

@@ -33,6 +33,7 @@ import java.util.Map;
* @date 2021/6/18 14:14 * @date 2021/6/18 14:14
*/ */
@Slf4j @Slf4j
@Component
public class K8sClientUtil { public class K8sClientUtil {
@Value("${k8s.http}") @Value("${k8s.http}")
private String http; private String http;
@@ -66,15 +67,10 @@ public class K8sClientUtil {
// } // }
@PostConstruct @PostConstruct
public void init() { public void init() {
// try {
this.apiClient = new ClientBuilder(). this.apiClient = new ClientBuilder().
setBasePath(http).setVerifyingSsl(false). setBasePath(http).setVerifyingSsl(false).
setAuthentication(new AccessTokenAuthentication(token)).build(); setAuthentication(new AccessTokenAuthentication(token)).build();
// } catch (Exception e) {
// log.error("构建K8s-Client异常", e);
// throw new RuntimeException("构建K8s-Client异常");
// }
}
}


/** /**
* 构建集群外通过UA访问的客户端 * 构建集群外通过UA访问的客户端


Loading…
Cancel
Save