Skip to content

Commit

Permalink
Update channels before setting labels
Browse files Browse the repository at this point in the history
This will prevent an old kops-controller pod from being scheduled to the new master.
  • Loading branch information
Ole Markus With committed Sep 25, 2021
1 parent 1bb5f0b commit 35bf523
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions protokube/pkg/protokube/kube_boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,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
Expand Down

0 comments on commit 35bf523

Please sign in to comment.