Skip to content

Instantly share code, notes, and snippets.

@dougbtv
Created November 23, 2022 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dougbtv/0efea9b57f209844ec7ef072c8feaecc to your computer and use it in GitHub Desktop.
Save dougbtv/0efea9b57f209844ec7ef072c8feaecc to your computer and use it in GitHub Desktop.
Install reference CNI plugins daemonset
---
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: multus-additional-cni-plugins
namespace: kube-system
annotations:
kubernetes.io/description: |
This daemon installs and configures auxiliary CNI plugins on each node.
spec:
selector:
matchLabels:
app: multus-additional-cni-plugins
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 10%
template:
metadata:
labels:
app: multus-additional-cni-plugins
component: network
type: infra
openshift.io/component: network
spec:
hostNetwork: true
nodeSelector:
kubernetes.io/os: linux
tolerations:
- operator: Exists
initContainers:
- name: cni-plugins
image: quay.io/dosmith/cni-plugins:gen4
command: ["/bin/bash", "-c", "cp -f $DEFAULT_SOURCE_DIRECTORY/* /host/opt/cni/bin"]
volumeMounts:
- mountPath: /host/opt/cni/bin
name: cnibin
env:
- name: DEFAULT_SOURCE_DIRECTORY
value: "/usr/src/plugins/bin"
resources:
requests:
cpu: 10m
memory: 10Mi
containers:
- name: kube-multus-additional-cni-plugins
image: quay.io/dosmith/cni-plugins:gen4
command: [ "/bin/bash", "-ec", "--" ]
args:
- >
trap : TERM INT; sleep infinity & wait
resources:
requests:
cpu: 10m
memory: 10Mi
securityContext:
privileged: true
terminationGracePeriodSeconds: 10
volumes:
- name: cnibin
hostPath:
path: "/opt/cni/bin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment