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
- [flanneld](https://github.com/coreos/flannel) v0.11.0
- [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
- Application
- [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"
kube_ovn_version: "v0.6.0"
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)
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_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_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 }}"

View file

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

View file

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

View file

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