فهرست منبع

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,