1.30 k8s pods查询
This commit is contained in:
parent
2ce817b978
commit
bd1f7fe89e
@ -662,11 +662,11 @@ public class K8sServiceIntegrationImpl extends BaseExternalSystemIntegration imp
|
||||
timestamp
|
||||
);
|
||||
|
||||
// 使用strategic merge patch更新Deployment,明确指定patch类型
|
||||
// 使用strategic merge patch更新Deployment
|
||||
api.patchNamespacedDeployment(
|
||||
deploymentName,
|
||||
namespace,
|
||||
new io.kubernetes.client.custom.V1Patch(patchBody, io.kubernetes.client.custom.V1Patch.PATCH_FORMAT_STRATEGIC_MERGE_PATCH),
|
||||
new io.kubernetes.client.custom.V1Patch(patchBody),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
@ -706,11 +706,11 @@ public class K8sServiceIntegrationImpl extends BaseExternalSystemIntegration imp
|
||||
// 构建patch内容:更新spec.replicas
|
||||
String patchBody = String.format("{\"spec\":{\"replicas\":%d}}", replicas);
|
||||
|
||||
// 使用strategic merge patch更新Deployment的scale,明确指定patch类型
|
||||
// 使用strategic merge patch更新Deployment的scale
|
||||
api.patchNamespacedDeploymentScale(
|
||||
deploymentName,
|
||||
namespace,
|
||||
new io.kubernetes.client.custom.V1Patch(patchBody, io.kubernetes.client.custom.V1Patch.PATCH_FORMAT_STRATEGIC_MERGE_PATCH),
|
||||
new io.kubernetes.client.custom.V1Patch(patchBody),
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user