From 01c27291fbff654cacf24a9e650caf4e068484bc Mon Sep 17 00:00:00 2001 From: Nghia Tran Date: Sat, 30 Jun 2018 05:53:43 -0700 Subject: [PATCH] Remove ClusterIP=None specification --- pkg/controller/route/istio/service.go | 7 +++---- pkg/controller/route/istio/service_test.go | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/controller/route/istio/service.go b/pkg/controller/route/istio/service.go index 3719422df114..c1b85cba7585 100644 --- a/pkg/controller/route/istio/service.go +++ b/pkg/controller/route/istio/service.go @@ -24,9 +24,9 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) -// MakeRouteK8SService creates a Service that targets nothing, owned by the provided v1alpha1.Route. The purpose of -// this service is to provide a FQDN for Istio routing. Since Istio does not provide IP address routing, a ClusterIP is -// useless here. As a result we assign ClusterIP: "None" for this Service to avoid redundant IP assignment. +// MakeRouteK8SService creates a Service that targets nothing, owned +// by the provided v1alpha1.Route. The purpose of this service is to +// provide a domain name for Istio routing. func MakeRouteK8SService(route *v1alpha1.Route) *corev1.Service { return &corev1.Service{ ObjectMeta: metav1.ObjectMeta{ @@ -44,7 +44,6 @@ func MakeRouteK8SService(route *v1alpha1.Route) *corev1.Service { Port: PortNumber, }, }, - ClusterIP: "None", }, } } diff --git a/pkg/controller/route/istio/service_test.go b/pkg/controller/route/istio/service_test.go index dc078d2499fa..a0d0ccff4514 100644 --- a/pkg/controller/route/istio/service_test.go +++ b/pkg/controller/route/istio/service_test.go @@ -41,7 +41,6 @@ func TestMakeRouteK8SService_ValidSpec(t *testing.T) { Name: "http", Port: 80, }}, - ClusterIP: "None", } spec := MakeRouteK8SService(r).Spec if diff := cmp.Diff(expectedSpec, spec); diff != "" {