1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-17 23:49:06 +00:00

Make control node only unschedulable

This commit is contained in:
galal-hussein
2018-05-31 23:06:59 +02:00
committed by Alena Prokharchyk
parent aabce06714
commit 3c906a9ed2
7 changed files with 36 additions and 9 deletions

View File

@@ -16,7 +16,8 @@ import (
)
const (
unschedulableEtcdTaint = "node-role.kubernetes.io/etcd=true:NoExecute"
unschedulableEtcdTaint = "node-role.kubernetes.io/etcd=true:NoExecute"
unschedulableControlTaint = "node-role.kubernetes.io/controlplane=true:NoExecute"
)
func ReconcileCluster(ctx context.Context, kubeCluster, currentCluster *Cluster, updateOnly bool) error {
@@ -72,6 +73,9 @@ func reconcileWorker(ctx context.Context, currentCluster, kubeCluster *Cluster,
if host.IsEtcd {
host.ToDelTaints = append(host.ToDelTaints, unschedulableEtcdTaint)
}
if host.IsControl {
host.ToDelTaints = append(host.ToDelTaints, unschedulableControlTaint)
}
}
return nil
}