Created
July 10, 2025 09:41
-
-
Save oshoval/59a6f31b414021378603f8033f8bf147 to your computer and use it in GitHub Desktop.
Install passt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| passt_binding_image="quay.io/kubevirt/network-passt-binding:20250710_4eea8f8826" | |
| # TODO add the kubevirt FG | |
| kubectl -n kubevirt patch kubevirt kubevirt --type=json --patch '[{"op":"add","path":"/spec/configuration/network","value":{}},{"op":"add","path":"/spec/configuration/network/binding","value":{"passt":{"computeResourceOverhead":{"requests":{"memory":"250Mi"}},"migration":{"method": ""},"networkAttachmentDefinition":"default/primary-udn-kubevirt-binding","sidecarImage":"'"${passt_binding_image}"'"},"l2bridge":{"domainAttachmentType":"managedTap","migration":{}}}}]' | |
| cat <<EOF | kubectl apply -f - | |
| --- | |
| apiVersion: "k8s.cni.cncf.io/v1" | |
| kind: NetworkAttachmentDefinition | |
| metadata: | |
| name: primary-udn-kubevirt-binding | |
| namespace: default | |
| spec: | |
| config: '{ | |
| "cniVersion": "1.0.0", | |
| "name": "primary-udn-kubevirt-binding", | |
| "plugins": [ | |
| { | |
| "type": "kubevirt-passt-binding" | |
| } | |
| ] | |
| }' | |
| EOF | |
| cat <<EOF | kubectl apply -f - | |
| apiVersion: apps/v1 | |
| kind: DaemonSet | |
| metadata: | |
| name: passt-binding-cni | |
| namespace: kubevirt | |
| labels: | |
| tier: node | |
| app: passt-binding-cni | |
| spec: | |
| selector: | |
| matchLabels: | |
| name: passt-binding-cni | |
| updateStrategy: | |
| type: RollingUpdate | |
| rollingUpdate: | |
| maxUnavailable: 10% | |
| template: | |
| metadata: | |
| labels: | |
| name: passt-binding-cni | |
| tier: node | |
| app: passt-binding-cni | |
| annotations: | |
| description: passt-binding-cni installs 'passt binding' CNI on cluster nodes | |
| spec: | |
| priorityClassName: system-cluster-critical | |
| containers: | |
| - name: installer | |
| image: quay.io/kubevirt/network-passt-binding-cni:20250710_4eea8f8826 | |
| command: [ "/bin/sh", "-ce" ] | |
| args: | |
| - | | |
| ls -la "/cni/kubevirt-passt-binding" | |
| cp -f "/cni/kubevirt-passt-binding" "/opt/cni/bin" | |
| echo "passt binding CNI plugin installation complete..sleep infinity" | |
| sleep 2147483647 | |
| resources: | |
| requests: | |
| cpu: "10m" | |
| memory: "15Mi" | |
| securityContext: | |
| privileged: true | |
| volumeMounts: | |
| - name: cnibin | |
| mountPath: /opt/cni/bin | |
| volumes: | |
| - name: cnibin | |
| hostPath: | |
| path: /opt/cni/bin | |
| EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment