From ac2382735c756b3c12f7593e33cf838022095923 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Wed, 1 Jun 2022 16:55:41 +0200 Subject: [PATCH] Add name to service port --- helm/service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helm/service.go b/helm/service.go index f1a7ec1..72983ba 100644 --- a/helm/service.go +++ b/helm/service.go @@ -1,5 +1,7 @@ package helm +import "strconv" + // Service is a Kubernetes service. type Service struct { *K8sBase `yaml:",inline"` @@ -24,6 +26,7 @@ type ServicePort struct { Protocol string `yaml:"protocol"` Port int `yaml:"port"` TargetPort int `yaml:"targetPort"` + Name string `yaml:"name"` } // NewServicePort creates a new initialized service port. @@ -32,6 +35,7 @@ func NewServicePort(port, target int) *ServicePort { Protocol: "TCP", Port: port, TargetPort: port, + Name: "port-" + strconv.Itoa(port), } }