Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pkg/controller/route/istio/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -44,7 +44,6 @@ func MakeRouteK8SService(route *v1alpha1.Route) *corev1.Service {
Port: PortNumber,
},
},
ClusterIP: "None",
},
}
}
1 change: 0 additions & 1 deletion pkg/controller/route/istio/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 != "" {
Expand Down