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 {
9292 private final KubernetesVersion version ;
9393 private final Integer port ;
9494 private final Integer nodePort ;
95+ private final WlsServerConfig scan ;
9596
9697 ForServerStepContext (Step conflictStep , Packet packet ) {
9798 super (conflictStep , packet );
9899 version = packet .getSPI (KubernetesVersion .class );
99100 port = (Integer ) packet .get (ProcessingConstants .PORT );
100101 nodePort = (Integer ) packet .get (ProcessingConstants .NODE_PORT );
102+ scan = (WlsServerConfig ) packet .get (ProcessingConstants .SERVER_SCAN );
101103 }
102104
103105 @ Override
@@ -109,9 +111,26 @@ protected V1ServiceSpec createServiceSpec() {
109111 if (nodePort == null ) {
110112 serviceSpec .clusterIP ("None" );
111113 }
114+ serviceSpec .ports (createServicePorts ());
112115 return serviceSpec ;
113116 }
114117
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+
115134 @ Override
116135 protected V1ServicePort createServicePort () {
117136 V1ServicePort servicePort = new V1ServicePort ().port (port );
You can’t perform that action at this time.
0 commit comments