Skip to content

Commit 9ce2917

Browse files
port = 0 is allowed
1 parent 9f9bcde commit 9ce2917

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/manifest/v2beta2/serviceexpose.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ func (s *ServiceExpose) GetEndpoints() types.Endpoints {
4141
}
4242

4343
func (s *ServiceExpose) validate(helper *validateManifestGroupsHelper) error {
44-
if s.Port == 0 || s.Port > math.MaxUint16 {
44+
// make port optional port = 0 is allowed
45+
if s.Port > math.MaxUint16 {
4546
return fmt.Errorf("port value must be 0 < value <= 65535 ")
4647
}
4748

0 commit comments

Comments
 (0)