Merge pull request #2893 from brendandburns/pd3

Make it easier to update nodes, make it possible to update capacity.
This commit is contained in:
Brendan Burns
2014-12-18 10:18:54 -08:00
4 changed files with 79 additions and 1 deletions

View File

@@ -110,6 +110,13 @@ func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
if !ok {
return nil, fmt.Errorf("not a minion: %#v", obj)
}
// This is hacky, but minions don't really have a namespace, but kubectl currently automatically
// stuffs one in there. Fix it here temporarily until we fix kubectl
if minion.Namespace == api.NamespaceDefault {
minion.Namespace = api.NamespaceNone
}
// Clear out the self link, if specified, since it's not in the registry either.
minion.SelfLink = ""
// TODO: GetMinion will health check the minion, but we shouldn't require the minion to be
// running for updating labels.