Merge pull request #17179 from hakman/flannel-0.26.2

Update flannel to v0.26.4
This commit is contained in:
Kubernetes Prow Robot 2025-02-08 12:17:55 -08:00 committed by GitHub
commit e77300b38c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 33 additions and 22 deletions

View File

@ -1118,11 +1118,7 @@ func validateNetworking(cluster *kops.Cluster, v *kops.NetworkingSpec, fldPath *
} }
if v.Flannel != nil { if v.Flannel != nil {
if cluster.IsKubernetesGTE("1.28") { allErrs = append(allErrs, validateNetworkingFlannel(cluster, v.Flannel, fldPath.Child("flannel"))...)
allErrs = append(allErrs, field.Forbidden(fldPath.Child("flannel"), "Flannel is not supported for Kubernetes >= 1.28"))
} else {
allErrs = append(allErrs, validateNetworkingFlannel(cluster, v.Flannel, fldPath.Child("flannel"))...)
}
} }
if v.Calico != nil { if v.Calico != nil {

View File

@ -110,6 +110,11 @@ func (t *Tester) setSkipRegexFlag() error {
// Ref: https://github.com/kubernetes/kubernetes/issues/126903 // Ref: https://github.com/kubernetes/kubernetes/issues/126903
skipRegex += "|KubeProxy.should.update.metric.for.tracking.accepted.packets.destined.for.localhost.nodeports" skipRegex += "|KubeProxy.should.update.metric.for.tracking.accepted.packets.destined.for.localhost.nodeports"
} }
} else if networking.Flannel != nil {
if k8sVersion.Minor < 33 {
// < 33 so we look at this again
skipRegex += "|Services should implement NodePort and HealthCheckNodePort correctly when ExternalTrafficPolicy changes"
}
} else if networking.KubeRouter != nil { } else if networking.KubeRouter != nil {
skipRegex += "|should set TCP CLOSE_WAIT timeout|should check kube-proxy urls" skipRegex += "|should set TCP CLOSE_WAIT timeout|should check kube-proxy urls"
} else if networking.Kubenet != nil { } else if networking.Kubenet != nil {

View File

@ -99,7 +99,7 @@ spec:
version: 9.99.0 version: 9.99.0
- id: k8s-1.25 - id: k8s-1.25
manifest: networking.flannel/k8s-1.25.yaml manifest: networking.flannel/k8s-1.25.yaml
manifestHash: 0b0d13083ea6ee5196f49234a338d9d96e21684a622d2320bd4d9241f7b2e2d7 manifestHash: d1a97af395802323fdf6820591e85bd7916a6fa855464e8c53216e98aa21ef91
name: networking.flannel name: networking.flannel
prune: prune:
kinds: kinds:

View File

@ -5,6 +5,7 @@ metadata:
labels: labels:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: privileged
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
name: kube-flannel name: kube-flannel
@ -18,6 +19,7 @@ metadata:
labels: labels:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
name: flannel name: flannel
rules: rules:
@ -32,6 +34,7 @@ rules:
resources: resources:
- nodes - nodes
verbs: verbs:
- get
- list - list
- watch - watch
- apiGroups: - apiGroups:
@ -50,6 +53,7 @@ metadata:
labels: labels:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
name: flannel name: flannel
roleRef: roleRef:
@ -70,6 +74,7 @@ metadata:
labels: labels:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
name: flannel name: flannel
namespace: kube-flannel namespace: kube-flannel
@ -101,6 +106,7 @@ data:
net-conf.json: |- net-conf.json: |-
{ {
"Network": "100.64.0.0/10", "Network": "100.64.0.0/10",
"EnableNFTables": true,
"Backend": { "Backend": {
"Type": "vxlan" "Type": "vxlan"
} }
@ -112,6 +118,7 @@ metadata:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app: flannel app: flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
tier: node tier: node
name: kube-flannel-cfg name: kube-flannel-cfg
@ -127,6 +134,7 @@ metadata:
addon.kops.k8s.io/name: networking.flannel addon.kops.k8s.io/name: networking.flannel
app: flannel app: flannel
app.kubernetes.io/managed-by: kops app.kubernetes.io/managed-by: kops
k8s-app: flannel
role.kubernetes.io/networking: "1" role.kubernetes.io/networking: "1"
tier: node tier: node
name: kube-flannel-ds name: kube-flannel-ds
@ -171,12 +179,9 @@ spec:
fieldPath: metadata.namespace fieldPath: metadata.namespace
- name: EVENT_QUEUE_DEPTH - name: EVENT_QUEUE_DEPTH
value: "5000" value: "5000"
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.19.2 image: ghcr.io/flannel-io/flannel:v0.26.4
name: kube-flannel name: kube-flannel
resources: resources:
limits:
cpu: 100m
memory: 50Mi
requests: requests:
cpu: 100m cpu: 100m
memory: 50Mi memory: 50Mi
@ -201,7 +206,7 @@ spec:
- /opt/cni/bin/flannel - /opt/cni/bin/flannel
command: command:
- cp - cp
image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.0 image: ghcr.io/flannel-io/flannel-cni-plugin:v1.6.2-flannel1
name: install-cni-plugin name: install-cni-plugin
volumeMounts: volumeMounts:
- mountPath: /opt/cni/bin - mountPath: /opt/cni/bin
@ -212,7 +217,7 @@ spec:
- /etc/cni/net.d/10-flannel.conflist - /etc/cni/net.d/10-flannel.conflist
command: command:
- cp - cp
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.19.2 image: ghcr.io/flannel-io/flannel:v0.26.4
name: install-cni name: install-cni
volumeMounts: volumeMounts:
- mountPath: /etc/cni/net.d - mountPath: /etc/cni/net.d

View File

@ -1,15 +1,18 @@
# Pulled and modified from: https://raw.githubusercontent.com/coreos/flannel/v0.19.2/Documentation/kube-flannel.yml # Pulled and modified from: https://raw.githubusercontent.com/coreos/flannel/v0.26.4/Documentation/kube-flannel.yml
--- ---
kind: Namespace kind: Namespace
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: kube-flannel name: kube-flannel
labels: labels:
k8s-app: flannel
pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/enforce: privileged
--- ---
kind: ClusterRole kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
labels:
k8s-app: flannel
name: flannel name: flannel
rules: rules:
- apiGroups: - apiGroups:
@ -23,6 +26,7 @@ rules:
resources: resources:
- nodes - nodes
verbs: verbs:
- get
- list - list
- watch - watch
- apiGroups: - apiGroups:
@ -35,6 +39,8 @@ rules:
kind: ClusterRoleBinding kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
metadata: metadata:
labels:
k8s-app: flannel
name: flannel name: flannel
roleRef: roleRef:
apiGroup: rbac.authorization.k8s.io apiGroup: rbac.authorization.k8s.io
@ -48,6 +54,8 @@ subjects:
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
labels:
k8s-app: flannel
name: flannel name: flannel
namespace: kube-flannel namespace: kube-flannel
--- ---
@ -58,6 +66,7 @@ metadata:
namespace: kube-flannel namespace: kube-flannel
labels: labels:
tier: node tier: node
k8s-app: flannel
app: flannel app: flannel
data: data:
cni-conf.json: | cni-conf.json: |
@ -83,6 +92,7 @@ data:
net-conf.json: | net-conf.json: |
{ {
"Network": "{{ .Networking.NonMasqueradeCIDR }}", "Network": "{{ .Networking.NonMasqueradeCIDR }}",
"EnableNFTables": true,
"Backend": { "Backend": {
"Type": "{{ FlannelBackendType }}" "Type": "{{ FlannelBackendType }}"
} }
@ -96,6 +106,7 @@ metadata:
labels: labels:
tier: node tier: node
app: flannel app: flannel
k8s-app: flannel
spec: spec:
selector: selector:
matchLabels: matchLabels:
@ -124,8 +135,7 @@ spec:
serviceAccountName: flannel serviceAccountName: flannel
initContainers: initContainers:
- name: install-cni-plugin - name: install-cni-plugin
#image: flannelcni/flannel-cni-plugin:v1.1.0 for ppc64le and mips64le (dockerhub limitations may apply) image: ghcr.io/flannel-io/flannel-cni-plugin:v1.6.2-flannel1
image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.0
command: command:
- cp - cp
args: args:
@ -136,8 +146,7 @@ spec:
- name: cni-plugin - name: cni-plugin
mountPath: /opt/cni/bin mountPath: /opt/cni/bin
- name: install-cni - name: install-cni
#image: flannelcni/flannel:v0.19.2 for ppc64le and mips64le (dockerhub limitations may apply) image: ghcr.io/flannel-io/flannel:v0.26.4
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.19.2
command: command:
- cp - cp
args: args:
@ -151,8 +160,7 @@ spec:
mountPath: /etc/kube-flannel/ mountPath: /etc/kube-flannel/
containers: containers:
- name: kube-flannel - name: kube-flannel
#image: flannelcni/flannel:v0.19.2 for ppc64le and mips64le (dockerhub limitations may apply) image: ghcr.io/flannel-io/flannel:v0.26.4
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.19.2
command: command:
- /opt/bin/flanneld - /opt/bin/flanneld
args: args:
@ -163,9 +171,6 @@ spec:
requests: requests:
cpu: "100m" cpu: "100m"
memory: "50Mi" memory: "50Mi"
limits:
cpu: "100m"
memory: "50Mi"
securityContext: securityContext:
privileged: false privileged: false
capabilities: capabilities: