Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/components/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ firmware:
libvirt: v10.9.0
edk2: stable202411
core:
3p-kubevirt: v1.6.2-v12n.42
3p-kubevirt: feat/vm/disable-tap-veth-bridge
3p-containerized-data-importer: v1.60.3-v12n.19
distribution: 2.8.3
package:
Expand Down
12 changes: 12 additions & 0 deletions images/virt-artifact/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ secrets:
- id: SOURCE_REPO
value: {{ $.SOURCE_REPO }}
shell:
installCacheVersion: "{{ now | date "Mon Jan 2 15:04:05 MST 2006" }}"
install:
- |
echo "$date --------- new ----- 1234567899876543210 "
echo "Git clone {{ $gitRepoName }} repository..."
git clone --depth=1 $(cat /run/secrets/SOURCE_REPO)/{{ $gitRepoUrl }} --branch {{ $tag }} /src/kubevirt

Expand All @@ -28,6 +30,8 @@ altPackages:
- pkg-config
- libtool
- gcc-c++
- clang
- libbpf-devel
packages:
- libmnl
- ncurses
Expand Down Expand Up @@ -113,6 +117,7 @@ shell:
- export GOOS=linux
- export GOARCH=amd64
- export CGO_ENABLED=0
- export BPF_CLANG=clang

- echo ============== Build container-disk ===================
{{- $_ := set $ "ProjectName" (list .ImageName "container-disk" | join "/") }}
Expand Down Expand Up @@ -201,6 +206,13 @@ shell:
- |
{{- include "image-build.build" (set $ "BuildCommand" `go build -ldflags="-s -w" -o /kubevirt-binaries/sidecars ./cmd/sidecars/`) | nindent 6 }}

- echo ============== Build bpf_bridge.o =====================
{{- $_ := set $ "ProjectName" (list $.ImageName "bpf-bridge-obj" | join "/") }}
- mkdir -p /kubevirt-binaries/network-bpf-bridge-binding-assets
- |
{{- include "image-build.build" (set $ "BuildCommand" `clang -O2 -g -target bpf -I/usr/include -c ./pkg/network/bpfbridge/bpf/bpf_bridge.c -o /kubevirt-binaries/network-bpf-bridge-binding-assets/bpf_bridge.o`) | nindent 6 }}
- echo "Built bpf object:" && ls -l /kubevirt-binaries/network-bpf-bridge-binding-assets/ && file /kubevirt-binaries/network-bpf-bridge-binding-assets/bpf_bridge.o || true

- echo ============== Build virtctl ==========================
{{- $_ := set $ "ProjectName" (list .ImageName "virtctl" | join "/") }}
- |
Expand Down
6 changes: 6 additions & 0 deletions images/virt-handler/werf.inc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ import:
after: install
includePaths:
- .version
- image: {{ .ModuleNamePrefix }}virt-artifact
add: /kubevirt-binaries/network-bpf-bridge-binding-assets/
to: /usr/share/network-bpf-bridge-binding
after: install
includePaths:
- bpf_bridge.o
- image: {{ .ModuleNamePrefix }}virt-artifact
add: /kubevirt/cmd/{{ .ImageName }}/
to: /etc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ func DefaultOptions(current *v1alpha2.VirtualMachine) KVVMOptions {
}
}

func (b *KVVM) Options() KVVMOptions {
return b.opts
}

func NewEmptyKVVM(name types.NamespacedName, opts KVVMOptions) *KVVM {
return &KVVM{
opts: opts,
Expand Down Expand Up @@ -810,8 +814,9 @@ func (b *KVVM) SetNetworkInterface(name, macAddress string, acpiIndex int) {
Name: name,
Model: devPreset.InterfaceModel,
ACPIIndex: acpiIndex,
Binding: &virtv1.PluginBinding{Name: "bpfbridge"},
}
iface.Bridge = &virtv1.InterfaceBridge{}

if macAddress != "" {
iface.MacAddress = macAddress
}
Expand Down
5 changes: 5 additions & 0 deletions templates/kubevirt/kubevirt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ spec:
{{- end }}
evictionStrategy: LiveMigrate
vmRolloutStrategy: LiveUpdate
network:
binding:
bpfbridge:
domainAttachmentType: tap
migration: {}
developerConfiguration:
logVerbosity:
virtLauncher: {{ $logVerbosity }}
Expand Down
Loading