Skip to content

Commit b7b6d8f

Browse files
committed
Fix an issue in create domain script for one Apache use case
Signed-off-by: doxiao <[email protected]>
1 parent 1c070a8 commit b7b6d8f

File tree

3 files changed

+12
-21
lines changed

3 files changed

+12
-21
lines changed

kubernetes/internal/create-weblogic-domain.sh

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

586+
if [ ! -z "${loadBalancerVolumePath}" ]; then
587+
sed -i -e "s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath}:g" ${apacheOutput}
588+
sed -i -e "s:# volumes:volumes:g" ${apacheOutput}
589+
sed -i -e "s|# - name: %DOMAIN_UID%-apache-webtier|- name: %DOMAIN_UID%-apache-webtier|g" ${apacheOutput}
590+
sed -i -e "s:# hostPath: hostPath:g" ${apacheOutput}
591+
sed -i -e "s:# path: path:g" ${apacheOutput}
592+
sed -i -e "s:# volumeMounts:volumeMounts:g" ${apacheOutput}
593+
sed -i -e "s:# mountPath: mountPath:g" ${apacheOutput}
594+
fi
595+
586596
sed -i -e "s:%NAMESPACE%:$namespace:g" ${apacheOutput}
587597
sed -i -e "s:%DOMAIN_UID%:${domainUID}:g" ${apacheOutput}
588598
sed -i -e "s:%DOMAIN_NAME%:${domainName}:g" ${apacheOutput}
@@ -592,17 +602,6 @@ function createYamlFiles {
592602
sed -i -e "s:%MANAGED_SERVER_PORT%:${managedServerPort}:g" ${apacheOutput}
593603
sed -i -e "s:%LOAD_BALANCER_WEB_PORT%:$loadBalancerWebPort:g" ${apacheOutput}
594604
sed -i -e "s:%WEB_APP_PREPATH%:$loadBalancerAppPrepath:g" ${apacheOutput}
595-
596-
if [ ! -z "${loadBalancerVolumePath}" ]; then
597-
sed -i -e "s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath}:g" ${apacheOutput}
598-
sed -i -e "s:# volumes:volumes:g" ${apacheOutput}
599-
sed -i -e "s:# - name:- name:g" ${apacheOutput}
600-
sed -i -e "s:# hostPath: hostPath:g" ${apacheOutput}
601-
sed -i -e "s:# path: path:g" ${apacheOutput}
602-
sed -i -e "s:# volumeMounts:volumeMounts:g" ${apacheOutput}
603-
sed -i -e "s:# - name:- name:g" ${apacheOutput}
604-
sed -i -e "s:# mountPath: mountPath:g" ${apacheOutput}
605-
fi
606605

607606
# Apache security file
608607
cp ${apacheSecurityInput} ${apacheSecurityOutput}

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ rules:
1919
- get
2020
- list
2121
- watch
22-
- apiGroups:
23-
- extensions
24-
resources:
25-
- ingresses
26-
verbs:
27-
- get
28-
- list
29-
- watch
3022
---
3123
kind: ClusterRoleBinding
3224
apiVersion: rbac.authorization.k8s.io/v1beta1

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)