Skip to content

Commit bab6398

Browse files
committed
passt: Fix docs
Update docs about cni daemonSet. Update outdated parts. Signed-off-by: Or Shoval <[email protected]>
1 parent cddff7b commit bab6398

File tree

1 file changed

+73
-11
lines changed
  • docs/network/net_binding_plugins

1 file changed

+73
-11
lines changed

docs/network/net_binding_plugins/passt.md

Lines changed: 73 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,80 @@ the passt plugin needs to:
7474
And in detail:
7575

7676
### Passt CNI deployment on nodes
77-
The CNI plugin binary can be retrieved directly from the kubevirt release
78-
assets (on GitHub) or to be built from its
77+
78+
#### prior to v1.6.0
79+
The CNI binary can be retrieved directly from the kubevirt release assets (on GitHub) or to be built from its
7980
[sources](https://github.com/kubevirt/kubevirt/tree/release-1.1/cmd/cniplugins/passt-binding).
8081

8182
> **Note**: The kubevirt project uses Bazel to build the binaries and container images.
8283
> For more information in how to build the whole project, visit the developer
8384
> [getting started guide](https://github.com/kubevirt/kubevirt/blob/release-1.1/docs/getting-started.md).
8485
85-
Once the binary is ready, you may rename it to a meaningful name
86-
(e.g. `kubevirt-passt-binding`).
86+
Once the binary is ready, you may rename it to a meaningful name (e.g. `kubevirt-passt-binding`).
8787
This name is used in the NetworkAttachmentDefinition configuration.
8888

8989
Copy the binary to each node in your cluster.
9090
The location of the CNI plugins may vary between platforms and versions.
9191
One common path is `/opt/cni/bin/`.
9292

93+
#### starting with v1.6.0
94+
Kubevirt releases a container image `quay.io/kubevirt/network-passt-binding-cni:v1.6.0`,
95+
which can be used via daemonSet to copy the CNI binary to the nodes.
96+
97+
Create the following DaemonSet:
98+
99+
```yaml
100+
apiVersion: apps/v1
101+
kind: DaemonSet
102+
metadata:
103+
name: passt-binding-cni
104+
namespace: kubevirt
105+
labels:
106+
tier: node
107+
app: passt-binding-cni
108+
spec:
109+
selector:
110+
matchLabels:
111+
name: passt-binding-cni
112+
updateStrategy:
113+
type: RollingUpdate
114+
rollingUpdate:
115+
maxUnavailable: 10%
116+
template:
117+
metadata:
118+
labels:
119+
name: passt-binding-cni
120+
tier: node
121+
app: passt-binding-cni
122+
annotations:
123+
description: passt-binding-cni installs 'passt binding' CNI on cluster nodes
124+
spec:
125+
priorityClassName: system-cluster-critical
126+
containers:
127+
- name: installer
128+
image: quay.io/kubevirt/network-passt-binding-cni:v1.6.0
129+
command: [ "/bin/sh", "-ce" ]
130+
args:
131+
- |
132+
ls -la "/cni/kubevirt-passt-binding"
133+
cp -f "/cni/kubevirt-passt-binding" "/opt/cni/bin"
134+
echo "passt binding CNI plugin installation complete..sleep infinity"
135+
sleep 2147483647
136+
resources:
137+
requests:
138+
cpu: "10m"
139+
memory: "15Mi"
140+
securityContext:
141+
privileged: true
142+
volumeMounts:
143+
- name: cnibin
144+
mountPath: /opt/cni/bin
145+
volumes:
146+
- name: cnibin
147+
hostPath:
148+
path: /opt/cni/bin
149+
```
150+
93151
### Passt NetworkAttachmentDefinition
94152
The configuration needed for passt is minimalistic:
95153
@@ -123,16 +181,20 @@ The sidecar sources can be found
123181
The relevant sidecar image needs to be accessible by the cluster and
124182
specified in the Kubevirt CR when registering the network binding plugin.
125183
126-
### Feature Gate
127-
If not already set, add the `NetworkBindingPlugins` FG.
184+
### Feature Gate - for KubeVirt versions prior to v1.5
185+
If not already set, add the `NetworkBindingPlugins` Feature Gate.
128186
```
129-
kubectl patch kubevirts -n kubevirt kubevirt --type=json -p='[{"op": "add", "path": "/spec/configuration/developerConfiguration/featureGates/-", "value": "NetworkBindingPlugins"}]'
187+
kubectl patch kubevirt -n kubevirt kubevirt --type=merge -p='{"spec":{"configuration":{"developerConfiguration":{"featureGates":["NetworkBindingPlugins"]}}}}'
130188
```
131189
132190
> **Note**: The specific passt plugin has no FG by its own. It is up to the cluster
133191
> admin to decide if the plugin is to be available in the cluster.
134192
> The passt binding is still in evaluation, use it with care.
135193
194+
**Note**:
195+
> It is up to the cluster admin to decide if the plugin is to be available in the cluster.
196+
> The passt binding is still in evaluation, use it with care.
197+
136198
### Passt Registration
137199
As described in the [registration section](../../network/network_binding_plugins.md#register), passt binding plugin
138200
configuration needs to be added to the kubevirt CR.
@@ -143,11 +205,11 @@ kubectl patch kubevirts -n kubevirt kubevirt --type=json -p='[{"op": "add", "pat
143205
"binding": {
144206
"passt": {
145207
"networkAttachmentDefinition": "default/netbindingpasst",
146-
"sidecarImage": "quay.io/kubevirt/network-passt-binding:20231205_29a16d5c9",
208+
"sidecarImage": "quay.io/kubevirt/network-passt-binding:v1.6.0",
147209
"migration": {},
148210
"computeResourceOverhead": {
149211
"requests": {
150-
"memory": "500Mi",
212+
"memory": "250Mi",
151213
}
152214
}
153215
}
@@ -159,7 +221,7 @@ The NetworkAttachmentDefinition and sidecarImage values should correspond with t
159221
names used in the previous sections, [here](#passt-networkattachmentdefinition)
160222
and [here](#passt-sidecar-image).
161223

162-
When using the plugin, additional memory overhead of `500Mi` will be requested for the compute container in the virt-launcher pod.
224+
When using the plugin, additional memory overhead of `250Mi` will be requested for the compute container in the virt-launcher pod.
163225

164226
When the VM boots for the first time, Passt's internal DHCP server assigns an IP address to the guest with an "infinite" lease duration.
165227

@@ -222,7 +284,7 @@ spec:
222284
terminationGracePeriodSeconds: 0
223285
volumes:
224286
- containerDisk:
225-
image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.1.0
287+
image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.6.0
226288
name: containerdisk
227289
- cloudInitNoCloud:
228290
networkData: |

0 commit comments

Comments
 (0)