Skip to content

Commit 19c4b42

Browse files
authored
Owls 102818 - Changes to the lifecycle scripts to explicitly use v8 so they work correctly even when v9 is installed (#3454)
* Changes to the lifecycle scripts to explicitly use v8 so they work correctly even when v9 is installed. * Fix the patch command.
1 parent 352daeb commit 19c4b42

File tree

13 files changed

+15
-15
lines changed

13 files changed

+15
-15
lines changed

kubernetes/samples/scripts/domain-lifecycle/clusterStatus.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function clusterStatus() {
7070

7171
local __val
7272
for __val in \
73-
$($__kubernetes_cli $__ns_filter get domains \
73+
$($__kubernetes_cli $__ns_filter get domains.v8.weblogic.oracle \
7474
-o=jsonpath='{range .items[*]}{.metadata.namespace}{","}{.metadata.name}{","}{.spec.domainUID}{"\n"}{end}')
7575
do
7676
local __ns_cur=$( echo $__val | cut -d ',' -f 1)
@@ -97,7 +97,7 @@ function clusterStatus() {
9797
__jp+='{"\n"}'
9898
__jp+='{end}'
9999

100-
$__kubernetes_cli -n "$__ns_cur" get domain "$__uid_cur" -o=jsonpath="$__jp"
100+
$__kubernetes_cli -n "$__ns_cur" get domain.v8.weblogic.oracle "$__uid_cur" -o=jsonpath="$__jp"
101101

102102
done | sed 's/~!\([0-9][0-9]*\)/\1/g'\
103103
| sed 's/~!/0/g' \

kubernetes/samples/scripts/domain-lifecycle/helper.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,10 @@ executePatchCommand() {
10041004
local verboseMode=$5
10051005

10061006
if [ "${verboseMode}" == "true" ]; then
1007-
printInfo "Executing command --> ${kubernetesCli} patch domain ${domainUid} \
1007+
printInfo "Executing command --> ${kubernetesCli} patch domain.v8.weblogic.oracle ${domainUid} \
10081008
-n ${domainNamespace} --type=merge --patch \"${patchJson}\""
10091009
fi
1010-
${kubernetesCli} patch domain ${domainUid} -n ${domainNamespace} --type=merge --patch "${patchJson}"
1010+
${kubernetesCli} patch domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} --type=merge --patch "${patchJson}"
10111011
}
10121012

10131013
# timestamp

kubernetes/samples/scripts/domain-lifecycle/introspectDomain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function initialize {
8686
initialize
8787

8888
# Get the domain in json format
89-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
89+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9090
if [ -z "${domainJson}" ]; then
9191
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
9292
exit 1

kubernetes/samples/scripts/domain-lifecycle/restartServer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ function initialize {
8282
initialize
8383

8484
# Get the domain in json format
85-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
85+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
8686
if [ -z "${domainJson}" ]; then
8787
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
8888
exit 1

kubernetes/samples/scripts/domain-lifecycle/rollCluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ function initialize {
9797
initialize
9898

9999
# Get the domain in json format
100-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
100+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
101101
if [ -z "${domainJson}" ]; then
102102
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
103103
exit 1

kubernetes/samples/scripts/domain-lifecycle/rollDomain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function initialize {
8686
initialize
8787

8888
# Get the domain in json format
89-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
89+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9090
if [ -z "${domainJson}" ]; then
9191
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
9292
exit 1

kubernetes/samples/scripts/domain-lifecycle/scaleCluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function initialize {
9595
initialize
9696

9797
# Get the domain in json format
98-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
98+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9999
if [ -z "${domainJson}" ]; then
100100
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
101101
exit 1

kubernetes/samples/scripts/domain-lifecycle/startCluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function initialize {
8989
initialize
9090

9191
# Get the domain in json format
92-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
92+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9393
if [ -z "${domainJson}" ]; then
9494
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
9595
exit 1

kubernetes/samples/scripts/domain-lifecycle/startDomain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function initialize {
7474
initialize
7575

7676
# Get the domain in json format
77-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
77+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
7878

7979
if [ -z "${domainJson}" ]; then
8080
printError "Domain resource for domain '${domainUid}' not found in namespace '${domainNamespace}'. Exiting."

kubernetes/samples/scripts/domain-lifecycle/startServer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function initialize {
138138
initialize
139139

140140
# Get the domain in json format
141-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
141+
domainJson=$(${kubernetesCli} get domain.v8.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
142142
if [ -z "${domainJson}" ]; then
143143
printError "Unable to get domain resource for domain '${domainUid}' in namespace '${domainNamespace}'. Please make sure the 'domain_uid' and 'namespace' specified by the '-d' and '-n' arguments are correct. Exiting."
144144
exit 1

0 commit comments

Comments
 (0)