Skip to content

Commit 8e534e5

Browse files
authored
Merge pull request #1192 from oracle/istio-fix
Fix issues in the usage of Istio in the sample scripts
2 parents 939720f + bd4ceb0 commit 8e534e5

File tree

10 files changed

+49
-25
lines changed

10 files changed

+49
-25
lines changed

docs/charts/index.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
apiVersion: v1
22
entries:
33
weblogic-operator:
4-
- created: "2019-07-25T14:26:55.411022-04:00"
4+
- created: "2019-08-16T09:50:10.645794-04:00"
55
description: Helm chart for configuring the WebLogic operator.
6-
digest: 755825da5adcc30f57bca540509813aeb8d73ddd69d85e4f30b29d73696e2ee8
6+
digest: cbc6caaa6eb28e3c7e906ede14b2ae511a0b35fc12a8e3ab629155b09993e8b2
77
name: weblogic-operator
88
urls:
99
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.3.0.tgz
1010
version: 2.3.0
11-
- created: "2019-07-25T14:26:55.408716-04:00"
11+
- created: "2019-08-16T09:50:10.643754-04:00"
1212
description: Helm chart for configuring the WebLogic operator.
1313
digest: 23d5a1c554fa8211cc1e86b7ade09460917cb2069e68fb4bfdddafc8db44fdcd
1414
name: weblogic-operator
1515
urls:
1616
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.2.1.tgz
1717
version: 2.2.1
18-
- created: "2019-07-25T14:26:55.407036-04:00"
18+
- created: "2019-08-16T09:50:10.641237-04:00"
1919
description: Helm chart for configuring the WebLogic operator.
2020
digest: bba303686cb55d84fe8c0d693a2436e7e686b028085b56e012f6381699a3911f
2121
name: weblogic-operator
2222
urls:
2323
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.2.0.tgz
2424
version: 2.2.0
25-
- created: "2019-07-25T14:26:55.405384-04:00"
25+
- created: "2019-08-16T09:50:10.638374-04:00"
2626
description: Helm chart for configuring the WebLogic operator.
2727
digest: 391e23c0969ada5f0cd2a088ddc6f11f237f57521801ed3925db2149a8437a0d
2828
name: weblogic-operator
2929
urls:
3030
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.1.tgz
3131
version: "2.1"
32-
- created: "2019-07-25T14:26:55.403824-04:00"
32+
- created: "2019-08-16T09:50:10.636172-04:00"
3333
description: Helm chart for configuring the WebLogic operator.
3434
digest: 298acda78ab73db6b7ba6f2752311bfa40c65874e03fb196b70976192211c1a5
3535
name: weblogic-operator
3636
urls:
3737
- https://oracle.github.io/weblogic-kubernetes-operator/charts/weblogic-operator-2.0.1.tgz
3838
version: 2.0.1
39-
generated: "2019-07-25T14:26:55.401818-04:00"
39+
generated: "2019-08-16T09:50:10.633063-04:00"
19 Bytes
Binary file not shown.

docs/domains/Domain.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@
379379
"type": "number"
380380
},
381381
"enabled": {
382-
"description": "True, if this domain is deployed under an Istio service mesh. Defaults to false. Not required.",
382+
"description": "True, if this domain is deployed under an Istio service mesh. Defaults to true when the \u0027istio\u0027 element is included. Not required.",
383383
"type": "boolean"
384384
}
385385
}

docs/domains/Domain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ ServerPod describes the configuration for a Kubernetes pod for a server.
187187

188188
| Name | Type | Description |
189189
| --- | --- | --- |
190-
| `enabled` | Boolean | True, if this domain is deployed under an Istio service mesh. Defaults to false. Not required. |
190+
| `enabled` | Boolean | True, if this domain is deployed under an Istio service mesh. Defaults to true when the 'istio' element is included. Not required. |
191191
| `readinessPort` | number | The WebLogic readiness port for Istio. Defaults to 8888. Not required. |
192192

193193
### Probe Tuning

docs/domains/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@
12991299
"type": "number"
13001300
},
13011301
"enabled": {
1302-
"description": "True, if this domain is deployed under an Istio service mesh. Defaults to false. Not required.",
1302+
"description": "True, if this domain is deployed under an Istio service mesh. Defaults to true when the \u0027istio\u0027 element is included. Not required.",
13031303
"type": "boolean"
13041304
}
13051305
}

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
@@ -262,6 +262,12 @@ function createFiles {
262262
exposeAdminNodePortPrefix="${disabledPrefix}"
263263
fi
264264

265+
if [ "${istioEnabled}" == "true" ]; then
266+
istioPrefix="${enabledPrefix}"
267+
else
268+
istioPrefix="${disabledPrefix}"
269+
fi
270+
265271
# For some parameters, use the default value if not defined.
266272
if [ -z "${domainPVMountPath}" ]; then
267273
domainPVMountPath="/shared"
@@ -366,10 +372,12 @@ function createFiles {
366372
# extra entries for FMW Infra domains
367373
sed -i -e "s:%RCU_CREDENTIALS_SECRET_NAME%:${rcuCredentialsSecret}:g" ${createJobOutput}
368374
sed -i -e "s:%CUSTOM_RCUPREFIX%:${rcuSchemaPrefix}:g" ${createJobOutput}
369-
sed -i -e "s|%CUSTOM_CONNECTION_STRING%|${rcuDatabaseURL}|g" ${createJobOutput}
375+
sed -i -e "s:%CUSTOM_CONNECTION_STRING%:${rcuDatabaseURL}|g" ${createJobOutput}
370376
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}
377+
# entries for Istio
378+
sed -i -e "s:%ISTIO_PREFIX%:${istioPrefix}:g" ${createJobOutput}
379+
sed -i -e "s:%ISTIO_ENABLED%:${istioEnabled}|g" ${createJobOutput}
380+
sed -i -e "s:%ISTIO_READINESS_PORT%:${istioReadinessPort}|g" ${createJobOutput}
373381

374382
# Generate the yaml to create the kubernetes job that will delete the weblogic domain_home folder
375383
echo Generating ${deleteJobOutput}
@@ -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)