|
5 | 5 |
|
6 | 6 | import java.util.List;
|
7 | 7 |
|
| 8 | +import io.kubernetes.client.models.V1ContainerPort; |
8 | 9 | import io.kubernetes.client.models.V1PersistentVolumeClaimList;
|
9 | 10 | import io.kubernetes.client.models.V1Pod;
|
10 | 11 | import static oracle.kubernetes.operator.KubernetesConstants.*;
|
@@ -263,7 +264,7 @@ public V1Pod computeManagedPodConfig(Domain domain, V1PersistentVolumeClaimList
|
263 | 264 | packet.put(
|
264 | 265 | ProcessingConstants.SERVER_SCAN,
|
265 | 266 | // no listen address, no network access points since PodHelper doesn't use them:
|
266 |
| - new WlsServerConfig(MANAGED_SERVER_NAME, MANAGED_SERVER_PORT, null, null)); |
| 267 | + new WlsServerConfig(MANAGED_SERVER_NAME, MANAGED_SERVER_PORT, null, null, false, null, null)); |
267 | 268 | packet.put(
|
268 | 269 | ProcessingConstants.CLUSTER_SCAN,
|
269 | 270 | // don't attach WlsServerConfigs for the managed server to the WlsClusterConfig
|
@@ -366,6 +367,9 @@ private V1Pod getDesiredManagedServerPodConfigForDefaults(String image, String i
|
366 | 367 | .value(MANAGED_OPTION2_VALUE));
|
367 | 368 | pod.getMetadata()
|
368 | 369 | .putLabelsItem("weblogic.clusterName", CLUSTER_NAME);
|
| 370 | + pod.getSpec().getContainers().get(0).addCommandItem(ADMIN_SERVER_NAME).addCommandItem(String.valueOf(ADMIN_SERVER_PORT)); |
| 371 | + pod.getSpec().getContainers().get(0).getPorts().get(0).setName("weblogic"); |
| 372 | + pod.getSpec().getContainers().get(0).addPortsItem(new V1ContainerPort().protocol("TCP").containerPort(5556).name("node-manager")); |
369 | 373 | return pod;
|
370 | 374 | }
|
371 | 375 |
|
@@ -397,11 +401,18 @@ private V1Pod getDesiredBaseServerPodConfigForDefaults(String image, String imag
|
397 | 401 | .name("weblogic-server")
|
398 | 402 | .image(image)
|
399 | 403 | .imagePullPolicy(imagePullPolicy)
|
400 |
| - .addCommandItem("/shared/domain/" + DOMAIN_NAME + "/servers/" + serverName + "/nodemgr_home/startServer.sh") |
| 404 | + .addCommandItem("/weblogic-operator/scripts/startServer.sh") |
| 405 | + .addCommandItem(DOMAIN_UID) |
| 406 | + .addCommandItem(serverName) |
| 407 | + .addCommandItem(DOMAIN_NAME) |
401 | 408 | .lifecycle(newLifecycle()
|
402 | 409 | .preStop(newHandler()
|
403 | 410 | .exec(newExecAction()
|
404 |
| - .addCommandItem("/shared/domain/" + DOMAIN_NAME + "/servers/" + serverName + "/nodemgr_home/stopServer.sh")))) |
| 411 | + .addCommandItem("/weblogic-operator/scripts/stopServer.sh") |
| 412 | + .addCommandItem(DOMAIN_UID) |
| 413 | + .addCommandItem(serverName) |
| 414 | + .addCommandItem(DOMAIN_NAME) |
| 415 | + ))) |
405 | 416 | .livenessProbe(newProbe()
|
406 | 417 | .initialDelaySeconds(10)
|
407 | 418 | .periodSeconds(10)
|
|
0 commit comments