File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
main/java/oracle/kubernetes/operator/helpers
test/java/oracle/kubernetes/operator/helpers Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ protected V1ServiceSpec createServiceSpec() {
97
97
if (isPublishNotReadyAddressesSupported ()) {
98
98
serviceSpec .setPublishNotReadyAddresses (Boolean .TRUE );
99
99
}
100
- serviceSpec .clusterIP ("None" );
100
+ if (nodePort == null ) {
101
+ serviceSpec .clusterIP ("None" );
102
+ }
101
103
return serviceSpec ;
102
104
}
103
105
Original file line number Diff line number Diff line change @@ -442,7 +442,7 @@ public void whenNodePortSpecified_createServerServiceWithNodePort() {
442
442
}
443
443
444
444
private V1Service withNodePort (V1Service service , int nodePort ) {
445
- service .getSpec ().setType ("NodePort" );
445
+ service .getSpec ().type ("NodePort" ). clusterIP ( null );
446
446
service
447
447
.getSpec ()
448
448
.getPorts ()
You can’t perform that action at this time.
0 commit comments