From 9ce29172d04a6a40d164a54c0141cf9b1784dd83 Mon Sep 17 00:00:00 2001 From: chetan-spheron Date: Tue, 15 Oct 2024 16:17:50 +0530 Subject: [PATCH] port = 0 is allowed --- go/manifest/v2beta2/serviceexpose.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go/manifest/v2beta2/serviceexpose.go b/go/manifest/v2beta2/serviceexpose.go index 0eed740d..a66aff0f 100644 --- a/go/manifest/v2beta2/serviceexpose.go +++ b/go/manifest/v2beta2/serviceexpose.go @@ -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 ") }