diff --git a/pkg/master/controller.go b/pkg/master/controller.go index e83f0cacb3db1..ac5a86db1b695 100644 --- a/pkg/master/controller.go +++ b/pkg/master/controller.go @@ -272,7 +272,7 @@ func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, ser // maintained by this code, not by the pod selector Selector: nil, ClusterIP: serviceIP.String(), - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: serviceType, }, } diff --git a/pkg/master/controller_test.go b/pkg/master/controller_test.go index ec7d63158e86e..a20d82cd698d6 100644 --- a/pkg/master/controller_test.go +++ b/pkg/master/controller_test.go @@ -570,7 +570,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -625,7 +625,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -637,7 +637,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -658,7 +658,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -671,7 +671,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -691,7 +691,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -703,7 +703,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -723,7 +723,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -735,7 +735,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -755,7 +755,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -767,7 +767,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -787,7 +787,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -799,7 +799,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -819,7 +819,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeNodePort, }, }, @@ -831,7 +831,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -851,7 +851,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, }, @@ -910,7 +910,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) { }, Selector: nil, ClusterIP: "1.2.3.4", - SessionAffinity: api.ServiceAffinityClientIP, + SessionAffinity: api.ServiceAffinityNone, Type: api.ServiceTypeClusterIP, }, },