瀏覽代碼

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
Frederiko Costa 4 年之前
父節點
當前提交
75fe1e0f6e
共有 3 個文件被更改,包括 8 次插入2 次删除
  1. 1 0
      Documentation/kube-flannel-aliyun.yml
  2. 5 0
      Documentation/kube-flannel.yml
  3. 2 2
      backend/vxlan/device.go

+ 1 - 0
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:

+ 5 - 0
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

+ 2 - 2
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,