Skip to content

Commit c9efb1c

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 c9efb1c

File tree

1 file changed

+67
-27
lines changed
  • docs/network/net_binding_plugins

1 file changed

+67
-27
lines changed

docs/network/net_binding_plugins/passt.md

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ sysctl -w fs.file-max = 9223372036854775807
4747
> leading to memory overhead of up to 800 Mi.
4848
4949
## Passt network binding plugin
50-
[v1.1.0]
50+
[v1.6.0]
5151

5252
The binding plugin replaces the experimental core passt binding implementation
5353
(including its API).
@@ -74,21 +74,59 @@ 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
79-
[sources](https://github.com/kubevirt/kubevirt/tree/release-1.1/cmd/cniplugins/passt-binding).
77+
Create the following DaemonSet:
8078

81-
> **Note**: The kubevirt project uses Bazel to build the binaries and container images.
82-
> For more information in how to build the whole project, visit the developer
83-
> [getting started guide](https://github.com/kubevirt/kubevirt/blob/release-1.1/docs/getting-started.md).
84-
85-
Once the binary is ready, you may rename it to a meaningful name
86-
(e.g. `kubevirt-passt-binding`).
87-
This name is used in the NetworkAttachmentDefinition configuration.
88-
89-
Copy the binary to each node in your cluster.
90-
The location of the CNI plugins may vary between platforms and versions.
91-
One common path is `/opt/cni/bin/`.
79+
```yaml
80+
apiVersion: apps/v1
81+
kind: DaemonSet
82+
metadata:
83+
name: passt-binding-cni
84+
namespace: kubevirt
85+
labels:
86+
tier: node
87+
app: passt-binding-cni
88+
spec:
89+
selector:
90+
matchLabels:
91+
name: passt-binding-cni
92+
updateStrategy:
93+
type: RollingUpdate
94+
rollingUpdate:
95+
maxUnavailable: 10%
96+
template:
97+
metadata:
98+
labels:
99+
name: passt-binding-cni
100+
tier: node
101+
app: passt-binding-cni
102+
annotations:
103+
description: passt-binding-cni installs 'passt binding' CNI on cluster nodes
104+
spec:
105+
priorityClassName: system-cluster-critical
106+
containers:
107+
- name: installer
108+
image: quay.io/kubevirt/network-passt-binding-cni:v1.6.0
109+
command: [ "/bin/sh", "-ce" ]
110+
args:
111+
- |
112+
ls -la "/cni/kubevirt-passt-binding"
113+
cp -f "/cni/kubevirt-passt-binding" "/opt/cni/bin"
114+
echo "passt binding CNI plugin installation complete..sleep infinity"
115+
sleep 2147483647
116+
resources:
117+
requests:
118+
cpu: "10m"
119+
memory: "15Mi"
120+
securityContext:
121+
privileged: true
122+
volumeMounts:
123+
- name: cnibin
124+
mountPath: /opt/cni/bin
125+
volumes:
126+
- name: cnibin
127+
hostPath:
128+
path: /opt/cni/bin
129+
```
92130
93131
### Passt NetworkAttachmentDefinition
94132
The configuration needed for passt is minimalistic:
@@ -97,11 +135,11 @@ The configuration needed for passt is minimalistic:
97135
apiVersion: "k8s.cni.cncf.io/v1"
98136
kind: NetworkAttachmentDefinition
99137
metadata:
100-
name: netbindingpasst
138+
name: primary-udn-kubevirt-binding
101139
spec:
102140
config: '{
103141
"cniVersion": "1.0.0",
104-
"name": "netbindingpasst",
142+
"name": "primary-udn-kubevirt-binding",
105143
"plugins": [
106144
{
107145
"type": "kubevirt-passt-binding"
@@ -124,14 +162,12 @@ The relevant sidecar image needs to be accessible by the cluster and
124162
specified in the Kubevirt CR when registering the network binding plugin.
125163
126164
### Feature Gate
127-
If not already set, add the `NetworkBindingPlugins` FG.
165+
If not already set, add the `PasstIPStackMigration` Feature Gate.
128166
```
129-
kubectl patch kubevirts -n kubevirt kubevirt --type=json -p='[{"op": "add", "path": "/spec/configuration/developerConfiguration/featureGates/-", "value": "NetworkBindingPlugins"}]'
167+
kubectl patch kubevirt -n kubevirt kubevirt --type=merge -p='{"spec":{"configuration":{"developerConfiguration":{"featureGates":["PasstIPStackMigration"]}}}}'
130168
```
131169
132-
> **Note**: The specific passt plugin has no FG by its own. It is up to the cluster
133-
> admin to decide if the plugin is to be available in the cluster.
134-
> The passt binding is still in evaluation, use it with care.
170+
This Feature gate toggles calling of passt-repair for Passt seamless migration.
135171
136172
### Passt Registration
137173
As described in the [registration section](../../network/network_binding_plugins.md#register), passt binding plugin
@@ -142,12 +178,12 @@ To register the passt binding, patch the kubevirt CR as follows:
142178
kubectl patch kubevirts -n kubevirt kubevirt --type=json -p='[{"op": "add", "path": "/spec/configuration/network", "value": {
143179
"binding": {
144180
"passt": {
145-
"networkAttachmentDefinition": "default/netbindingpasst",
146-
"sidecarImage": "quay.io/kubevirt/network-passt-binding:20231205_29a16d5c9",
181+
"networkAttachmentDefinition": "default/primary-udn-kubevirt-binding",
182+
"sidecarImage": "quay.io/kubevirt/network-passt-binding:v1.6.0",
147183
"migration": {},
148184
"computeResourceOverhead": {
149185
"requests": {
150-
"memory": "500Mi",
186+
"memory": "250Mi",
151187
}
152188
}
153189
}
@@ -159,10 +195,14 @@ The NetworkAttachmentDefinition and sidecarImage values should correspond with t
159195
names used in the previous sections, [here](#passt-networkattachmentdefinition)
160196
and [here](#passt-sidecar-image).
161197

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

164200
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.
165201

202+
**Note**:
203+
> It is up to the cluster admin to decide if the plugin is to be available in the cluster.
204+
> The passt binding is still in evaluation, use it with care.
205+
166206
**Note**:
167207
> During a live migration:
168208
> - The target pod is assigned a new IP address from the pod network, which is reflected in the VMI interfaces status.
@@ -222,7 +262,7 @@ spec:
222262
terminationGracePeriodSeconds: 0
223263
volumes:
224264
- containerDisk:
225-
image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.1.0
265+
image: quay.io/kubevirt/fedora-with-test-tooling-container-disk:v1.6.0
226266
name: containerdisk
227267
- cloudInitNoCloud:
228268
networkData: |

0 commit comments

Comments
 (0)