Skip to content

Commit

Permalink
port = 0 is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
chetan-spheron committed Oct 15, 2024
1 parent 9f9bcde commit 9ce2917
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/manifest/v2beta2/serviceexpose.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ func (s *ServiceExpose) GetEndpoints() types.Endpoints {
}

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

Expand Down

0 comments on commit 9ce2917

Please sign in to comment.