From ee71d4a499e149b1e312d98e5972322c9195699f Mon Sep 17 00:00:00 2001 From: Saed SayedAhmed <34514167+saedx1@users.noreply.github.com> Date: Tue, 21 Jan 2025 04:27:36 -0500 Subject: [PATCH] Increase port number range (#7054) --- internal/configs/parsing_helpers.go | 2 +- internal/k8s/validation_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/configs/parsing_helpers.go b/internal/configs/parsing_helpers.go index 17c5050903..71786cc9a8 100644 --- a/internal/configs/parsing_helpers.go +++ b/internal/configs/parsing_helpers.go @@ -306,7 +306,7 @@ func ParsePortList(s string) ([]int, error) { } func parsePort(value string) (int, error) { - port, err := strconv.ParseInt(value, 10, 16) + port, err := strconv.ParseInt(value, 10, 32) if err != nil { return 0, fmt.Errorf("unable to parse port as integer: %w", err) } diff --git a/internal/k8s/validation_test.go b/internal/k8s/validation_test.go index 9ad4378968..ed71883af5 100644 --- a/internal/k8s/validation_test.go +++ b/internal/k8s/validation_test.go @@ -2014,7 +2014,7 @@ func TestValidateNginxIngressAnnotations(t *testing.T) { { annotations: map[string]string{ - "nginx.org/listen-ports": "80,8080,9090", + "nginx.org/listen-ports": "80,8080,9090,44313", }, specServices: map[string]bool{}, isPlus: false, @@ -2041,7 +2041,7 @@ func TestValidateNginxIngressAnnotations(t *testing.T) { { annotations: map[string]string{ - "nginx.org/listen-ports-ssl": "443,8443", + "nginx.org/listen-ports-ssl": "443,8443,44315", }, specServices: map[string]bool{}, isPlus: false,