|
6 | 6 |
|
7 | 7 | import static oracle.kubernetes.operator.LabelConstants.forDomainUid;
|
8 | 8 |
|
| 9 | +import io.kubernetes.client.custom.IntOrString; |
9 | 10 | import io.kubernetes.client.models.V1ConfigMapVolumeSource;
|
10 | 11 | import io.kubernetes.client.models.V1Container;
|
11 | 12 | import io.kubernetes.client.models.V1ContainerPort;
|
12 | 13 | import io.kubernetes.client.models.V1DeleteOptions;
|
13 | 14 | import io.kubernetes.client.models.V1EnvVar;
|
14 | 15 | import io.kubernetes.client.models.V1ExecAction;
|
| 16 | +import io.kubernetes.client.models.V1HTTPGetAction; |
15 | 17 | import io.kubernetes.client.models.V1Handler;
|
16 | 18 | import io.kubernetes.client.models.V1Lifecycle;
|
17 | 19 | import io.kubernetes.client.models.V1ObjectMeta;
|
@@ -58,9 +60,10 @@ public abstract class PodStepContext implements StepContextConstants {
|
58 | 60 |
|
59 | 61 | private static final String STOP_SERVER = "/weblogic-operator/scripts/stopServer.sh";
|
60 | 62 | private static final String START_SERVER = "/weblogic-operator/scripts/startServer.sh";
|
61 |
| - private static final String READINESS_PROBE = "/weblogic-operator/scripts/readinessProbe.sh"; |
62 | 63 | private static final String LIVENESS_PROBE = "/weblogic-operator/scripts/livenessProbe.sh";
|
63 | 64 |
|
| 65 | + private static final String READINESS_PATH = "/weblogic"; |
| 66 | + |
64 | 67 | private final DomainPresenceInfo info;
|
65 | 68 | private final Step conflictStep;
|
66 | 69 | private V1Pod podModel;
|
@@ -762,10 +765,16 @@ private V1Probe createReadinessProbe(TuningParameters.PodTuning tuning) {
|
762 | 765 | .timeoutSeconds(getReadinessProbeTimeoutSeconds(tuning))
|
763 | 766 | .periodSeconds(getReadinessProbePeriodSeconds(tuning))
|
764 | 767 | .failureThreshold(FAILURE_THRESHOLD)
|
765 |
| - .exec(execAction(READINESS_PROBE)); |
| 768 | + .httpGet(httpGetAction(READINESS_PATH, getPort())); |
766 | 769 | return readinessProbe;
|
767 | 770 | }
|
768 | 771 |
|
| 772 | + private V1HTTPGetAction httpGetAction(String path, int port) { |
| 773 | + V1HTTPGetAction getAction = new V1HTTPGetAction(); |
| 774 | + getAction.path(path).port(new IntOrString(port)); |
| 775 | + return getAction; |
| 776 | + } |
| 777 | + |
769 | 778 | private int getReadinessProbePeriodSeconds(TuningParameters.PodTuning tuning) {
|
770 | 779 | return Optional.ofNullable(getServerSpec().getReadinessProbe().getPeriodSeconds())
|
771 | 780 | .orElse(tuning.readinessProbePeriodSeconds);
|
|
0 commit comments