DevStack: Disable leader election for K8s services

The DevStack plugin is really designed just for gate testing and
developer usage. In both use cases normally we won't run K8s services on
multiple nodes. Because of that this commit disables leader election for
kube-scheduler and kube-controller-manager. The motivation behind this
is that on the OpenInfra gate VMs we often see degraded storage
performance that affects etcd. If that happens during leader-election of
a service, it'll crash, leaving us with broken and unrecoverable K8s.
This should eliminate the issue.

Change-Id: Ib84ed289c9aaf3ae27af1c7ffa8aab2f8ba48671
This commit is contained in:
Michał Dulko 2020-08-26 12:15:11 +02:00
parent a8e97569a8
commit acfe749574
1 changed files with 4 additions and 2 deletions

View File

@ -668,7 +668,8 @@ function run_k8s_controller_manager {
--root-ca-file=${KURYR_KUBERNETES_DATA_DIR}/ca.crt \
--min-resync-period=3m \
--v=$(get_k8s_log_level) \
--logtostderr=true"
--logtostderr=true \
--leader-elect=false"
run_process kubernetes-controller-manager "$command" root root
}
@ -686,7 +687,8 @@ function run_k8s_scheduler {
command="${KURYR_KUBE_SCHEDULER_BINARY} \
--master=${KURYR_K8S_API_URL} \
--v=$(get_k8s_log_level) \
--logtostderr=true"
--logtostderr=true \
--leader-elect=false"
run_process kubernetes-scheduler "$command" root root
}