mirror of https://github.com/kubernetes/kops.git
Update channels before setting labels
This will prevent an old kops-controller pod from being scheduled to the new master.
This commit is contained in:
parent
e7a5437a34
commit
d1ff1090a3
|
|
@ -88,16 +88,16 @@ func (k *KubeBoot) RunSyncLoop() {
|
|||
|
||||
func (k *KubeBoot) syncOnce(ctx context.Context) error {
|
||||
if k.Master {
|
||||
if k.BootstrapMasterNodeLabels {
|
||||
if err := bootstrapMasterNodeLabels(ctx, k.Kubernetes, k.NodeName); err != nil {
|
||||
klog.Warningf("error bootstrapping master node labels: %v", err)
|
||||
}
|
||||
}
|
||||
for _, channel := range k.Channels {
|
||||
if err := applyChannel(channel); err != nil {
|
||||
klog.Warningf("error applying channel %q: %v", channel, err)
|
||||
}
|
||||
}
|
||||
if k.BootstrapMasterNodeLabels {
|
||||
if err := bootstrapMasterNodeLabels(ctx, k.Kubernetes, k.NodeName); err != nil {
|
||||
klog.Warningf("error bootstrapping master node labels: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in New Issue