From bd133431bfb1310c65e653b6c0a9308a5f934af9 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Tue, 5 Apr 2022 08:22:53 +0200 Subject: [PATCH] Ports labels were doubled --- generator/main.go | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/generator/main.go b/generator/main.go index 95c0285..3fd652e 100644 --- a/generator/main.go +++ b/generator/main.go @@ -281,23 +281,6 @@ func generateContainerPorts(s types.ServiceConfig, name string, container *helm. exists[int(port.Target)] = name } - // Get ports from label - if v, ok := s.Labels[helm.LABEL_PORT]; ok { - // split port by "," - ports := strings.Split(v, ",") - for _, port := range ports { - port, err := strconv.Atoi(port) - if err != nil { - log.Fatalf("The given port \"%v\" as container port in \"%s\" service is not an integer\n", v, name) - } - container.Ports = append(container.Ports, &helm.ContainerPort{ - Name: name, - ContainerPort: port, - }) - exists[port] = name - } - } - // manage the "expose" section to be a NodePort in Kubernetes for _, expose := range s.Expose {