Skip to content

Commit 82e9322

Browse files
authored
Merge pull request #332 from oracle/issue_330
Issue 330: Fix an issue in create domain script for one Apache use case
2 parents 3403fe9 + a003b86 commit 82e9322

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

kubernetes/internal/create-weblogic-domain.sh

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,16 @@ function createYamlFiles {
594594
sed -i -e "s|# value: '%ADMIN_PORT%'| value: '%ADMIN_PORT%'|g" ${apacheOutput}
595595
fi
596596

597+
if [ ! -z "${loadBalancerVolumePath}" ]; then
598+
sed -i -e "s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath}:g" ${apacheOutput}
599+
sed -i -e "s:# volumes:volumes:g" ${apacheOutput}
600+
sed -i -e "s|# - name: %DOMAIN_UID%-apache-webtier|- name: %DOMAIN_UID%-apache-webtier|g" ${apacheOutput}
601+
sed -i -e "s:# hostPath: hostPath:g" ${apacheOutput}
602+
sed -i -e "s:# path: path:g" ${apacheOutput}
603+
sed -i -e "s:# volumeMounts:volumeMounts:g" ${apacheOutput}
604+
sed -i -e "s:# mountPath: mountPath:g" ${apacheOutput}
605+
fi
606+
597607
sed -i -e "s:%NAMESPACE%:$namespace:g" ${apacheOutput}
598608
sed -i -e "s:%DOMAIN_UID%:${domainUID}:g" ${apacheOutput}
599609
sed -i -e "s:%DOMAIN_NAME%:${domainName}:g" ${apacheOutput}
@@ -603,17 +613,6 @@ function createYamlFiles {
603613
sed -i -e "s:%MANAGED_SERVER_PORT%:${managedServerPort}:g" ${apacheOutput}
604614
sed -i -e "s:%LOAD_BALANCER_WEB_PORT%:$loadBalancerWebPort:g" ${apacheOutput}
605615
sed -i -e "s:%WEB_APP_PREPATH%:$loadBalancerAppPrepath:g" ${apacheOutput}
606-
607-
if [ ! -z "${loadBalancerVolumePath}" ]; then
608-
sed -i -e "s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath}:g" ${apacheOutput}
609-
sed -i -e "s:# volumes:volumes:g" ${apacheOutput}
610-
sed -i -e "s:# - name:- name:g" ${apacheOutput}
611-
sed -i -e "s:# hostPath: hostPath:g" ${apacheOutput}
612-
sed -i -e "s:# path: path:g" ${apacheOutput}
613-
sed -i -e "s:# volumeMounts:volumeMounts:g" ${apacheOutput}
614-
sed -i -e "s:# - name:- name:g" ${apacheOutput}
615-
sed -i -e "s:# mountPath: mountPath:g" ${apacheOutput}
616-
fi
617616

618617
# Apache security file
619618
cp ${apacheSecurityInput} ${apacheSecurityOutput}

kubernetes/internal/weblogic-domain-apache-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ spec:
3838
serviceAccountName: %DOMAIN_UID%-apache-webtier
3939
terminationGracePeriodSeconds: 60
4040
# volumes:
41-
# - name: "%DOMAIN_UID%-apache-webtier"
41+
# - name: %DOMAIN_UID%-apache-webtier
4242
# hostPath:
4343
# path: %LOAD_BALANCER_VOLUME_PATH%
4444
containers:
4545
- name: %DOMAIN_UID%-apache-webtier
4646
image: store/oracle/apache:12.2.1.3
4747
imagePullPolicy: Never
4848
# volumeMounts:
49-
# - name: "%DOMAIN_UID%-apache-webtier"
49+
# - name: %DOMAIN_UID%-apache-webtier
5050
# mountPath: "/config"
5151
env:
5252
- name: WEBLOGIC_CLUSTER

0 commit comments

Comments
 (0)