You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [ !-z"${weblogicDomainStorageReclaimPolicy}" ];then
133
+
case${weblogicDomainStorageReclaimPolicy}in
134
+
"Retain")
135
+
;;
136
+
"Delete")
137
+
if [ "${weblogicDomainStoragePath:0:5}"!="/tmp/" ];then
138
+
validationError "ERROR - Invalid value for weblogicDomainStorageReclaimPolicy ${weblogicDomainStorageReclaimPolicy} with weblogicDomainStoragePath ${weblogicDomainStoragePath} that is not /tmp/"
139
+
fi
140
+
;;
141
+
"Recycle")
142
+
;;
143
+
*)
144
+
validationError "Invalid value for weblogicDomainStorageReclaimPolicy: ${weblogicDomainStorageReclaimPolicy}. Valid values are Retain, Delete and Recycle."
145
+
;;
146
+
esac
147
+
fi
148
+
}
149
+
127
150
#
128
151
# Function to validate the weblogic domain storage type
129
152
#
@@ -333,6 +356,7 @@ function initialize {
333
356
validateNamespace
334
357
validateClusterName
335
358
validateWeblogicDomainStorageType
359
+
validateWeblogicDomainStorageReclaimPolicy
336
360
validateWeblogicCredentialsSecretName
337
361
validateWeblogicImagePullSecretName
338
362
validateLoadBalancer
@@ -383,6 +407,7 @@ function createYamlFiles {
383
407
sed -i -e "s:%DOMAIN_UID%:${domainUID}:g"${domainPVOutput}
384
408
sed -i -e "s:%NAMESPACE%:$namespace:g"${domainPVOutput}
385
409
sed -i -e "s:%WEBLOGIC_DOMAIN_STORAGE_PATH%:${weblogicDomainStoragePath}:g"${domainPVOutput}
410
+
sed -i -e "s:%WEBLOGIC_DOMAIN_STORAGE_RECLAIM_POLICY%:${weblogicDomainStorageReclaimPolicy}:g"${domainPVOutput}
386
411
sed -i -e "s:%WEBLOGIC_DOMAIN_STORAGE_SIZE%:${weblogicDomainStorageSize}:g"${domainPVOutput}
387
412
sed -i -e "s:%HOST_PATH_PREFIX%:${hostPathPrefix}:g"${domainPVOutput}
388
413
sed -i -e "s:%NFS_PREFIX%:${nfsPrefix}:g"${domainPVOutput}
Copy file name to clipboardExpand all lines: site/creating-domain.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,7 @@ The following parameters must be provided in the input file:
120
120
| t3PublicAddress | Public address for the t3 channel. | kubernetes |
121
121
| weblogicCredentialsSecretName | Name of the Kubernetes secret for the Administration Server's username and password. | domain1-weblogic-credentials |
122
122
| weblogicDomainStoragePath | Physical path of the storage for the domain. | no default |
123
+
| weblogicDomainStorageReclaimPolicy | Kubernetes persistent volume reclaim policy for the domain persistent storage | Retain |
123
124
| weblogicDomainStorageSize | Total storage allocated for the domain. | 10Gi |
124
125
| weblogicDomainStorageType | Type of storage for the domain. Legal values are 'NFS' and 'HOST_PATH". | HOST_PATH |
125
126
| weblogicDomainStorageNFSServer| The name of IP address of the NFS server for the domain's storage. | no default |
Copy file name to clipboardExpand all lines: src/integration-tests/bash/run.sh
+38-3Lines changed: 38 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -768,6 +768,11 @@ function run_create_domain_job {
768
768
sed -i -e "s/^configuredManagedServerCount:.*/configuredManagedServerCount: 3/"$inputs
769
769
fi
770
770
771
+
# we will test pv reclaim policy in domain6. We choose to do this way to void adding too many parameters in dom_define
772
+
if [ "$DOMAIN_UID"=="domain6" ] ;then
773
+
sed -i -e "s/^weblogicDomainStorageReclaimPolicy:.*/weblogicDomainStorageReclaimPolicy: Recycle/"$inputs
774
+
fi
775
+
771
776
local outfile="${tmp_dir}/mkdir_physical_nfs.out"
772
777
trace "Use a job to create the k8s host directory \"$PV_ROOT/acceptance_test_pv/$DOMAIN_STORAGE_DIR\" that we will use for the domain's persistent volume, see \"$outfile\" for job tracing."
773
778
@@ -2250,6 +2255,32 @@ function test_create_domain_startup_control_admin {
# create namespaces for domains (the operator job creates a namespace if needed)
2529
2561
# TODO have the op_define commands themselves create target namespace if it doesn't already exist, or test if the namespace creation is needed in the first place, and if so, ask MikeG to create them as part of domain create job
@@ -2588,9 +2620,12 @@ function test_suite {
2588
2620
# cycle domain1 down and back up, plus verify no impact on domain4
2589
2621
test_domain_lifecycle domain1 domain4
2590
2622
2591
-
# create another domain in the default namespace with startupControl="ADMIN", and verify that only admin server is created
2623
+
# create domain5 in the default namespace with startupControl="ADMIN", and verify that only admin server is created
2592
2624
test_create_domain_startup_control_admin domain5
2593
2625
2626
+
# create domain6 in the default namespace with pvReclaimPolicy="Recycle", and verify that the PV is deleted once the domain and PVC are deleted
0 commit comments