Skip to content

Commit 9215bca

Browse files
committed
domain input value for t3PublicAddress no longer set in domain input value files. Instead it is derived from kubernetes cluster IP address
1 parent eb0c7b3 commit 9215bca

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

kubernetes/samples/scripts/common/utility.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ function getKubernetesClusterIP {
207207
local SVR_ADDR=`eval ${SVR_ADDR_CMD}`
208208

209209
# Server address is expected to be of the form http://address:port. Delimit
210-
# string on the colon to obtain the address. Leave the "//" on the resulting string.
210+
# string on the colon to obtain the address.
211211
local array=(${SVR_ADDR//:/ })
212-
K8S_IP="${array[1]}"
212+
K8S_IP="${array[1]/\/\//}"
213+
213214
}
214215

215216
#
@@ -245,6 +246,11 @@ function createFiles {
245246
if [ "${exposeAdminT3Channel}" = true ]; then
246247
exposeAdminT3ChannelPrefix="${enabledPrefix}"
247248
exposeAnyChannelPrefix="${enabledPrefix}"
249+
# set t3PublicAddress if not set
250+
if [ -z "${t3PublicAddress}" ]; then
251+
getKubernetesClusterIP
252+
t3PublicAddress="${K8S_IP}"
253+
fi
248254
else
249255
exposeAdminT3ChannelPrefix="${disabledPrefix}"
250256
fi

kubernetes/samples/scripts/common/validate.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,6 @@ function validateCommonInputs {
342342
clusterName \
343343
managedServerNameBase \
344344
namespace \
345-
t3PublicAddress \
346345
includeServerOutInPodLog \
347346
version
348347

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ t3ChannelPort: 30012
9292
# kubernetes server address, which you can get by running "kubectl cluster-info". If this
9393
# value is not set to that address, WLST will not be able to connect from outside the
9494
# kubernetes cluster.
95-
t3PublicAddress: kubernetes
95+
#t3PublicAddress:
9696

9797
# Boolean to indicate if the channel should be exposed as a service
9898
exposeAdminT3Channel: false

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ function printSummary {
219219
echo "Domain ${domainName} was created and will be started by the WebLogic Kubernetes Operator"
220220
echo ""
221221
if [ "${exposeAdminNodePort}" = true ]; then
222-
echo "Administration console access is available at http:${K8S_IP}:${adminNodePort}/console"
222+
echo "Administration console access is available at http://${K8S_IP}:${adminNodePort}/console"
223223
fi
224224
if [ "${exposeAdminT3Channel}" = true ]; then
225-
echo "T3 access is available at t3:${K8S_IP}:${t3ChannelPort}"
225+
echo "T3 access is available at t3://${K8S_IP}:${t3ChannelPort}"
226226
fi
227227
echo "The following files were generated:"
228228
echo " ${domainOutputDir}/create-domain-inputs.yaml"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ t3ChannelPort: 30012
7676
# kubernetes server address, which you can get by running "kubectl cluster-info". If this
7777
# value is not set to that address, WLST will not be able to connect from outside the
7878
# kubernetes cluster.
79-
t3PublicAddress: kubernetes
79+
#t3PublicAddress:
8080

8181
# Boolean to indicate if the channel should be exposed as a service
8282
exposeAdminT3Channel: false

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ function printSummary {
243243
echo "Domain ${domainName} was created and will be started by the WebLogic Kubernetes Operator"
244244
echo ""
245245
if [ "${exposeAdminNodePort}" = true ]; then
246-
echo "Administration console access is available at http:${K8S_IP}:${adminNodePort}/console"
246+
echo "Administration console access is available at http://${K8S_IP}:${adminNodePort}/console"
247247
fi
248248
if [ "${exposeAdminT3Channel}" = true ]; then
249-
echo "T3 access is available at t3:${K8S_IP}:${t3ChannelPort}"
249+
echo "T3 access is available at t3://${K8S_IP}:${t3ChannelPort}"
250250
fi
251251
echo "The following files were generated:"
252252
echo " ${domainOutputDir}/create-domain-inputs.yaml"

0 commit comments

Comments
 (0)