From 4fa6cf76d3a095b71d4a0fba5488cf9ac1cccfa3 Mon Sep 17 00:00:00 2001 From: Paulo Sousa Date: Fri, 18 Oct 2024 14:24:10 -0300 Subject: [PATCH] k8s: fix fillPorts function signature --- pkg/k8s/k8s.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/k8s/k8s.go b/pkg/k8s/k8s.go index 44a1730d..4e7c2baa 100644 --- a/pkg/k8s/k8s.go +++ b/pkg/k8s/k8s.go @@ -236,7 +236,7 @@ func NewService(n *v1alpha1.Nginx) *corev1.Service { Annotations: annotations, }, Spec: corev1.ServiceSpec{ - Ports: fillPorts(*n, nginxService(n)), + Ports: fillPorts(n, nginxService(n)), Selector: labelSelector, LoadBalancerIP: lbIP, Type: nginxService(n), @@ -250,7 +250,7 @@ func NewService(n *v1alpha1.Nginx) *corev1.Service { return &service } -func fillPorts(n v1alpha1.Nginx, t corev1.ServiceType) []corev1.ServicePort { +func fillPorts(n *v1alpha1.Nginx, t corev1.ServiceType) []corev1.ServicePort { if n.Spec.PodTemplate.Ports != nil && t == corev1.ServiceTypeLoadBalancer { ports := make([]corev1.ServicePort, 0) for _, port := range n.Spec.PodTemplate.Ports {