update multus to 3.4 and add crio support (#5701)

Signed-off-by: Chris Randles <randles.chris@gmail.com>
This commit is contained in:
Christopher Randles 2020-03-13 07:22:39 -04:00 committed by GitHub
parent 19865e81db
commit 71c856878c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 45 additions and 17 deletions

View file

@ -125,7 +125,7 @@ Note: Upstart/SysV init based OS types are not supported.
- [contiv](https://github.com/contiv/install) v1.2.1 - [contiv](https://github.com/contiv/install) v1.2.1
- [flanneld](https://github.com/coreos/flannel) v0.11.0 - [flanneld](https://github.com/coreos/flannel) v0.11.0
- [kube-router](https://github.com/cloudnativelabs/kube-router) v0.2.5 - [kube-router](https://github.com/cloudnativelabs/kube-router) v0.2.5
- [multus](https://github.com/intel/multus-cni) v3.2.1 - [multus](https://github.com/intel/multus-cni) v3.4
- [weave](https://github.com/weaveworks/weave) v2.5.2 - [weave](https://github.com/weaveworks/weave) v2.5.2
- Application - Application
- [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11 - [cephfs-provisioner](https://github.com/kubernetes-incubator/external-storage) v2.1.0-k8s1.11

View file

@ -83,7 +83,7 @@ contiv_version: 1.2.1
cilium_version: "v1.7.1" cilium_version: "v1.7.1"
kube_ovn_version: "v0.6.0" kube_ovn_version: "v0.6.0"
kube_router_version: "v0.2.5" kube_router_version: "v0.2.5"
multus_version: "v3.2.1" multus_version: "v3.4"
# Get kubernetes major version (i.e. 1.15.4 => 1.15) # Get kubernetes major version (i.e. 1.15.4 => 1.15)
kube_major_version: "{{ kube_version | regex_replace('^v([0-9])+\\.([0-9]+)\\.[0-9]+', 'v\\1.\\2') }}" kube_major_version: "{{ kube_version | regex_replace('^v([0-9])+\\.([0-9]+)\\.[0-9]+', 'v\\1.\\2') }}"

View file

@ -1,7 +1,10 @@
--- ---
multus_conf_file: "auto" multus_conf_file: "auto"
multus_cni_conf_dir_host: "/etc/cni/net.d" multus_cni_conf_dir_host: "/etc/cni/net.d"
multus_cni_bin_dir_host: "/opt/cni/bin" multus_cni_bin_dir_host: "{{ '/usr/libexec/cni' if container_manager == 'crio' else '/opt/cni/bin' }}"
multus_cni_run_dir_host: "/run"
multus_cni_conf_dir: "{{ ('/host', multus_cni_conf_dir_host) | join }}" multus_cni_conf_dir: "{{ ('/host', multus_cni_conf_dir_host) | join }}"
multus_cni_bin_dir: "{{ ('/host', multus_cni_bin_dir_host) | join }}" multus_cni_bin_dir: "{{ ('/host', multus_cni_bin_dir_host) | join }}"
multus_cni_run_dir: "{{ ('/host', multus_cni_run_dir_host) | join }}"
multus_cni_version: "0.3.1"
multus_kubeconfig_file_host: "{{ (multus_cni_conf_dir_host, '/multus.d/multus.kubeconfig') | join }}" multus_kubeconfig_file_host: "{{ (multus_cni_conf_dir_host, '/multus.d/multus.kubeconfig') | join }}"

View file

@ -4,13 +4,16 @@ apiVersion: rbac.authorization.k8s.io/v1beta1
metadata: metadata:
name: multus name: multus
rules: rules:
- apiGroups: - apiGroups: ["k8s.cni.cncf.io"]
- '*'
resources: resources:
- '*' - '*'
verbs: verbs:
- '*' - '*'
- nonResourceURLs: - apiGroups:
- '*' - ""
resources:
- pods
- pods/status
verbs: verbs:
- '*' - get
- update

View file

@ -1,11 +1,10 @@
--- ---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition kind: CustomResourceDefinition
apiVersion: apiextensions.k8s.io/v1beta1
metadata: metadata:
name: network-attachment-definitions.k8s.cni.cncf.io name: network-attachment-definitions.k8s.cni.cncf.io
spec: spec:
group: k8s.cni.cncf.io group: k8s.cni.cncf.io
version: v1
scope: Namespaced scope: Namespaced
names: names:
plural: network-attachment-definitions plural: network-attachment-definitions
@ -13,10 +12,16 @@ spec:
kind: NetworkAttachmentDefinition kind: NetworkAttachmentDefinition
shortNames: shortNames:
- net-attach-def - net-attach-def
validation: versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema: openAPIV3Schema:
type: object
properties: properties:
spec: spec:
type: object
properties: properties:
config: config:
type: string type: string

View file

@ -36,6 +36,10 @@ spec:
- "--cni-bin-dir={{ multus_cni_bin_dir }}" - "--cni-bin-dir={{ multus_cni_bin_dir }}"
- "--multus-conf-file={{ multus_conf_file }}" - "--multus-conf-file={{ multus_conf_file }}"
- "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}" - "--multus-kubeconfig-file-host={{ multus_kubeconfig_file_host }}"
- "--cni-version={{ multus_cni_version }}"
{% if container_manager == 'crio' %}
- "--restart-crio=true"
{% endif %}
resources: resources:
requests: requests:
cpu: "100m" cpu: "100m"
@ -45,12 +49,25 @@ spec:
memory: "50Mi" memory: "50Mi"
securityContext: securityContext:
privileged: true privileged: true
{% if container_manager == 'crio' %}
capabilities:
add: ["SYS_ADMIN"]
{% endif %}
volumeMounts: volumeMounts:
{% if container_manager == 'crio' %}
- name: run
mountPath: {{ multus_cni_run_dir }}
{% endif %}
- name: cni - name: cni
mountPath: {{ multus_cni_conf_dir }} mountPath: {{ multus_cni_conf_dir }}
- name: cnibin - name: cnibin
mountPath: {{ multus_cni_bin_dir }} mountPath: {{ multus_cni_bin_dir }}
volumes: volumes:
{% if container_manager == 'crio' %}
- name: run
hostPath:
path: {{ multus_cni_run_dir_host }}
{% endif %}
- name: cni - name: cni
hostPath: hostPath:
path: {{ multus_cni_conf_dir_host }} path: {{ multus_cni_conf_dir_host }}