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:
committed by
Alena Prokharchyk
parent
aabce06714
commit
3c906a9ed2
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user