|
|
|
@@ -529,6 +529,8 @@ public class K8sClientUtil { |
|
|
|
|
|
|
|
//配置资源 |
|
|
|
V1ResourceRequirements v1ResourceRequirements = setPodResource(devEnvironment.getComputingResourceId()); |
|
|
|
V1HTTPGetAction httpGetAction = new V1HTTPGetAction().path("/").port(new IntOrString(port)); |
|
|
|
V1Probe readinessProbe = new V1Probe().httpGet(httpGetAction).initialDelaySeconds(10).periodSeconds(5).failureThreshold(2); |
|
|
|
|
|
|
|
String image = (String) JsonUtils.jsonToMap(devEnvironment.getImage()).get("value"); |
|
|
|
|
|
|
|
@@ -544,6 +546,7 @@ public class K8sClientUtil { |
|
|
|
.withPorts(new V1ContainerPort().containerPort(port).protocol("TCP")) |
|
|
|
.withVolumeMounts(volumeMounts) |
|
|
|
.withResources(v1ResourceRequirements) |
|
|
|
.withReadinessProbe(readinessProbe) |
|
|
|
.endContainer() |
|
|
|
.withVolumes(volumes) |
|
|
|
.withNodeSelector(nodeSelector) |
|
|
|
|