From 75fe1e0f6e51668560ca957026d48cc1dbebad1f Mon Sep 17 00:00:00 2001 From: Frederiko Costa Date: Thu, 25 Jun 2020 17:42:30 -0700 Subject: [PATCH] documentation: set priorityClassName to system-node-critical flannel pods are not considered critical by the scheduler, which may cause issues. In case of multiple pods are fighting for resources there is the possibility of flannel pods be in pending mode indefinitely --- Documentation/kube-flannel-aliyun.yml | 1 + Documentation/kube-flannel.yml | 5 +++++ backend/vxlan/device.go | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/kube-flannel-aliyun.yml b/Documentation/kube-flannel-aliyun.yml index 22457c5ae..0243e549d 100644 --- a/Documentation/kube-flannel-aliyun.yml +++ b/Documentation/kube-flannel-aliyun.yml @@ -86,6 +86,7 @@ spec: app: flannel spec: hostNetwork: true + priorityClassName: system-node-critical nodeSelector: beta.kubernetes.io/arch: amd64 tolerations: diff --git a/Documentation/kube-flannel.yml b/Documentation/kube-flannel.yml index bd9213b88..73803010f 100644 --- a/Documentation/kube-flannel.yml +++ b/Documentation/kube-flannel.yml @@ -163,6 +163,7 @@ spec: values: - amd64 hostNetwork: true + priorityClassName: system-node-critical tolerations: - operator: Exists effect: NoSchedule @@ -257,6 +258,7 @@ spec: values: - arm64 hostNetwork: true + priorityClassName: system-node-critical tolerations: - operator: Exists effect: NoSchedule @@ -351,6 +353,7 @@ spec: values: - arm hostNetwork: true + priorityClassName: system-node-critical tolerations: - operator: Exists effect: NoSchedule @@ -445,6 +448,7 @@ spec: values: - ppc64le hostNetwork: true + priorityClassName: system-node-critical tolerations: - operator: Exists effect: NoSchedule @@ -539,6 +543,7 @@ spec: values: - s390x hostNetwork: true + priorityClassName: system-node-critical tolerations: - operator: Exists effect: NoSchedule diff --git a/backend/vxlan/device.go b/backend/vxlan/device.go index a2187f26b..e9b44b06c 100644 --- a/backend/vxlan/device.go +++ b/backend/vxlan/device.go @@ -25,8 +25,8 @@ import ( log "github.com/golang/glog" "github.com/vishvananda/netlink" + "github.com/containernetworking/plugins/pkg/utils/sysctl" "github.com/coreos/flannel/pkg/ip" - "github.com/containernetworking/plugins/pkg/utils/sysctl" ) type vxlanDeviceAttrs struct { @@ -62,7 +62,7 @@ func newVXLANDevice(devAttrs *vxlanDeviceAttrs) (*vxlanDevice, error) { return nil, err } - _, _ = sysctl.Sysctl(fmt.Sprintf("net/ipv6/conf/%s/accept_ra", devAttrs.name), "0") + _, _ = sysctl.Sysctl(fmt.Sprintf("net/ipv6/conf/%s/accept_ra", devAttrs.name), "0") return &vxlanDevice{ link: link,