Skip to content

Commit bbbe42a

Browse files
committed
Multus tarballs
Signed-off-by: Manuel Buil <mbuil@suse.com>
1 parent ce42ead commit bbbe42a

File tree

14 files changed

+715
-0
lines changed

14 files changed

+715
-0
lines changed
4.41 KB
Binary file not shown.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
appVersion: 4.0.2
3+
description: Multus Helm chart for Kubernetes
4+
home: https://github.com/k8snetworkplumbingwg/multus-cni
5+
icon: https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/master/doc/images/Multus.png
6+
maintainers:
7+
- email: charts@rancher.com
8+
name: Rancher Labs
9+
name: multus
10+
sources:
11+
- https://github.com/intel/multus-cni
12+
type: application
13+
version: 4.0.201+upv4.0.2-build2024020802
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
======
2+
1. The following components have been deployed as part of this helm chart:
3+
{{- if .Values.manifests.clusterRole }}
4+
Cluster Role: {{ .Values.serviceAccount.name }}
5+
{{- end}}
6+
{{- if .Values.manifests.clusterRoleBinding }}
7+
Cluster Role Binding: {{ .Chart.Name }}
8+
{{- end }}
9+
{{- if .Values.manifests.configMap }}
10+
Config Map: {{ .Release.Name }}-{{ .Chart.Version }}-config
11+
{{- end }}
12+
{{- if .Values.manifests.customResourceDefinition }}
13+
Custom Resource Definition: network-attachment-definitions.k8s.cni.cncf.io
14+
{{- end }}
15+
{{- if .Values.manifests.daemonSet }}
16+
Daemon Set: {{ .Release.Name }}
17+
{{- end }}
18+
{{- if .Values.manifests.dhcpDaemonSet }}
19+
Daemon Set: {{ .Release.Name }}-dhcp
20+
{{- end}}
21+
{{- if .Values.manifests.serviceAccount }}
22+
Service Account: {{ .Values.serviceAccount.name }}
23+
{{- end }}
24+
25+
You can now deploy any other CNI and create its Network Attachment Defintion.
26+
---------
27+
28+
2. To uninstall helm chart use the command:
29+
helm delete {{ .Release.Name }}
30+
31+
You may have to manually delete CRD -
32+
kubectl delete crd network-attachment-definitions.k8s.cni.cncf.io
33+
---------
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
{{/* Generate basic labels */}}
16+
{{- define "multus.labels" }}
17+
tier: node
18+
app: {{ .Chart.Name }}
19+
{{- end }}
20+
21+
{{- define "system_default_registry" -}}
22+
{{- if .Values.global.systemDefaultRegistry -}}
23+
{{- printf "%s/" .Values.global.systemDefaultRegistry -}}
24+
{{- else -}}
25+
{{- "" -}}
26+
{{- end -}}
27+
{{- end -}}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
{{- if .Values.manifests.clusterRole }}
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
kind: ClusterRole
17+
metadata:
18+
name: {{ .Chart.Name }}
19+
rules:
20+
- apiGroups: ["k8s.cni.cncf.io"]
21+
resources:
22+
- '*'
23+
verbs:
24+
- '*'
25+
- apiGroups:
26+
- ""
27+
resources:
28+
- pods
29+
- pods/status
30+
verbs:
31+
- get
32+
- update
33+
- apiGroups:
34+
- ""
35+
resources:
36+
- events
37+
verbs:
38+
- create
39+
{{- end }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
{{- if .Values.manifests.clusterRoleBinding }}
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
kind: ClusterRoleBinding
17+
metadata:
18+
name: {{ .Chart.Name }}
19+
roleRef:
20+
apiGroup: rbac.authorization.k8s.io
21+
kind: ClusterRole
22+
name: {{ .Chart.Name }}
23+
subjects:
24+
- kind: ServiceAccount
25+
name: {{ .Values.serviceAccount.name }}
26+
namespace: {{ .Release.Namespace }}
27+
{{- end }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
{{- if .Values.manifests.configMap }}
15+
apiVersion: v1
16+
kind: ConfigMap
17+
metadata:
18+
name: {{ .Release.Name }}-{{ .Chart.Version }}-config
19+
namespace: {{ .Release.Namespace }}
20+
labels:
21+
{{- include "multus.labels" . | indent 4 }}
22+
data:
23+
cni-conf.json: |-
24+
{{ toJson .Values.config.cni_conf | indent 4 }}
25+
{{- end }}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
{{- if .Values.manifests.customResourceDefinition }}
15+
apiVersion: apiextensions.k8s.io/v1
16+
kind: CustomResourceDefinition
17+
metadata:
18+
name: network-attachment-definitions.k8s.cni.cncf.io
19+
spec:
20+
group: k8s.cni.cncf.io
21+
scope: Namespaced
22+
names:
23+
plural: network-attachment-definitions
24+
singular: network-attachment-definition
25+
kind: NetworkAttachmentDefinition
26+
shortNames:
27+
- net-attach-def
28+
versions:
29+
- name: v1
30+
served: true
31+
storage: true
32+
schema:
33+
openAPIV3Schema:
34+
type: object
35+
properties:
36+
spec:
37+
type: object
38+
properties:
39+
config:
40+
type: string
41+
{{- end }}
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Copyright 2020 K8s Network Plumbing Group
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
{{- if .Values.manifests.daemonSet }}
15+
apiVersion: apps/v1
16+
kind: DaemonSet
17+
metadata:
18+
name: {{ .Release.Name }}
19+
namespace: {{ .Release.Namespace }}
20+
labels:
21+
{{- include "multus.labels" . | indent 4 }}
22+
spec:
23+
selector:
24+
matchLabels:
25+
app: {{ .Chart.Name }}
26+
updateStrategy:
27+
type: RollingUpdate
28+
rollingUpdate:
29+
maxUnavailable: 1
30+
template:
31+
metadata:
32+
labels:
33+
{{- include "multus.labels" . | indent 8 }}
34+
annotations:
35+
checksum/config: {{ include (print $.Template.BasePath "/configMap.yaml") . | sha256sum }}
36+
spec:
37+
priorityClassName: system-node-critical
38+
hostNetwork: true
39+
{{- with .Values.imagePullSecrets }}
40+
imagePullSecrets:
41+
{{- toYaml . | nindent 8 }}
42+
{{- end }}
43+
nodeSelector: {{- toYaml .Values.labels.nodeSelector | nindent 8 }}
44+
tolerations:
45+
- operator: Exists
46+
effect: NoSchedule
47+
- operator: Exists
48+
effect: NoExecute
49+
serviceAccountName: {{ .Values.serviceAccount.name }}
50+
initContainers:
51+
- name: cni-plugins
52+
image: {{ template "system_default_registry" . }}{{ .Values.cniplugins.image.repository }}:{{ .Values.cniplugins.image.tag }}
53+
securityContext:
54+
privileged: true
55+
volumeMounts:
56+
- name: cnibin
57+
mountPath: /host/opt/cni/bin
58+
env:
59+
- name: SKIP_CNI_BINARIES
60+
value: {{ .Values.cniplugins.skipcnis }}
61+
containers:
62+
- name: kube-{{ .Chart.Name }}
63+
image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }}
64+
imagePullPolicy: {{ .Values.image.pullPolicy }}
65+
env:
66+
- name: KUBERNETES_NODE_NAME
67+
valueFrom:
68+
fieldRef:
69+
fieldPath: spec.nodeName
70+
command: ["/thin_entrypoint"]
71+
args:
72+
- "--multus-conf-file={{ .Values.config.cni_conf.multusConfFile }}"
73+
{{- if .Values.config.cni_conf.cniVersion }}
74+
- "--cni-version={{ .Values.config.cni_conf.cniVersion }}"
75+
{{- end }}
76+
{{- if .Values.config.cni_conf.multusAutoconfigDir }}
77+
- "--multus-autoconfig-dir={{ .Values.config.cni_conf.multusAutoconfigDir }}"
78+
{{- end }}
79+
{{- if .Values.config.cni_conf.kubeconfig }}
80+
- "--multus-kubeconfig-file-host={{ .Values.config.cni_conf.kubeconfig }}"
81+
{{- end }}
82+
{{- if .Values.config.cni_conf.masterCniFilename }}
83+
- "--multus-master-cni-file-name={{ .Values.config.cni_conf.masterCniFilename }}"
84+
{{- end }}
85+
{{- if .Values.config.cni_conf.additionalBinDir }}
86+
- "--additional-bin-dir={{ .Values.config.cni_conf.additionalBinDir }}"
87+
{{- end }}
88+
{{- if .Values.config.cni_conf.skipMultusBinaryCopy }}
89+
- "--skip-multus-binary-copy={{ .Values.config.cni_conf.skipMultusBinaryCopy }}"
90+
{{- end }}
91+
{{- if .Values.config.cni_conf.readinessIndicatorFile }}
92+
- "--readiness-indicator-file={{ .Values.config.cni_conf.readinessIndicatorFile }}"
93+
{{- end }}
94+
{{- if .Values.config.cni_conf.namespaceIsolation }}
95+
- "--cni-namespace-isolation={{ .Values.config.cni_conf.namespaceIsolation }}"
96+
{{- end }}
97+
{{- if .Values.config.cni_conf.globalNamespaces }}
98+
- "--global-namespaces={{ .Values.config.cni_conf.globalNamespaces }}"
99+
{{- end }}
100+
{{- if .Values.config.cni_conf.logLevel }}
101+
- "--multus-log-level={{ .Values.config.cni_conf.logLevel }}"
102+
{{- end }}
103+
{{- if .Values.config.cni_conf.logFile }}
104+
- "--multus-log-file={{ .Values.config.cni_conf.logFile }}"
105+
{{- end }}
106+
{{- if .Values.config.cni_conf.cleanupConfigOnExit }}
107+
- "--cleanup-config-on-exit={{ .Values.config.cni_conf.cleanupConfigOnExit }}"
108+
{{- end }}
109+
{{- if .Values.pod.resources.multus }}
110+
resources: {{- toYaml .Values.pod.resources.multus | nindent 10 }}
111+
{{- end }}
112+
securityContext:
113+
privileged: true
114+
volumeMounts:
115+
- name: cni
116+
mountPath: /host/etc/cni/net.d
117+
- name: cnibin
118+
mountPath: /host/opt/cni/bin
119+
{{- if .Values.manifests.configMap }}
120+
- name: multus-cfg
121+
mountPath: /tmp/multus-conf/00-multus.conf.template
122+
subPath: "cni-conf.json"
123+
{{- end }}
124+
volumes:
125+
- name: cni
126+
hostPath:
127+
path: {{ .Values.config.cni_conf.confDir }}
128+
- name: cnibin
129+
hostPath:
130+
path: {{ .Values.config.cni_conf.binDir }}
131+
{{- if .Values.manifests.configMap }}
132+
- name: multus-cfg
133+
configMap:
134+
name: {{ .Release.Name }}-{{ .Chart.Name }}-{{ .Chart.Version }}-config
135+
{{- end }}
136+
{{- end }}

0 commit comments

Comments
 (0)