Skip to content

Commit e90d08a

Browse files
committed
Merge branch 'update-samples' into 'main'
Update samples to use fully qualified CRD types with kubectl See merge request weblogic-cloud/weblogic-kubernetes-operator!4712 (cherry picked from commit e93b082) eafee94 Update samples to use fully qualified CRD types with kubectl
1 parent a0aac04 commit e90d08a

File tree

13 files changed

+38
-38
lines changed

13 files changed

+38
-38
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -978,9 +978,9 @@ getClusterResource() {
978978

979979
clusterReferences=$(echo ${domainJson} | jq -r .spec.clusters[].name)
980980
for clusterReference in ${clusterReferences}; do
981-
clusterNameFromReference=$(${kubernetesCli} get cluster "${clusterReference}" -n ${domainNamespace} -o json --ignore-not-found | jq -r .spec.clusterName)
981+
clusterNameFromReference=$(${kubernetesCli} get cluster.v1.weblogic.oracle "${clusterReference}" -n ${domainNamespace} -o json --ignore-not-found | jq -r .spec.clusterName)
982982
if [ -z "${clusterNameFromReference}" ]; then
983-
clusterNameFromReference=$(${kubernetesCli} get cluster "${clusterReference}" -n ${domainNamespace} -o json --ignore-not-found | jq -r .metadata.name)
983+
clusterNameFromReference=$(${kubernetesCli} get cluster.vi.weblogic.oracle "${clusterReference}" -n ${domainNamespace} -o json --ignore-not-found | jq -r .metadata.name)
984984
fi
985985
if [ "${clusterNameFromReference}" == "${clusterName}" ]; then
986986
__clusterResource=$clusterReference
@@ -1045,10 +1045,10 @@ executePatchCommand() {
10451045
local verboseMode=$5
10461046

10471047
if [ "${verboseMode}" == "true" ]; then
1048-
printInfo "Executing command --> ${kubernetesCli} patch domain ${domainUid} \
1048+
printInfo "Executing command --> ${kubernetesCli} patch domain.v9.weblogic.oracle ${domainUid} \
10491049
-n ${domainNamespace} --type=merge --patch \"${patchJson}\""
10501050
fi
1051-
${kubernetesCli} patch domain ${domainUid} -n ${domainNamespace} --type=merge --patch "${patchJson}"
1051+
${kubernetesCli} patch domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} --type=merge --patch "${patchJson}"
10521052
}
10531053

10541054
#
@@ -1067,10 +1067,10 @@ executeClusterPatchCommand() {
10671067
local verboseMode=$5
10681068

10691069
if [ "${verboseMode}" == "true" ]; then
1070-
printInfo "Executing command --> ${kubernetesCli} patch cluster ${clusterResource} \
1070+
printInfo "Executing command --> ${kubernetesCli} patch cluster.v1.weblogic.oracle ${clusterResource} \
10711071
-n ${domainNamespace} --type=merge --patch \"${patchJson}\""
10721072
fi
1073-
${kubernetesCli} patch cluster ${clusterResource} -n ${domainNamespace} --type=merge --patch "${patchJson}"
1073+
${kubernetesCli} patch cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} --type=merge --patch "${patchJson}"
10741074
}
10751075

10761076
# timestamp

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -86,7 +86,7 @@ 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.v9.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -82,7 +82,7 @@ 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.v9.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -98,7 +98,7 @@ initialize() {
9898
initialize
9999

100100
# Get the domain in json format
101-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
101+
domainJson=$(${kubernetesCli} get domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
102102
if [ -z "${domainJson}" ]; then
103103
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."
104104
exit 1
@@ -115,7 +115,7 @@ fi
115115
getClusterResource "${domainJson}" "${domainNamespace}" "${clusterName}" clusterResource
116116

117117
# Get the cluster in json format
118-
clusterJson=$(${kubernetesCli} get cluster ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
118+
clusterJson=$(${kubernetesCli} get cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
119119
if [ -z "${clusterJson}" ]; then
120120
printError "Unable to get cluster resource for cluster '${clusterName}' in namespace '${domainNamespace}'. Please make sure that a Cluster exists for cluster '${clusterName}' and that this Cluster is referenced by the Domain."
121121
exit 1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -86,7 +86,7 @@ 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.v9.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2021, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2021, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -96,7 +96,7 @@ initialize() {
9696
initialize
9797

9898
# Get the domain in json format
99-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
99+
domainJson=$(${kubernetesCli} get domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
100100
if [ -z "${domainJson}" ]; then
101101
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."
102102
exit 1
@@ -113,7 +113,7 @@ fi
113113
getClusterResource "${domainJson}" "${domainNamespace}" "${clusterName}" clusterResource
114114

115115
# Get the cluster in json format
116-
clusterJson=$(${kubernetesCli} get cluster ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
116+
clusterJson=$(${kubernetesCli} get cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
117117
if [ -z "${clusterJson}" ]; then
118118
printError "Unable to get cluster resource for cluster '${clusterName}' in namespace '${domainNamespace}'. Please make sure that a Cluster exists for cluster '${clusterName}' and that this Cluster is referenced by the Domain."
119119
exit 1

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -90,7 +90,7 @@ initialize() {
9090
initialize
9191

9292
# Get the domain in json format
93-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
93+
domainJson=$(${kubernetesCli} get domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9494
if [ -z "${domainJson}" ]; then
9595
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."
9696
exit 1
@@ -105,7 +105,7 @@ fi
105105

106106
getClusterResource "${domainJson}" "${domainNamespace}" "${clusterName}" clusterResource
107107

108-
clusterJson=$(${kubernetesCli} get cluster ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
108+
clusterJson=$(${kubernetesCli} get cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
109109
if [ -z "${clusterJson}" ]; then
110110
printError "Unable to get cluster resource for cluster '${clusterName}' in namespace '${domainNamespace}'. Please make sure that a Cluster exists for cluster '${clusterName}' and that this Cluster is referenced by the Domain."
111111
exit 1

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -74,7 +74,7 @@ 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.v9.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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -141,7 +141,7 @@ initialize() {
141141
initialize
142142

143143
# Get the domain in json format
144-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
144+
domainJson=$(${kubernetesCli} get domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
145145
if [ -z "${domainJson}" ]; then
146146
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."
147147
exit 1
@@ -157,7 +157,7 @@ fi
157157
if [ -n "${clusterName}" ]; then
158158
getClusterResource "${domainJson}" "${domainNamespace}" "${clusterName}" clusterResource
159159

160-
clusterJson=$(${kubernetesCli} get cluster ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
160+
clusterJson=$(${kubernetesCli} get cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
161161
if [ -z "${clusterJson}" ]; then
162162
printError "Unable to get cluster resource for cluster '${clusterName}' in namespace '${domainNamespace}'. Please make sure that a Cluster exists for cluster '${clusterName}' and that this Cluster is referenced by the Domain."
163163
exit 1

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
2-
# Copyright (c) 2020, 2022, Oracle and/or its affiliates.
2+
# Copyright (c) 2020, 2024, Oracle and/or its affiliates.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
#
55

@@ -87,7 +87,7 @@ initialize() {
8787
initialize
8888

8989
# Get the domain in json format
90-
domainJson=$(${kubernetesCli} get domain ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
90+
domainJson=$(${kubernetesCli} get domain.v9.weblogic.oracle ${domainUid} -n ${domainNamespace} -o json --ignore-not-found)
9191
if [ -z "${domainJson}" ]; then
9292
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."
9393
exit 1
@@ -102,7 +102,7 @@ fi
102102

103103
getClusterResource "${domainJson}" "${domainNamespace}" "${clusterName}" clusterResource
104104

105-
clusterJson=$(${kubernetesCli} get cluster ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
105+
clusterJson=$(${kubernetesCli} get cluster.v1.weblogic.oracle ${clusterResource} -n ${domainNamespace} -o json --ignore-not-found)
106106
if [ -z "${clusterJson}" ]; then
107107
printError "Unable to get cluster resource for cluster '${clusterName}' in namespace '${domainNamespace}'. Please make sure that a Cluster exists for cluster '${clusterName}' and that this Cluster is referenced by the Domain."
108108
exit 1

0 commit comments

Comments
 (0)