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