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
dc07e4dc
Commit
dc07e4dc
authored
Jun 26, 2018
by
yue9944882
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes docs
parent
8e6f1c92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
service_controller.go
pkg/controller/service/service_controller.go
+5
-5
No files found.
pkg/controller/service/service_controller.go
View file @
dc07e4dc
...
@@ -235,9 +235,8 @@ func (s *ServiceController) init() error {
...
@@ -235,9 +235,8 @@ func (s *ServiceController) init() error {
return
nil
return
nil
}
}
// Returns an error if processing the service update failed, along with a time.Duration
// processServiceUpdate operates loadbalancers for the incoming service accordingly.
// indicating whether processing should be retried; zero means no-retry; otherwise
// Returns an error if processing the service update failed.
// we should retry in that Duration.
func
(
s
*
ServiceController
)
processServiceUpdate
(
cachedService
*
cachedService
,
service
*
v1
.
Service
,
key
string
)
error
{
func
(
s
*
ServiceController
)
processServiceUpdate
(
cachedService
*
cachedService
,
service
*
v1
.
Service
,
key
string
)
error
{
if
cachedService
.
state
!=
nil
{
if
cachedService
.
state
!=
nil
{
if
cachedService
.
state
.
UID
!=
service
.
UID
{
if
cachedService
.
state
.
UID
!=
service
.
UID
{
...
@@ -270,8 +269,9 @@ func (s *ServiceController) processServiceUpdate(cachedService *cachedService, s
...
@@ -270,8 +269,9 @@ func (s *ServiceController) processServiceUpdate(cachedService *cachedService, s
return
nil
return
nil
}
}
// Returns whatever error occurred along with a boolean indicator of whether it
// createLoadBalancerIfNeeded ensures that service's status is synced up with loadbalancer
// should be retried.
// i.e. creates loadbalancer for service if requested and deletes loadbalancer if the service
// doesn't want a loadbalancer no more. Returns whatever error occurred.
func
(
s
*
ServiceController
)
createLoadBalancerIfNeeded
(
key
string
,
service
*
v1
.
Service
)
error
{
func
(
s
*
ServiceController
)
createLoadBalancerIfNeeded
(
key
string
,
service
*
v1
.
Service
)
error
{
// Note: It is safe to just call EnsureLoadBalancer. But, on some clouds that requires a delete & create,
// Note: It is safe to just call EnsureLoadBalancer. But, on some clouds that requires a delete & create,
// which may involve service interruption. Also, we would like user-friendly events.
// which may involve service interruption. Also, we would like user-friendly events.
...
...
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