Skip to content

Commit 3bc589b

Browse files
committed
Fix Istio usage in sample domain.yaml
1 parent 7c91179 commit 3bc589b

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

kubernetes/charts/weblogic-operator/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ elasticSearchHost: "elasticsearch.default.svc.cluster.local"
101101
# This parameter is ignored if 'elkIntegrationEnabled' is false.
102102
elasticSearchPort: 9200
103103

104-
# experimental
105-
# istioEnabled specifies whether or not it is deployed under Istio.
104+
# Istio service mesh support is experimental.
105+
# istioEnabled specifies whether or not the domain is deployed under an Istio service mesh.
106106
istioEnabled: false

kubernetes/samples/scripts/common/domain-template.yaml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,47 @@ metadata:
1515
spec:
1616
# The WebLogic Domain Home
1717
domainHome: %DOMAIN_HOME%
18+
1819
# If the domain home is in the image
1920
domainHomeInImage: %DOMAIN_HOME_IN_IMAGE%
21+
2022
# The WebLogic Server Docker image that the Operator uses to start the domain
2123
image: "%WEBLOGIC_IMAGE%"
24+
2225
# imagePullPolicy defaults to "Always" if image version is :latest
2326
imagePullPolicy: "%WEBLOGIC_IMAGE_PULL_POLICY%"
27+
2428
# Identify which Secret contains the credentials for pulling an image
2529
%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets:
2630
%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%- name: %WEBLOGIC_IMAGE_PULL_SECRET_NAME%
31+
2732
# Identify which Secret contains the WebLogic Admin credentials (note that there is an example of
2833
# how to create that Secret at the end of this file)
2934
webLogicCredentialsSecret:
3035
name: %WEBLOGIC_CREDENTIALS_SECRET_NAME%
36+
3137
# Whether to include the server out file into the pod's stdout, default is true
3238
includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG%
39+
3340
# Whether to enable log home
3441
%LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED%
42+
3543
# The in-pod location for domain log, server logs, server out, and Node Manager log files
3644
%LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME%
45+
46+
# Istio service mesh support is experimental.
47+
%ISTIO_PREFIX%experimental:
48+
%ISTIO_PREFIX% istio:
49+
%ISTIO_PREFIX% enabled: %ISTIO_ENABLED%
50+
%ISTIO_PREFIX% readinessPort: %ISTIO_READINESS_PORT%
51+
3752
# serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY"
3853
# This determines which WebLogic Servers the Operator will start up when it discovers this Domain
3954
# - "NEVER" will not start any server in the domain
4055
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
4156
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
4257
serverStartPolicy: "%SERVER_START_POLICY%"
58+
4359
serverPod:
4460
# an (optional) list of environment variable to be set on the servers
4561
env:
@@ -54,6 +70,7 @@ spec:
5470
%LOG_HOME_ON_PV_PREFIX%volumeMounts:
5571
%LOG_HOME_ON_PV_PREFIX%- mountPath: %DOMAIN_ROOT_DIR%
5672
%LOG_HOME_ON_PV_PREFIX% name: weblogic-domain-storage-volume
73+
5774
# adminServer is used to configure the desired behavior for starting the administration server.
5875
adminServer:
5976
# serverStartState legal values are "RUNNING" or "ADMIN"
@@ -67,6 +84,7 @@ spec:
6784
%EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT%
6885
# Uncomment to export the T3Channel as a service
6986
%EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel
87+
7088
# clusters is used to configure the desired behavior for starting member servers of a cluster.
7189
# If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters.
7290
clusters:
@@ -75,8 +93,4 @@ spec:
7593
replicas: %INITIAL_MANAGED_SERVER_REPLICAS%
7694
# The number of managed servers to start for unlisted clusters
7795
# replicas: 1
78-
#
79-
experimental:
80-
istio:
81-
enabled: %ISTIO_ENABLED%
82-
readinessPort: %ISTIO_READINESS_PORT%
96+

kubernetes/samples/scripts/common/utility.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,12 @@ function createFiles {
366366
# extra entries for FMW Infra domains
367367
sed -i -e "s:%RCU_CREDENTIALS_SECRET_NAME%:${rcuCredentialsSecret}:g" ${createJobOutput}
368368
sed -i -e "s:%CUSTOM_RCUPREFIX%:${rcuSchemaPrefix}:g" ${createJobOutput}
369-
sed -i -e "s|%CUSTOM_CONNECTION_STRING%|${rcuDatabaseURL}|g" ${createJobOutput}
369+
sed -i -e "s:%CUSTOM_CONNECTION_STRING%:${rcuDatabaseURL}|g" ${createJobOutput}
370370
sed -i -e "s:%EXPOSE_T3_CHANNEL_PREFIX%:${exposeAdminT3Channel}:g" ${createJobOutput}
371-
sed -i -e "s|%ISTIO_ENABLED%|${istioEnabled}|g" ${createJobOutput}
372-
sed -i -e "s|%ISTIO_READINESS_PORT%|${istioReadinessPort}|g" ${createJobOutput}
371+
# entries for Istio
372+
sed -i -e "s:%ISTIO_PREFIX%:${istioPrefix}:g" ${createJobOutput}
373+
sed -i -e "s:%ISTIO_ENABLED%:${istioEnabled}|g" ${createJobOutput}
374+
sed -i -e "s:%ISTIO_READINESS_PORT%:${istioReadinessPort}|g" ${createJobOutput}
373375

374376
# Generate the yaml to create the kubernetes job that will delete the weblogic domain_home folder
375377
echo Generating ${deleteJobOutput}
@@ -399,6 +401,12 @@ function createFiles {
399401
logHomeOnPV=true
400402
fi
401403

404+
if [ "${istioEnabled}" == "true" ]; then
405+
istioPrefix="${enabledPrefix}"
406+
else
407+
istioPrefix="${disabledPrefix}"
408+
fi
409+
402410
# Generate the yaml file for creating the domain resource
403411
echo Generating ${dcrOutput}
404412

@@ -425,6 +433,7 @@ function createFiles {
425433
sed -i -e "s:%EXPOSE_T3_CHANNEL_PREFIX%:${exposeAdminT3ChannelPrefix}:g" ${dcrOutput}
426434
sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${dcrOutput}
427435
sed -i -e "s:%INITIAL_MANAGED_SERVER_REPLICAS%:${initialManagedServerReplicas}:g" ${dcrOutput}
436+
sed -i -e "s:%ISTIO_PREFIX%:${istioPrefix}:g" ${dcrOutput}
428437
sed -i -e "s:%ISTIO_ENABLED%:${istioEnabled}:g" ${dcrOutput}
429438
sed -i -e "s:%ISTIO_READINESS_PORT%:${istioReadinessPort}:g" ${dcrOutput}
430439

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ createDomainScriptName: create-domain-job.sh
135135
# so that the Kubernetes pod can use the scripts and supporting files to create a domain home.
136136
createDomainFilesDir: wlst
137137

138-
# experimental
138+
# Istio service mesh support is experimental.
139139
# istioEnabled specifies whether or not it is deployed under Istio.
140140
istioEnabled: false
141141

142-
# experimental
143-
# istioReadinessPort specifies the WebLogic port for readiness probe which is used under Istio.
142+
# Istio service mesh support is experimental.
143+
# istioReadinessPort specifies the WebLogic NAP port for use by the readiness probe
144144
istioReadinessPort: 8888

model/src/main/java/oracle/kubernetes/weblogic/domain/model/Istio.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
public class Istio {
1313

1414
@Description(
15-
"True, if this domain is deployed under an Istio service mesh. Defaults to false. Not required.")
16-
private Boolean enabled = false;
15+
"True, if this domain is deployed under an Istio service mesh. "
16+
+ "Defaults to true when the 'istio' element is included. Not required.")
17+
private Boolean enabled = true;
1718

1819
@Description("The WebLogic readiness port for Istio. Defaults to 8888. Not required.")
1920
private Integer readinessPort = 8888;

0 commit comments

Comments
 (0)