Skip to content

Commit

Permalink
k8s: fix fillPorts function signature
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheu committed Oct 18, 2024
1 parent 863461b commit 70170f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/k8s/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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 {
Expand Down

0 comments on commit 70170f6

Please sign in to comment.