Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e21ebbca
Commit
e21ebbca
authored
Mar 17, 2016
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
give the kubernetes service client ip session affinity
parent
c412dcba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
18 deletions
+18
-18
controller.go
pkg/master/controller.go
+1
-1
controller_test.go
pkg/master/controller_test.go
+17
-17
No files found.
pkg/master/controller.go
View file @
e21ebbca
...
...
@@ -210,7 +210,7 @@ func (c *Controller) CreateOrUpdateMasterServiceIfNeeded(serviceName string, ser
// maintained by this code, not by the pod selector
Selector
:
nil
,
ClusterIP
:
serviceIP
.
String
(),
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
serviceType
,
},
}
...
...
pkg/master/controller_test.go
View file @
e21ebbca
...
...
@@ -512,7 +512,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -560,7 +560,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -572,7 +572,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -593,7 +593,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -606,7 +606,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -626,7 +626,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -638,7 +638,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -658,7 +658,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -670,7 +670,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -690,7 +690,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -702,7 +702,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -722,7 +722,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -734,7 +734,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -754,7 +754,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeNodePort
,
},
},
...
...
@@ -766,7 +766,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -786,7 +786,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
@@ -838,7 +838,7 @@ func TestCreateOrUpdateMasterService(t *testing.T) {
},
Selector
:
nil
,
ClusterIP
:
"1.2.3.4"
,
SessionAffinity
:
api
.
ServiceAffinity
None
,
SessionAffinity
:
api
.
ServiceAffinity
ClientIP
,
Type
:
api
.
ServiceTypeClusterIP
,
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment