Skip to content

Commit 57eac6c

Browse files
committed
Code review
1 parent addb119 commit 57eac6c

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/main/java/oracle/kubernetes/operator/helpers/ConfigMapHelper.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,15 @@ public NextAction apply(Packet packet) {
6767
"# Kubernetes periodically calls this liveness probe script to determine whether\n" +
6868
"# the pod should be restarted. The script checks a WebLogic Server state file which\n" +
6969
"# is updated by the node manager.\n" +
70-
"STATEFILE=/shared/domain/$1/servers/$2/data/nodemanager/$2.state\n" +
70+
"DOMAIN_NAME=$1\n" +
71+
"SERVER_NAME=$2\n" +
72+
"STATEFILE=/shared/domain/${DOMAIN_NAME}/servers/${SERVER_NAME}/data/nodemanager/${SERVER_NAME}.state\n" +
7173
"if [ `jps -l | grep -c \" weblogic.NodeManager\"` -eq 0 ]; then\n" +
74+
" echo \"Error: WebLogic NodeManager process not found.\"\n" +
7275
" exit 1\n" +
7376
"fi\n" +
7477
"if [ -f ${STATEFILE} ] && [ `grep -c \"FAILED_NOT_RESTARTABLE\" ${STATEFILE}` -eq 1 ]; then\n" +
78+
" echo \"Error: WebLogic Server FAILED_NOT_RESTARTABLE.\"\n" +
7579
" exit 1\n" +
7680
"fi\n" +
7781
"exit 0");
@@ -83,9 +87,12 @@ public NextAction apply(Packet packet) {
8387
"# the pod should be included in load balancing. The script checks a WebLogic Server state\n" +
8488
"# file which is updated by the node manager.\n" +
8589
"\n" +
86-
"STATEFILE=/shared/domain/$1/servers/$2/data/nodemanager/$2.state\n" +
90+
"DOMAIN_NAME=$1\n" +
91+
"SERVER_NAME=$2\n" +
92+
"STATEFILE=/shared/domain/${DOMAIN_NAME}/servers/${SERVER_NAME}/data/nodemanager/${SERVER_NAME}.state\n" +
8793
"\n" +
8894
"if [ `jps -l | grep -c \" weblogic.NodeManager\"` -eq 0 ]; then\n" +
95+
" echo \"Error: WebLogic NodeManager process not found.\"\n" +
8996
" exit 1\n" +
9097
"fi\n" +
9198
"\n" +

src/main/java/oracle/kubernetes/operator/helpers/PodHelper.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ public NextAction apply(Packet packet) {
166166
readinessAction.addCommandItem(weblogicDomainName);
167167
readinessAction.addCommandItem(spec.getAsName());
168168
readinessProbe.exec(readinessAction);
169-
readinessProbe.setInitialDelaySeconds(2);
169+
readinessProbe.setInitialDelaySeconds(5);
170170
readinessProbe.setTimeoutSeconds(5);
171-
readinessProbe.setPeriodSeconds(10);
171+
readinessProbe.setPeriodSeconds(5);
172172
readinessProbe.setFailureThreshold(1);
173173
container.readinessProbe(readinessProbe);
174174

@@ -180,7 +180,7 @@ public NextAction apply(Packet packet) {
180180
livenessProbe.exec(livenessAction);
181181
livenessProbe.setInitialDelaySeconds(10);
182182
livenessProbe.setTimeoutSeconds(5);
183-
livenessProbe.setPeriodSeconds(10);
183+
livenessProbe.setPeriodSeconds(5);
184184
livenessProbe.setFailureThreshold(1);
185185
container.livenessProbe(livenessProbe);
186186

0 commit comments

Comments
 (0)