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
aa3b45d1
Commit
aa3b45d1
authored
Jan 30, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3986 from ddysher/fix-node-ip
Fix node hostip issue
parents
881f2dca
662bcb9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
rest.go
pkg/registry/minion/rest.go
+8
-2
No files found.
pkg/registry/minion/rest.go
View file @
aa3b45d1
...
@@ -122,12 +122,18 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
...
@@ -122,12 +122,18 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
// Clear out the self link, if specified, since it's not in the registry either.
// Clear out the self link, if specified, since it's not in the registry either.
minion
.
SelfLink
=
""
minion
.
SelfLink
=
""
// TODO: GetMinion will health check the minion, but we shouldn't require the minion to be
// running for updating labels.
oldMinion
,
err
:=
rs
.
registry
.
GetMinion
(
ctx
,
minion
.
Name
)
oldMinion
,
err
:=
rs
.
registry
.
GetMinion
(
ctx
,
minion
.
Name
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
// This is hacky, but minion HostIP has been moved from spec to status since v1beta2. When updating
// minion from older client, HostIP will be lost. Fix it here temporarily until we strip out status
// info from user input.
if
minion
.
Status
.
HostIP
==
""
{
minion
.
Status
.
HostIP
=
oldMinion
.
Status
.
HostIP
}
if
errs
:=
validation
.
ValidateMinionUpdate
(
oldMinion
,
minion
);
len
(
errs
)
>
0
{
if
errs
:=
validation
.
ValidateMinionUpdate
(
oldMinion
,
minion
);
len
(
errs
)
>
0
{
return
nil
,
kerrors
.
NewInvalid
(
"minion"
,
minion
.
Name
,
errs
)
return
nil
,
kerrors
.
NewInvalid
(
"minion"
,
minion
.
Name
,
errs
)
}
}
...
...
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