소스 검색

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,