@@ -121,18 +121,24 @@ protected List<V1ServicePort> createServicePorts() {
121
121
V1ServicePort port =
122
122
new V1ServicePort ()
123
123
.name (LegalNames .toDNS1123LegalName (nap .getName ()))
124
- .port (nap .getListenPort ());
124
+ .port (nap .getListenPort ())
125
+ .protocol ("TCP" );
125
126
ports .add (port );
126
127
}
127
128
}
128
129
if (scan .getListenPort () != null ) {
129
- ports .add (new V1ServicePort ().name ("default" ).port (scan .getListenPort ()));
130
+ ports .add (new V1ServicePort ().name ("default" ).port (scan .getListenPort ()). protocol ( "TCP" ) );
130
131
}
131
132
if (scan .getSslListenPort () != null ) {
132
- ports .add (new V1ServicePort ().name ("default-secure" ).port (scan .getSslListenPort ()));
133
+ ports .add (
134
+ new V1ServicePort ()
135
+ .name ("default-secure" )
136
+ .port (scan .getSslListenPort ())
137
+ .protocol ("TCP" ));
133
138
}
134
139
if (scan .getAdminPort () != null ) {
135
- ports .add (new V1ServicePort ().name ("default-admin" ).port (scan .getAdminPort ()));
140
+ ports .add (
141
+ new V1ServicePort ().name ("default-admin" ).port (scan .getAdminPort ()).protocol ("TCP" ));
136
142
}
137
143
return ports ;
138
144
}
@@ -619,23 +625,31 @@ protected List<V1ServicePort> createServicePorts() {
619
625
V1ServicePort port =
620
626
new V1ServicePort ()
621
627
.name (LegalNames .toDNS1123LegalName (nap .getName ()))
622
- .port (nap .getListenPort ());
628
+ .port (nap .getListenPort ())
629
+ .protocol ("TCP" );
623
630
ports .putIfAbsent (nap .getName (), port );
624
631
}
625
632
}
626
633
if (server .getListenPort () != null ) {
627
634
ports .putIfAbsent (
628
- "default" , new V1ServicePort ().name ("default" ).port (server .getListenPort ()));
635
+ "default" ,
636
+ new V1ServicePort ().name ("default" ).port (server .getListenPort ()).protocol ("TCP" ));
629
637
}
630
638
if (server .getSslListenPort () != null ) {
631
639
ports .putIfAbsent (
632
640
"defaultSecure" ,
633
- new V1ServicePort ().name ("default-secure" ).port (server .getSslListenPort ()));
641
+ new V1ServicePort ()
642
+ .name ("default-secure" )
643
+ .port (server .getSslListenPort ())
644
+ .protocol ("TCP" ));
634
645
}
635
646
if (server .getAdminPort () != null ) {
636
647
ports .putIfAbsent (
637
648
"defaultAdmin" ,
638
- new V1ServicePort ().name ("default-admin" ).port (server .getAdminPort ()));
649
+ new V1ServicePort ()
650
+ .name ("default-admin" )
651
+ .port (server .getAdminPort ())
652
+ .protocol ("TCP" ));
639
653
}
640
654
}
641
655
if (!ports .isEmpty ()) {
@@ -831,7 +845,8 @@ protected List<V1ServicePort> createServicePorts() {
831
845
new V1ServicePort ()
832
846
.name (LegalNames .toDNS1123LegalName (nap .getName ()))
833
847
.port (nap .getListenPort ())
834
- .nodePort (nodePort );
848
+ .nodePort (nodePort )
849
+ .protocol ("TCP" );
835
850
ports .add (port );
836
851
}
837
852
}
@@ -841,7 +856,11 @@ protected List<V1ServicePort> createServicePorts() {
841
856
if (c != null ) {
842
857
Integer nodePort = Optional .ofNullable (c .getNodePort ()).orElse (scan .getListenPort ());
843
858
ports .add (
844
- new V1ServicePort ().name ("default" ).port (scan .getListenPort ()).nodePort (nodePort ));
859
+ new V1ServicePort ()
860
+ .name ("default" )
861
+ .port (scan .getListenPort ())
862
+ .nodePort (nodePort )
863
+ .protocol ("TCP" ));
845
864
}
846
865
}
847
866
if (scan .getSslListenPort () != null ) {
@@ -852,7 +871,8 @@ protected List<V1ServicePort> createServicePorts() {
852
871
new V1ServicePort ()
853
872
.name ("default-secure" )
854
873
.port (scan .getSslListenPort ())
855
- .nodePort (nodePort ));
874
+ .nodePort (nodePort )
875
+ .protocol ("TCP" ));
856
876
}
857
877
}
858
878
if (scan .getAdminPort () != null ) {
@@ -863,7 +883,8 @@ protected List<V1ServicePort> createServicePorts() {
863
883
new V1ServicePort ()
864
884
.name ("default-admin" )
865
885
.port (scan .getAdminPort ())
866
- .nodePort (nodePort ));
886
+ .nodePort (nodePort )
887
+ .protocol ("TCP" ));
867
888
}
868
889
}
869
890
return ports ;
0 commit comments