| @@ -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访问的客户端 | ||||