Skip to content
19 changes: 19 additions & 0 deletions kubernetes/samples/scripts/common/utility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,25 @@ function toDNS1123Legal {
echo "$val"
}

#
# Check the state of a persistent volume.
# $1 - name of volume
# $2 - expected state of volume
function checkPvState {

echo "Checking if the persistent volume ${1:?} is ${2:?}"
local pv_state=`kubectl get pv $1 -o jsonpath='{.status.phase}'`
attempts=0
while [ ! "$pv_state" = "$2" ] && [ ! $attempts -eq 10 ]; do
attempts=$((attempts + 1))
sleep 1
pv_state=`kubectl get pv $1 -o jsonpath='{.status.phase}'`
done
if [ "$pv_state" != "$2" ]; then
fail "The persistent volume state should be $2 but is $pv_state"
fi
}

#
# Function to check if a persistent volume exists
# $1 - name of volume
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ managedServerNameBase: managed-server
managedServerPort: 8001

# WebLogic Docker image
weblogicImage: store/oracle/weblogic:12.2.1.3
image: store/oracle/weblogic:12.2.1.3

# Physical path of the domain's persistent storage.
# The following line must be uncomment and customized:
#weblogicDomainStoragePath: /scratch/k8s_dir/domain1
# Image pull policy
# Legal values are "IfNotPresent", "Always", or "Never"
imagePullPolicy: IfNotPresent

# Boolean indicating if production mode is enabled for the domain
productionModeEnabled: true
Expand All @@ -56,7 +56,7 @@ weblogicCredentialsSecretName: domain1-weblogic-credentials

# Name of the Kubernetes secret to access the Docker Store to pull the WebLogic Server Docker image
# The presence of the secret will be validated when this parameter is enabled.
#weblogicImagePullSecretName:
#imagePullSecretName:

# Port for the T3Channel of the NetworkAccessPoint
t3ChannelPort: 30012
Expand Down Expand Up @@ -85,7 +85,18 @@ javaOptions: -Dweblogic.StdoutDebugEnabled=false
# Name of the persistent volume claim
persistentVolumeClaimName: domain1-weblogic-domain-pvc

# Pod domain root dir
# This should match the directory in the WebLogic Server pod's file system that
# the domain's persistent volume is mounted on.
podDomainRootDir: /shared
# Mount path of the domain persistent volume. The default is /shared.
domainPVMountPath:

# Mount path of the directory where the create domain scripts are located inside the pod
# The default is /u01/weblogic.
createDomainScriptsMountPath:

# Script that creates the domain. The default is create-domain-job.sh.
createDomainScriptName:

# Directory to get all the create domain scripts and supporting files, including
# the script that is specified by the createDomainScriptName property.
# The default is the "wlst" subdirectory under the directory where the
# create-weblogic-sample-domain.sh script is located.
createDomainFilesDir:
Loading