File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
operator/src/main/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,14 @@ private static class ForServerStepContext extends ServerServiceStepContext {
92
92
private final KubernetesVersion version ;
93
93
private final Integer port ;
94
94
private final Integer nodePort ;
95
+ private final WlsServerConfig scan ;
95
96
96
97
ForServerStepContext (Step conflictStep , Packet packet ) {
97
98
super (conflictStep , packet );
98
99
version = packet .getSPI (KubernetesVersion .class );
99
100
port = (Integer ) packet .get (ProcessingConstants .PORT );
100
101
nodePort = (Integer ) packet .get (ProcessingConstants .NODE_PORT );
102
+ scan = (WlsServerConfig ) packet .get (ProcessingConstants .SERVER_SCAN );
101
103
}
102
104
103
105
@ Override
@@ -109,9 +111,26 @@ protected V1ServiceSpec createServiceSpec() {
109
111
if (nodePort == null ) {
110
112
serviceSpec .clusterIP ("None" );
111
113
}
114
+ serviceSpec .ports (createServicePorts ());
112
115
return serviceSpec ;
113
116
}
114
117
118
+ protected List <V1ServicePort > createServicePorts () {
119
+ List <V1ServicePort > ports = new ArrayList <>();
120
+ if (scan != null ) {
121
+ for (NetworkAccessPoint nap : scan .getNetworkAccessPoints ()) {
122
+ V1ServicePort port =
123
+ new V1ServicePort ()
124
+ .name (nap .getName ())
125
+ .port (nap .getListenPort ())
126
+ .protocol (nap .getProtocol ());
127
+ ports .add (port );
128
+ }
129
+ }
130
+ ports .add (createServicePort ());
131
+ return ports ;
132
+ }
133
+
115
134
@ Override
116
135
protected V1ServicePort createServicePort () {
117
136
V1ServicePort servicePort = new V1ServicePort ().port (port );
You can’t perform that action at this time.
0 commit comments