|
@@ -237,12 +237,12 @@ public class KubernetesUtil {
|
|
* @param podName pod 名称
|
|
* @param podName pod 名称
|
|
*/
|
|
*/
|
|
public static void deletePodSync(ApiClient apiClient, String namespaceName, String podName) throws ApiException, InterruptedException {
|
|
public static void deletePodSync(ApiClient apiClient, String namespaceName, String podName) throws ApiException, InterruptedException {
|
|
- log.info("KubernetesUtil--deletePod 删除 " + namespaceName + ":" + podName);
|
|
|
|
|
|
+ log.info("deletePodSync() 删除 " + namespaceName + ":" + podName);
|
|
CoreV1Api coreV1Api = new CoreV1Api(apiClient);
|
|
CoreV1Api coreV1Api = new CoreV1Api(apiClient);
|
|
coreV1Api.deleteNamespacedPod(podName, namespaceName, null, null, null, null, null, null);
|
|
coreV1Api.deleteNamespacedPod(podName, namespaceName, null, null, null, null, null, null);
|
|
// 检查是否删除完毕
|
|
// 检查是否删除完毕
|
|
while (true) {
|
|
while (true) {
|
|
- Thread.sleep(5000L);
|
|
|
|
|
|
+ TimeUnit.SECONDS.sleep(7);
|
|
List<String> podNameList = getPod(apiClient, namespaceName);
|
|
List<String> podNameList = getPod(apiClient, namespaceName);
|
|
if (!podNameList.contains(podName)) {
|
|
if (!podNameList.contains(podName)) {
|
|
return;
|
|
return;
|