Skip to content

Commit ac6ac83

Browse files
committed
Admin to external channel suffix
1 parent 2b2733a commit ac6ac83

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/utils/Domain.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public void verifyServicesCreated() throws Exception {
131131
+ domainUid
132132
+ "-"
133133
+ adminServerName
134-
+ "-admin) is created");
135-
TestUtils.checkServiceCreated(domainUid + "-" + adminServerName + "-admin", domainNS);
134+
+ "-external) is created");
135+
TestUtils.checkServiceCreated(domainUid + "-" + adminServerName + "-external", domainNS);
136136
}
137137
if (domainMap.get("serverStartPolicy") == null
138138
|| (domainMap.get("serverStartPolicy") != null

integration-tests/src/test/java/oracle/kubernetes/operator/utils/K8sTestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public void verifyServices(String labelSelectors, int expected) throws Exception
163163
null,
164164
Boolean.FALSE);
165165
/**
166-
* TODO verify name pattern {domainUID}-admin-server {domainUID}-admin-server-admin
166+
* TODO verify name pattern {domainUID}-admin-server {domainUID}-admin-server-external
167167
* {domainUID}-cluster-cluster-1 {domainUID}-managed-server1 {domainUID}-managed-server2
168168
*/
169169
assertEquals("Number of services", v1ServiceList.getItems().size(), expected);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ Here is an example of the output of this command:
346346
```
347347
$ kubectl get services
348348
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
349-
domain1-admin-server NodePort 10.96.206.134 <none> 7001:30701/TCP 23m
350-
domain1-admin-server-admin NodePort 10.107.164.241 <none> 30012:30012/TCP 22m
349+
domain1-admin-server ClusterIP 10.96.206.134 <none> 7001/TCP 23m
350+
domain1-admin-server-external NodePort 10.107.164.241 <none> 30012:30012/TCP 22m
351351
domain1-cluster-cluster-1 ClusterIP 10.109.133.168 <none> 8001/TCP 22m
352352
domain1-managed-server1 ClusterIP None <none> 8001/TCP 22m
353353
domain1-managed-server2 ClusterIP None <none> 8001/TCP 22m

operator/src/main/java/oracle/kubernetes/operator/DomainProcessorImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ private static Step[] bringAdminServerUpSteps(DomainPresenceInfo info, Step next
10131013
AdminService adminService = adminServer != null ? adminServer.getAdminService() : null;
10141014
List<Channel> channels = adminService != null ? adminService.getChannels() : null;
10151015
if (channels != null && !channels.isEmpty()) {
1016-
resources.add(ServiceHelper.createForAdminServiceStep(null));
1016+
resources.add(ServiceHelper.createForExternalServiceStep(null));
10171017
}
10181018

10191019
resources.add(ServiceHelper.createForServerStep(null));

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class LegalNames {
1010
private static final String SERVER_PATTERN = "%s-%s";
1111
private static final String CLUSTER_SERVICE_PATTERN = "%s-cluster-%s";
1212
private static final String DOMAIN_INTROSPECTOR_JOB_PATTERN = "%s-introspect-domain-job";
13-
private static final String ADMIN_SERVICE_PATTERN = "%s-%s-admin";
13+
private static final String EXTERNAL_SERVICE_PATTERN = "%s-%s-external";
1414

1515
public static String toServerServiceName(String domainUID, String serverName) {
1616
return toServerName(domainUID, serverName);
@@ -32,8 +32,8 @@ static String toJobIntrospectorName(String domainUID) {
3232
return toDNS1123LegalName(String.format(DOMAIN_INTROSPECTOR_JOB_PATTERN, domainUID));
3333
}
3434

35-
static String toAdminServiceName(String domainUID, String serverName) {
36-
return toDNS1123LegalName(String.format(ADMIN_SERVICE_PATTERN, domainUID, serverName));
35+
static String toExternalServiceName(String domainUID, String serverName) {
36+
return toDNS1123LegalName(String.format(EXTERNAL_SERVICE_PATTERN, domainUID, serverName));
3737
}
3838
/**
3939
* Converts value to nearest DNS-1123 legal name, which can be used as a Kubernetes identifier

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -767,35 +767,35 @@ private static boolean validateCurrentService(V1Service build, V1Service current
767767
}
768768

769769
/**
770-
* Create asynchronous step for admin service
770+
* Create asynchronous step for external, NodePort service
771771
*
772772
* @param next Next processing step
773-
* @return Step for creating admin service
773+
* @return Step for creating external service
774774
*/
775-
public static Step createForAdminServiceStep(Step next) {
776-
return new ForAdminServiceStep(next);
775+
public static Step createForExternalServiceStep(Step next) {
776+
return new ForExternalServiceStep(next);
777777
}
778778

779-
private static class ForAdminServiceStep extends ServiceHelperStep {
780-
ForAdminServiceStep(Step next) {
779+
private static class ForExternalServiceStep extends ServiceHelperStep {
780+
ForExternalServiceStep(Step next) {
781781
super(next);
782782
}
783783

784784
@Override
785785
protected ServiceStepContext createContext(Packet packet) {
786-
return new ForAdminServiceStepContext(this, packet);
786+
return new ForExternalServiceStepContext(this, packet);
787787
}
788788
}
789789

790-
private static class ForAdminServiceStepContext extends ServerServiceStepContext {
790+
private static class ForExternalServiceStepContext extends ServerServiceStepContext {
791791

792-
ForAdminServiceStepContext(Step conflictStep, Packet packet) {
792+
ForExternalServiceStepContext(Step conflictStep, Packet packet) {
793793
super(conflictStep, packet);
794794
}
795795

796796
@Override
797797
protected String createServiceName() {
798-
return LegalNames.toAdminServiceName(getDomainUID(), getServerName());
798+
return LegalNames.toExternalServiceName(getDomainUID(), getServerName());
799799
}
800800

801801
@Override

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ def validateDynamicClusterDynamicServersDoNotUseCalculatedListenPorts(self, clus
488488
self.addError("The dynamic cluster " + self.name(cluster) + "'s dynamic servers use calculated listen ports.")
489489

490490
def validateServerCustomChannelName(self):
491-
reservedNames = ['default','defaultSecure','defaultAdmin']
491+
reservedNames = ['default','default-secure','default-admin']
492492
for server in self.env.getDomain().getServers():
493493
naps = server.getNetworkAccessPoints()
494494
for nap in naps:

site/wlst.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Using WLST
22

3-
You can use the WebLogic Scripting Tool (WLST) to manage a domain running in Kubernetes. If the domain was configured to expose a T3 channel using the `exposeAdminT3Channel` setting when creating the domain, then the matching T3 service can be used to connect. For example, if the `domainUID` is `domain1`, and the Administration Server name is `admin-server`, then the service would be called:
3+
You can use the WebLogic Scripting Tool (WLST) to manage a domain running in Kubernetes. If the administration server was configured to expose a T3 channel using the `exposeAdminT3Channel` setting when creating the domain, then the matching T3 service can be used to connect. For example, if the `domainUID` is `domain1`, and the Administration Server name is `admin-server`, then the service would be called:
44

55
```
6-
domain1-admin-server-admin
6+
domain1-admin-server-external
77
```
88

99
This service will be in the same namespace as the domain. The external port number can be obtained by checking this service’s `nodePort`:
1010

1111
```
12-
$ kubectl get service domain1-admin-server-admin -n domain1 -o jsonpath='{.spec.ports[0].nodePort}'
12+
$ kubectl get service domain1-admin-server-external -n domain1 -o jsonpath='{.spec.ports[0].nodePort}'
1313
30012
1414
```
1515

0 commit comments

Comments
 (0)