Enable default CNI plugins
Currently, only a subset of the default CNI plugins are enabled in StarlingX. These plugins are provided by Calico and placed in the /opt/cni/bin directory. On CentOS, the full set of CNI plugins that are distributed by the containernetworking-plugins package are installed under the default directory for system daemons and utilities at /usr/libexec/cni This means that some of the default plugins such as static ipam and dhcp are not available to be used, as kublet looks at the /opt/cni/bin directory by default. This commit changes the cni-bin volume of the Calico, Multus, and SRIOV CNI daemonsets to refer to the plugin executable path used by the containernetworking-plugins package. As such, it is also required that the --cni-bin-dir option now be passed to kubelet. Depends-on: https://review.opendev.org/680408 Closes-Bug: #1840391 Change-Id: I9a0cbd63012d9a748826f24ae935823693048044 Signed-off-by: Steven Webster <steven.webster@windriver.com>
This commit is contained in:
@@ -484,6 +484,11 @@ subjects:
|
||||
# This manifest installs the node container, as well
|
||||
# as the Calico CNI plugins and network config on
|
||||
# each master and worker node in a Kubernetes cluster.
|
||||
#
|
||||
# The following modifications have been made:
|
||||
#
|
||||
# - The cnibin volume hostPath is made variable
|
||||
# - The UPDATE_CNI_BINARIES environment variable is set to 'false'
|
||||
kind: DaemonSet
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
@@ -579,6 +584,9 @@ spec:
|
||||
# Prevents the container from sleeping forever.
|
||||
- name: SLEEP
|
||||
value: "false"
|
||||
# Prevents any existing CNI plugins from being updated
|
||||
- name: UPDATE_CNI_BINARIES
|
||||
value: "false"
|
||||
volumeMounts:
|
||||
- mountPath: /host/opt/cni/bin
|
||||
name: cni-bin-dir
|
||||
@@ -741,7 +749,7 @@ spec:
|
||||
# Used to install CNI.
|
||||
- name: cni-bin-dir
|
||||
hostPath:
|
||||
path: /opt/cni/bin
|
||||
path: {{ kubelet_cni_bin_dir }}
|
||||
- name: cni-net-dir
|
||||
hostPath:
|
||||
path: /etc/cni/net.d
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Overrides config file for kubelet
|
||||
KUBELET_EXTRA_ARGS=--node-ip={{ node_ip }}
|
||||
KUBELET_EXTRA_ARGS=--cni-bin-dir={{ kubelet_cni_bin_dir }} --node-ip={{ node_ip }}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
# - The tuning plugin is used to update sysctl tcp_keepalive timers.
|
||||
# - The portmap plugin is enabled to allow forwarding from one or more ports
|
||||
# on the host to the container
|
||||
# - The cnibin volume hostPath is made variable
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -197,7 +198,7 @@ spec:
|
||||
path: /etc/cni/net.d
|
||||
- name: cnibin
|
||||
hostPath:
|
||||
path: /opt/cni/bin
|
||||
path: {{ kubelet_cni_bin_dir }}
|
||||
- name: multus-cfg
|
||||
configMap:
|
||||
name: multus-cni-config
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
# The following modifications have been made:
|
||||
#
|
||||
# - The daemonset is modified to tolerate all NoSchedule taints
|
||||
# - The cnibin volume hostPath is made variable
|
||||
---
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
@@ -47,4 +48,4 @@ spec:
|
||||
volumes:
|
||||
- name: cnibin
|
||||
hostPath:
|
||||
path: /opt/cni/bin
|
||||
path: {{ kubelet_cni_bin_dir }}
|
||||
|
||||
Reference in New Issue
Block a user