Skip to content

Commit 4fb3eac

Browse files
committed
revise according to Mark's comments.
1 parent 54c9b9e commit 4fb3eac

File tree

6 files changed

+33
-17
lines changed

6 files changed

+33
-17
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ createDomainScriptName: create-domain-job.sh
136136
createDomainFilesDir: wlst
137137

138138
# istioEnabled specifies whether or not it is deployed under Istio.
139-
istioEnabled: true
139+
istioEnabled: false
140140

141141
# istioReadinessPort specifies the WebLogic port for readiness probe which is used under Istio.
142-
istioReadinessPort: 8777
142+
istioReadinessPort: 8888

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wlst/istio-fix-domain.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
1+
# Copyright 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

44
def getEnvVar(var):
@@ -69,9 +69,14 @@ def getEnvVar(var):
6969
set('TwoWaySslEnabled', false)
7070
set('ClientCertificateEnforced', false)
7171

72-
cd('/Servers/%s/NetworkAccessPoints/T3Channel' % admin_server_name)
73-
set('ListenAddress', '127.0.0.1')
72+
cd('/Servers/' + admin_server_name)
73+
delete('T3Channel', 'NetworkAccessPoint')
74+
create('istio-T3Channel', 'NetworkAccessPoint')
75+
cd('/Servers/%s/NetworkAccessPoints/istio-T3Channel' % admin_server_name)
76+
set('PublicPort', t3_channel_port)
7477
set('PublicAddress', domain_uid + '-' + admin_server_name)
78+
set('ListenAddress', '127.0.0.1')
79+
set('ListenPort', t3_channel_port)
7580

7681
templateName = cluster_name + "-template"
7782
cd('/ServerTemplates/%s' % templateName)

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,13 +505,23 @@ public void setConfigOverrideSecrets(@Nullable List<String> overridesSecretNames
505505
this.configOverrideSecrets = overridesSecretNames;
506506
}
507507

508+
/**
509+
* Test if the domain is deployed under Istio environment.
510+
*
511+
* @return istioEnabled
512+
*/
508513
boolean istioEnabled() {
509514
return Optional.ofNullable(experimental)
510515
.map(e -> e.getIstio())
511516
.map(i -> i.getEnabled())
512517
.orElse(false);
513518
}
514519

520+
/**
521+
* The WebLogic readiness port used under Istio environment.
522+
*
523+
* @return readinessPort
524+
*/
515525
int getIstioReadinessPort() {
516526
return Optional.ofNullable(experimental)
517527
.map(e -> e.getIstio())

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
public class Istio {
1313

1414
@Description(
15-
"True, if this domain is deployed under an Istio service mesh. Defaults to true. Not required.")
16-
private Boolean enabled = true;
15+
"True, if this domain is deployed under an Istio service mesh. Defaults to false. Not required.")
16+
private Boolean enabled = false;
1717

1818
@Description("The WebLogic readiness port for Istio. Defaults to 8888. Not required.")
19-
private Integer readinessPort = 8666;
19+
private Integer readinessPort = 8888;
2020

2121
/**
2222
* True, if this domain is deployed under an Istio service mesh.
@@ -37,7 +37,7 @@ public void setEnabled(Boolean enabled) {
3737
}
3838

3939
/**
40-
* Get the readyness port.
40+
* Get the readiness port.
4141
*
4242
* @return the readiness port.
4343
*/

operator/src/main/java/oracle/kubernetes/operator/helpers/CrdHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ static V1beta1CustomResourceDefinition createModel(KubernetesVersion version) {
111111

112112
static V1ObjectMeta createMetadata() {
113113
return new V1ObjectMeta()
114-
.name(KubernetesConstants.CRD_NAME);
114+
.name(KubernetesConstants.CRD_NAME)
115+
.putLabelsItem(LabelConstants.RESOURCE_VERSION_LABEL, DEFAULT_OPERATOR_VERSION);
115116
}
116117

117118
static V1beta1CustomResourceDefinitionSpec createSpec(KubernetesVersion version) {

operator/src/main/resources/scripts/introspectDomain.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -853,13 +853,13 @@ def customizeNetworkAccessPoint(self, nap, listen_address):
853853
# FWIW there's theoretically no need to 'add' or 'replace' when empty
854854
# since the runtime default is the server listen-address.
855855
nap_name=nap.getName()
856-
if not (nap.getListenAddress() is None) and len(nap.getListenAddress()) > 0 and not (nap_name.startswith('istio-')) and not (nap_name == 'T3Channel'):
857-
self.writeln("<d:network-access-point>")
858-
self.indent()
859-
self.writeln("<d:name>" + nap_name + "</d:name>")
860-
self.writeListenAddress("force a replace",listen_address)
861-
self.undent()
862-
self.writeln("</d:network-access-point>")
856+
if not (nap.getListenAddress() is None) and len(nap.getListenAddress()) > 0 and not (nap_name.startswith('istio-')):
857+
self.writeln("<d:network-access-point>")
858+
self.indent()
859+
self.writeln("<d:name>" + nap_name + "</d:name>")
860+
self.writeListenAddress("force a replace",listen_address)
861+
self.undent()
862+
self.writeln("</d:network-access-point>")
863863

864864
def getLogOrNone(self,server):
865865
try:

0 commit comments

Comments
 (0)