From c1970c26e4dc7b3a600922773193b97e340a3c45 Mon Sep 17 00:00:00 2001 From: Ilya Sosnovsky Date: Thu, 14 Oct 2021 08:11:07 +0300 Subject: [PATCH] Lowercase protocol for remote from k8s api --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 831b9d6..f3dcc9d 100644 --- a/main.go +++ b/main.go @@ -1188,7 +1188,7 @@ func getOvpnServerHostsFromKubeApi() []OpenvpnServer { if service.Status.LoadBalancer.Ingress[0].IP != "" { lbHost = service.Status.LoadBalancer.Ingress[0].IP } - hosts = append(hosts, OpenvpnServer{lbHost,strconv.Itoa(int(service.Spec.Ports[0].Port)),string(service.Spec.Ports[0].Protocol)}) + hosts = append(hosts, OpenvpnServer{lbHost,strconv.Itoa(int(service.Spec.Ports[0].Port)),strings.ToLower(string(service.Spec.Ports[0].Protocol))}) return hosts }