Skip to content

Commit c592157

Browse files
committed
test:
update kube-flannel.yaml for more recent version
1 parent 4f8f3c7 commit c592157

File tree

1 file changed

+99
-88
lines changed

1 file changed

+99
-88
lines changed
Lines changed: 99 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
---
2-
kind: Namespace
1+
# From Flannel Repo
2+
# https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml
33
apiVersion: v1
4+
kind: Namespace
45
metadata:
5-
name: kube-flannel
66
labels:
7+
k8s-app: flannel
78
pod-security.kubernetes.io/enforce: privileged
9+
name: kube-flannel
10+
---
11+
apiVersion: v1
12+
kind: ServiceAccount
13+
metadata:
14+
labels:
15+
k8s-app: flannel
16+
name: flannel
17+
namespace: kube-flannel
818
---
9-
kind: ClusterRole
1019
apiVersion: rbac.authorization.k8s.io/v1
20+
kind: ClusterRole
1121
metadata:
22+
labels:
23+
k8s-app: flannel
1224
name: flannel
1325
rules:
1426
- apiGroups:
@@ -32,9 +44,11 @@ rules:
3244
verbs:
3345
- patch
3446
---
35-
kind: ClusterRoleBinding
3647
apiVersion: rbac.authorization.k8s.io/v1
48+
kind: ClusterRoleBinding
3749
metadata:
50+
labels:
51+
k8s-app: flannel
3852
name: flannel
3953
roleRef:
4054
apiGroup: rbac.authorization.k8s.io
@@ -46,19 +60,6 @@ subjects:
4660
namespace: kube-flannel
4761
---
4862
apiVersion: v1
49-
kind: ServiceAccount
50-
metadata:
51-
name: flannel
52-
namespace: kube-flannel
53-
---
54-
kind: ConfigMap
55-
apiVersion: v1
56-
metadata:
57-
name: kube-flannel-cfg
58-
namespace: kube-flannel
59-
labels:
60-
tier: node
61-
app: flannel
6263
data:
6364
cni-conf.json: |
6465
{
@@ -83,28 +84,40 @@ data:
8384
net-conf.json: |
8485
{
8586
"Network": "10.244.0.0/16",
87+
"EnableNFTables": false,
8688
"Backend": {
8789
"Type": "vxlan"
8890
}
8991
}
92+
kind: ConfigMap
93+
metadata:
94+
labels:
95+
app: flannel
96+
k8s-app: flannel
97+
tier: node
98+
name: kube-flannel-cfg
99+
namespace: kube-flannel
90100
---
91101
apiVersion: apps/v1
92102
kind: DaemonSet
93103
metadata:
94-
name: kube-flannel-ds
95-
namespace: kube-flannel
96104
labels:
97-
tier: node
98105
app: flannel
106+
k8s-app: flannel
107+
tier: node
108+
name: kube-flannel-ds
109+
namespace: kube-flannel
99110
spec:
100111
selector:
101112
matchLabels:
102113
app: flannel
114+
k8s-app: flannel
103115
template:
104116
metadata:
105117
labels:
106-
tier: node
107118
app: flannel
119+
k8s-app: flannel
120+
tier: node
108121
spec:
109122
affinity:
110123
nodeAffinity:
@@ -115,59 +128,12 @@ spec:
115128
operator: In
116129
values:
117130
- linux
118-
hostNetwork: true
119-
priorityClassName: system-node-critical
120-
tolerations:
121-
- operator: Exists
122-
effect: NoSchedule
123-
serviceAccountName: flannel
124-
initContainers:
125-
- name: install-cni-plugin
126-
#image: flannelcni/flannel-cni-plugin:v1.1.0 for ppc64le and mips64le (dockerhub limitations may apply)
127-
image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.0
128-
command:
129-
- cp
130-
args:
131-
- -f
132-
- /flannel
133-
- /opt/cni/bin/flannel
134-
volumeMounts:
135-
- name: cni-plugin
136-
mountPath: /opt/cni/bin
137-
- name: install-cni
138-
#image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
139-
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
140-
command:
141-
- cp
142-
args:
143-
- -f
144-
- /etc/kube-flannel/cni-conf.json
145-
- /etc/cni/net.d/10-flannel.conflist
146-
volumeMounts:
147-
- name: cni
148-
mountPath: /etc/cni/net.d
149-
- name: flannel-cfg
150-
mountPath: /etc/kube-flannel/
151131
containers:
152-
- name: kube-flannel
153-
#image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
154-
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
155-
command:
156-
- /opt/bin/flanneld
157-
args:
132+
- args:
158133
- --ip-masq
159134
- --kube-subnet-mgr
160-
resources:
161-
requests:
162-
cpu: "100m"
163-
memory: "50Mi"
164-
limits:
165-
cpu: "100m"
166-
memory: "50Mi"
167-
securityContext:
168-
privileged: false
169-
capabilities:
170-
add: ["NET_ADMIN", "NET_RAW"]
135+
command:
136+
- /opt/bin/flanneld
171137
env:
172138
- name: POD_NAME
173139
valueFrom:
@@ -179,27 +145,72 @@ spec:
179145
fieldPath: metadata.namespace
180146
- name: EVENT_QUEUE_DEPTH
181147
value: "5000"
148+
- name: CONT_WHEN_CACHE_NOT_READY
149+
value: "false"
150+
image: ghcr.io/flannel-io/flannel:v0.27.4
151+
name: kube-flannel
152+
resources:
153+
requests:
154+
cpu: 100m
155+
memory: 50Mi
156+
securityContext:
157+
capabilities:
158+
add:
159+
- NET_ADMIN
160+
- NET_RAW
161+
privileged: false
182162
volumeMounts:
183-
- name: run
184-
mountPath: /run/flannel
185-
- name: flannel-cfg
186-
mountPath: /etc/kube-flannel/
187-
- name: xtables-lock
188-
mountPath: /run/xtables.lock
163+
- mountPath: /run/flannel
164+
name: run
165+
- mountPath: /etc/kube-flannel/
166+
name: flannel-cfg
167+
- mountPath: /run/xtables.lock
168+
name: xtables-lock
169+
hostNetwork: true
170+
initContainers:
171+
- args:
172+
- -f
173+
- /flannel
174+
- /opt/cni/bin/flannel
175+
command:
176+
- cp
177+
image: ghcr.io/flannel-io/flannel-cni-plugin:v1.8.0-flannel1
178+
name: install-cni-plugin
179+
volumeMounts:
180+
- mountPath: /opt/cni/bin
181+
name: cni-plugin
182+
- args:
183+
- -f
184+
- /etc/kube-flannel/cni-conf.json
185+
- /etc/cni/net.d/10-flannel.conflist
186+
command:
187+
- cp
188+
image: ghcr.io/flannel-io/flannel:v0.27.4
189+
name: install-cni
190+
volumeMounts:
191+
- mountPath: /etc/cni/net.d
192+
name: cni
193+
- mountPath: /etc/kube-flannel/
194+
name: flannel-cfg
195+
priorityClassName: system-node-critical
196+
serviceAccountName: flannel
197+
tolerations:
198+
- effect: NoSchedule
199+
operator: Exists
189200
volumes:
190-
- name: run
191-
hostPath:
201+
- hostPath:
192202
path: /run/flannel
193-
- name: cni-plugin
194-
hostPath:
203+
name: run
204+
- hostPath:
195205
path: /opt/cni/bin
196-
- name: cni
197-
hostPath:
206+
name: cni-plugin
207+
- hostPath:
198208
path: /etc/cni/net.d
199-
- name: flannel-cfg
200-
configMap:
209+
name: cni
210+
- configMap:
201211
name: kube-flannel-cfg
202-
- name: xtables-lock
203-
hostPath:
212+
name: flannel-cfg
213+
- hostPath:
204214
path: /run/xtables.lock
205215
type: FileOrCreate
216+
name: xtables-lock

0 commit comments

Comments
 (0)