Skip to content

Commit 58294a6

Browse files
committed
Remove clusterType from create domain samples
Signed-off-by: doxiao <[email protected]>
1 parent 6be3971 commit 58294a6

File tree

5 files changed

+7
-36
lines changed

5 files changed

+7
-36
lines changed

kubernetes/samples/scripts/common/validate.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -231,24 +231,6 @@ function validateServerStartPolicy {
231231
fi
232232
}
233233

234-
#
235-
# Function to validate the cluster type value
236-
#
237-
function validateClusterType {
238-
validateInputParamsSpecified clusterType
239-
if [ ! -z "${clusterType}" ]; then
240-
case ${clusterType} in
241-
"CONFIGURED")
242-
;;
243-
"DYNAMIC")
244-
;;
245-
*)
246-
validationError "Invalid value for clusterType: ${clusterType}. Valid values are 'CONFIGURED' and 'DYNAMIC'."
247-
;;
248-
esac
249-
fi
250-
}
251-
252234
#
253235
# Function to validate the weblogic domain storage reclaim policy
254236
#
@@ -388,7 +370,6 @@ function validateCommonInputs {
388370
validateClusterName
389371
validateWeblogicCredentialsSecretName
390372
validateServerStartPolicy
391-
validateClusterType
392373
validateWeblogicImagePullPolicy
393374
validateWeblogicImagePullSecretName
394375

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/properties-template.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DB_PORT=1527
1111
DEBUG_FLAG=true
1212
DERBY_FLAG=true
1313
PRODUCTION_MODE_ENABLED=%PRODUCTION_MODE_ENABLED%
14-
CLUSTER_TYPE=%CLUSTER_TYPE%
14+
CLUSTER_TYPE=DYNAMIC
1515
JAVA_OPTIONS=%JAVA_OPTIONS%
1616
T3_CHANNEL_PORT=%T3_CHANNEL_PORT%
1717
T3_PUBLIC_ADDRESS=%T3_PUBLIC_ADDRESS%

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-job-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spec:
4444
- name: CLUSTER_NAME
4545
value: "%CLUSTER_NAME%"
4646
- name: CLUSTER_TYPE
47-
value: "%CLUSTER_TYPE%"
47+
value: "DYNAMIC"
4848
- name: T3_CHANNEL_PORT
4949
value: "%T3_CHANNEL_PORT%"
5050
- name: T3_PUBLIC_ADDRESS

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ function createFiles {
227227
sed -i -e "s:%T3_CHANNEL_PORT%:${t3ChannelPort}:g" ${createJobOutput}
228228
sed -i -e "s:%T3_PUBLIC_ADDRESS%:${t3PublicAddress}:g" ${createJobOutput}
229229
sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${createJobOutput}
230-
sed -i -e "s:%CLUSTER_TYPE%:${clusterType}:g" ${createJobOutput}
231230
sed -i -e "s:%DOMAIN_PVC_NAME%:${persistentVolumeClaimName}:g" ${createJobOutput}
232231
sed -i -e "s:%DOMAIN_ROOT_DIR%:${domainPVMountPath}:g" ${createJobOutput}
233232
sed -i -e "s:%CREATE_DOMAIN_SCRIPT_DIR%:${createDomainScriptsMountPath}:g" ${createJobOutput}
@@ -313,7 +312,7 @@ function createDomainConfigmap {
313312
echo domainName: $domainName >> ${externalFilesTmpDir}/create-domain-inputs.yaml
314313

315314
if [ -f ${externalFilesTmpDir}/prepare.sh ]; then
316-
sh ${externalFilesTmpDir}/prepare.sh -t ${clusterType} -i ${externalFilesTmpDir}
315+
sh ${externalFilesTmpDir}/prepare.sh -i ${externalFilesTmpDir}
317316
fi
318317

319318
# create the configmap and label it properly

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt/prepare.sh

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,25 @@
66
# Perform preparation based on the specified cluster type
77

88
function usage {
9-
echo usage: ${script} -t clusterTpe -i file [-h]
9+
echo usage: ${script} -i file [-h]
1010
echo " -i Directory, must be specified."
11-
echo " -t Cluster type, CONFIGURED or DYNAMIC, default is DYNAMIC."
1211
echo " -h Help"
1312
exit $1
1413
}
1514

1615

17-
while getopts "hi:t:" opt; do
16+
while getopts "hi:" opt; do
1817
case $opt in
1918
i) externalFilesTmpDir="${OPTARG}"
2019
;;
21-
t) clusterType="${OPTARG}"
22-
;;
2320
h) usage 0
2421
;;
2522
*) usage 1
2623
;;
2724
esac
2825
done
2926

30-
echo Preparing the scripts with clusterType $clusterType
31-
32-
if [ "${clusterType}" = "CONFIGURED" ]; then
33-
source_model=${externalFilesTmpDir}/wdt_model_configured.yaml
34-
else
35-
source_model=${externalFilesTmpDir}/wdt_model_dynamic.yaml
36-
fi
27+
echo Preparing the model script
3728

38-
cp $source_model ${externalFilesTmpDir}/wdt_model.yaml
29+
cp ${externalFilesTmpDir}/wdt_model_dynamic.yaml ${externalFilesTmpDir}/wdt_model.yaml
3930

0 commit comments

Comments
 (0)