Skip to content

Commit 5e530e1

Browse files
committed
add global option for istio.
1 parent 3e81080 commit 5e530e1

File tree

20 files changed

+247
-18
lines changed

20 files changed

+247
-18
lines changed

docs/domains/Domain.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@
225225
"description": "Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name",
226226
"type": "string"
227227
},
228+
"istioEnabled": {
229+
"description": "True if this domain is deployed under Istio. Defaults to false.",
230+
"type": "boolean"
231+
},
228232
"serverStartPolicy": {
229233
"description": "The strategy for deciding whether to start a server. Legal values are ADMIN_ONLY, NEVER, or IF_NEEDED.",
230234
"type": "string",

docs/domains/Domain.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ DomainSpec is a description of a domain.
2727
| `imagePullPolicy` | string | The image pull policy for the WebLogic Docker image. Legal values are Always, Never and IfNotPresent. Defaults to Always if image ends in :latest, IfNotPresent otherwise. |
2828
| `imagePullSecrets` | array of [Local Object Reference](k8s1.13.5.md#local-object-reference) | A list of image pull secrets for the WebLogic Docker image. |
2929
| `includeServerOutInPodLog` | Boolean | If true (the default), the server .out file will be included in the pod's stdout. |
30+
| `istioEnabled` | Boolean | True if this domain is deployed under Istio. Defaults to false. |
3031
| `logHome` | string | The in-pod name of the directory in which to store the domain, node manager, server logs, and server *.out files |
3132
| `logHomeEnabled` | Boolean | Specified whether the log home folder is enabled. Not required. Defaults to true if domainHomeInImage is false. Defaults to false if domainHomeInImage is true. |
3233
| `managedServers` | array of [Managed Server](#managed-server) | Configuration for the managed servers. |

docs/domains/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,10 @@
11451145
"description": "Domain unique identifier. Must be unique across the Kubernetes cluster. Not required. Defaults to the value of metadata.name",
11461146
"type": "string"
11471147
},
1148+
"istioEnabled": {
1149+
"description": "True if this domain is deployed under Istio. Defaults to false.",
1150+
"type": "boolean"
1151+
},
11481152
"serverStartPolicy": {
11491153
"description": "The strategy for deciding whether to start a server. Legal values are ADMIN_ONLY, NEVER, or IF_NEEDED.",
11501154
"type": "string",

kubernetes/charts/weblogic-operator/templates/_operator-dep.tpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ spec:
4040
- name: "REMOTE_DEBUG_PORT"
4141
value: {{ .internalDebugHttpPort | quote }}
4242
{{- end }}
43+
- name: ISTIO_ENABLED
44+
value: {{ .istioEnabled | quote }}
4345
{{- if .mockWLS }}
4446
- name: "MOCK_WLS"
4547
value: "true"

kubernetes/charts/weblogic-operator/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,6 @@ elasticSearchHost: "elasticsearch.default.svc.cluster.local"
9696
# elasticSearchPort specifies the port number of where elasticsearch is running.
9797
# This parameter is ignored if 'elkIntegrationEnabled' is false.
9898
elasticSearchPort: 9200
99+
100+
# istioEnabled specifies whether or not it is deployed under Istio.
101+
istioEnabled: false

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ spec:
4747
value: "%JAVA_OPTIONS%"
4848
- name: USER_MEM_ARGS
4949
value: "-XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom "
50+
- name: ISTIO_ENABLED
51+
value: "%ISTIO_ENABLED%"
5052
%LOG_HOME_ON_PV_PREFIX%volumes:
5153
%LOG_HOME_ON_PV_PREFIX%- name: weblogic-domain-storage-volume
5254
%LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim:
@@ -75,3 +77,5 @@ spec:
7577
replicas: %INITIAL_MANAGED_SERVER_REPLICAS%
7678
# The number of managed servers to start for unlisted clusters
7779
# replicas: 1
80+
#
81+
istioEnabled: %ISTIO_ENABLED%

kubernetes/samples/scripts/common/utility.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ function createFiles {
368368
sed -i -e "s:%CUSTOM_RCUPREFIX%:${rcuSchemaPrefix}:g" ${createJobOutput}
369369
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}
371372

372373
# Generate the yaml to create the kubernetes job that will delete the weblogic domain_home folder
373374
echo Generating ${deleteJobOutput}
@@ -423,6 +424,7 @@ function createFiles {
423424
sed -i -e "s:%EXPOSE_T3_CHANNEL_PREFIX%:${exposeAdminT3ChannelPrefix}:g" ${dcrOutput}
424425
sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${dcrOutput}
425426
sed -i -e "s:%INITIAL_MANAGED_SERVER_REPLICAS%:${initialManagedServerReplicas}:g" ${dcrOutput}
427+
sed -i -e "s:%ISTIO_ENABLED%:${istioEnabled}:g" ${dcrOutput}
426428

427429
if [ "${domainHomeInImage}" == "true" ]; then
428430

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,6 @@ createDomainScriptName: create-domain-job.sh
134134
# Kubernetes config map, which in turn is mounted to the `createDomainScriptsMountPath`,
135135
# so that the Kubernetes pod can use the scripts and supporting files to create a domain home.
136136
createDomainFilesDir: wlst
137+
138+
# istioEnabled specifies whether or not it is deployed under Istio.
139+
istioEnabled: false

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ metadata:
88
spec:
99
template:
1010
metadata:
11+
annotations:
12+
sidecar.istio.io/inject: "false"
1113
labels:
1214
weblogic.resourceVersion: domain-v2
1315
weblogic.domainUID: %DOMAIN_UID%
@@ -67,6 +69,8 @@ spec:
6769
value: "%DOMAIN_HOME%"
6870
- name: DOMAIN_LOGS_DIR
6971
value: "%DOMAIN_ROOT_DIR%/logs/%DOMAIN_UID%"
72+
- name: ISTIO_ENABLED
73+
value: "%ISTIO_ENABLED%"
7074
volumes:
7175
- name: create-weblogic-sample-domain-job-cm-volume
7276
configMap:

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/delete-domain-job-template.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 2018, 2019 Oracle Corporation and/or its affiliates. All rights reserved.
22
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
33
apiVersion: v1
44
kind: ConfigMap
@@ -26,6 +26,8 @@ metadata:
2626
spec:
2727
template:
2828
metadata:
29+
annotations:
30+
sidecar.istio.io/inject: "false"
2931
labels:
3032
weblogic.resourceVersion: domain-v2
3133
weblogic.domainUID: %DOMAIN_UID%

0 commit comments

Comments
 (0)