flannel 0.20 upgrade
This commit is contained in:
@@ -1,60 +1,16 @@
|
|||||||
---
|
---
|
||||||
apiVersion: policy/v1beta1
|
kind: Namespace
|
||||||
kind: PodSecurityPolicy
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: psp.flannel.unprivileged
|
name: kube-flannel
|
||||||
annotations:
|
labels:
|
||||||
seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default
|
pod-security.kubernetes.io/enforce: privileged
|
||||||
seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default
|
|
||||||
apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default
|
|
||||||
apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default
|
|
||||||
spec:
|
|
||||||
privileged: false
|
|
||||||
volumes:
|
|
||||||
- configMap
|
|
||||||
- secret
|
|
||||||
- emptyDir
|
|
||||||
- hostPath
|
|
||||||
allowedHostPaths:
|
|
||||||
- pathPrefix: "/etc/cni/net.d"
|
|
||||||
- pathPrefix: "/etc/kube-flannel"
|
|
||||||
- pathPrefix: "/run/flannel"
|
|
||||||
readOnlyRootFilesystem: false
|
|
||||||
# Users and groups
|
|
||||||
runAsUser:
|
|
||||||
rule: RunAsAny
|
|
||||||
supplementalGroups:
|
|
||||||
rule: RunAsAny
|
|
||||||
fsGroup:
|
|
||||||
rule: RunAsAny
|
|
||||||
# Privilege Escalation
|
|
||||||
allowPrivilegeEscalation: false
|
|
||||||
defaultAllowPrivilegeEscalation: false
|
|
||||||
# Capabilities
|
|
||||||
allowedCapabilities: ['NET_ADMIN', 'NET_RAW']
|
|
||||||
defaultAddCapabilities: []
|
|
||||||
requiredDropCapabilities: []
|
|
||||||
# Host namespaces
|
|
||||||
hostPID: false
|
|
||||||
hostIPC: false
|
|
||||||
hostNetwork: true
|
|
||||||
hostPorts:
|
|
||||||
- min: 0
|
|
||||||
max: 65535
|
|
||||||
# SELinux
|
|
||||||
seLinux:
|
|
||||||
# SELinux is unused in CaaSP
|
|
||||||
rule: 'RunAsAny'
|
|
||||||
---
|
---
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: flannel
|
name: flannel
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: ['extensions']
|
|
||||||
resources: ['podsecuritypolicies']
|
|
||||||
verbs: ['use']
|
|
||||||
resourceNames: ['psp.flannel.unprivileged']
|
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resources:
|
resources:
|
||||||
@@ -66,6 +22,7 @@ rules:
|
|||||||
resources:
|
resources:
|
||||||
- nodes
|
- nodes
|
||||||
verbs:
|
verbs:
|
||||||
|
- get
|
||||||
- list
|
- list
|
||||||
- watch
|
- watch
|
||||||
- apiGroups:
|
- apiGroups:
|
||||||
@@ -86,19 +43,19 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: flannel
|
name: flannel
|
||||||
namespace: kube-system
|
namespace: kube-flannel
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: flannel
|
name: flannel
|
||||||
namespace: kube-system
|
namespace: kube-flannel
|
||||||
---
|
---
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: kube-flannel-cfg
|
name: kube-flannel-cfg
|
||||||
namespace: kube-system
|
namespace: kube-flannel
|
||||||
labels:
|
labels:
|
||||||
tier: node
|
tier: node
|
||||||
app: flannel
|
app: flannel
|
||||||
@@ -135,7 +92,7 @@ apiVersion: apps/v1
|
|||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
name: kube-flannel-ds
|
name: kube-flannel-ds
|
||||||
namespace: kube-system
|
namespace: kube-flannel
|
||||||
labels:
|
labels:
|
||||||
tier: node
|
tier: node
|
||||||
app: flannel
|
app: flannel
|
||||||
@@ -165,8 +122,21 @@ spec:
|
|||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
serviceAccountName: flannel
|
serviceAccountName: flannel
|
||||||
initContainers:
|
initContainers:
|
||||||
|
- name: install-cni-plugin
|
||||||
|
#image: flannelcni/flannel-cni-plugin:v1.1.0 for ppc64le and mips64le (dockerhub limitations may apply)
|
||||||
|
image: docker.io/rancher/mirrored-flannelcni-flannel-cni-plugin:v1.1.0
|
||||||
|
command:
|
||||||
|
- cp
|
||||||
|
args:
|
||||||
|
- -f
|
||||||
|
- /flannel
|
||||||
|
- /opt/cni/bin/flannel
|
||||||
|
volumeMounts:
|
||||||
|
- name: cni-plugin
|
||||||
|
mountPath: /opt/cni/bin
|
||||||
- name: install-cni
|
- name: install-cni
|
||||||
image: quay.io/coreos/flannel:v0.14.0
|
#image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
|
||||||
|
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
|
||||||
command:
|
command:
|
||||||
- cp
|
- cp
|
||||||
args:
|
args:
|
||||||
@@ -180,7 +150,8 @@ spec:
|
|||||||
mountPath: /etc/kube-flannel/
|
mountPath: /etc/kube-flannel/
|
||||||
containers:
|
containers:
|
||||||
- name: kube-flannel
|
- name: kube-flannel
|
||||||
image: quay.io/coreos/flannel:v0.14.0
|
#image: flannelcni/flannel:v0.20.2 for ppc64le and mips64le (dockerhub limitations may apply)
|
||||||
|
image: docker.io/rancher/mirrored-flannelcni-flannel:v0.20.2
|
||||||
command:
|
command:
|
||||||
- /opt/bin/flanneld
|
- /opt/bin/flanneld
|
||||||
args:
|
args:
|
||||||
@@ -206,18 +177,29 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
|
- name: EVENT_QUEUE_DEPTH
|
||||||
|
value: "5000"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: run
|
- name: run
|
||||||
mountPath: /run/flannel
|
mountPath: /run/flannel
|
||||||
- name: flannel-cfg
|
- name: flannel-cfg
|
||||||
mountPath: /etc/kube-flannel/
|
mountPath: /etc/kube-flannel/
|
||||||
|
- name: xtables-lock
|
||||||
|
mountPath: /run/xtables.lock
|
||||||
volumes:
|
volumes:
|
||||||
- name: run
|
- name: run
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /run/flannel
|
path: /run/flannel
|
||||||
|
- name: cni-plugin
|
||||||
|
hostPath:
|
||||||
|
path: /opt/cni/bin
|
||||||
- name: cni
|
- name: cni
|
||||||
hostPath:
|
hostPath:
|
||||||
path: /etc/cni/net.d
|
path: /etc/cni/net.d
|
||||||
- name: flannel-cfg
|
- name: flannel-cfg
|
||||||
configMap:
|
configMap:
|
||||||
name: kube-flannel-cfg
|
name: kube-flannel-cfg
|
||||||
|
- name: xtables-lock
|
||||||
|
hostPath:
|
||||||
|
path: /run/xtables.lock
|
||||||
|
type: FileOrCreate
|
||||||
|
|||||||
Reference in New Issue
Block a user