File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
operator/src/main/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -115,12 +115,15 @@ protected V1ServiceSpec createServiceSpec() {
115115
116116 protected List <V1ServicePort > createServicePorts () {
117117 List <V1ServicePort > ports = new ArrayList <>();
118- for (NetworkAccessPoint nap : scan .getNetworkAccessPoints ()) {
119- V1ServicePort port = new V1ServicePort ()
120- .name (nap .getName ())
121- .port (nap .getListenPort ())
122- .protocol (nap .getProtocol ());
123- ports .add (port );
118+ if (scan != null ) {
119+ for (NetworkAccessPoint nap : scan .getNetworkAccessPoints ()) {
120+ V1ServicePort port =
121+ new V1ServicePort ()
122+ .name (nap .getName ())
123+ .port (nap .getListenPort ())
124+ .protocol (nap .getProtocol ());
125+ ports .add (port );
126+ }
124127 }
125128 ports .add (createServicePort ());
126129 return ports ;
You can’t perform that action at this time.
0 commit comments