Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vm): add live migration for nodePlacement #518

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
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
37 changes: 37 additions & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ vars:
target: ""
VALIDATION_FILES: "tools/validation/{main,messages,diff,no_cyrillic,doc_changes,copyright}.go"

DLV_IMAGE:
sh: if [ -z $DLV_IMAGE ]; then echo "ttl.sh/$(uuidgen | awk '{print tolower($0)}'):10m" ; else echo $DLV_IMAGE ; fi

tasks:
check-werf:
cmds:
Expand Down Expand Up @@ -148,6 +151,40 @@ tasks:
- task: cve:bin
- tools/cve/scan-main.sh {{.REPORT_FILE_NAME}}

dlv:virt-controller:build:
desc: "Build image virt-controller with dlv"
cmd: docker build -f ./images/virt-controller/debug/dlv.Dockerfile -t "{{ .DLV_IMAGE }}" .

dlv:virt-controller:build-push:
desc: "Build and Push image virt-controller with dlv"
cmds:
- task: dlv:virt-controller:build
- docker push "{{ .DLV_IMAGE }}"
- task: dlv:virt-controller:print

dlv:virt-controller:print:
desc: "Print commands for debug"
env:
IMAGE: "{{ .DLV_IMAGE }}"
cmd: |
cat <<EOF
kubectl -n d8-virtualization patch deploy virt-controller --type='strategic' -p '{
"spec": {
"template": {
"spec": {
"containers": [ {
"name": "virt-controller",
"image": "${IMAGE}",
"ports": [ { "containerPort": 2345, "name": "dlv" } ]
}]
}
}
}
}'
kubectl -n d8-virtualization port-forward deploy/virt-controller 2345:2345
EOF
echo 'kubectl -n d8-virtualization port-forward $(kubectl -n d8-virtualization get pod -l kubevirt.internal.virtualization.deckhouse.io=virt-controller -oname | head -1) 2345:2345'

dlv:virt-handler:build:
desc: "Build image virt-handler with dlv"
cmd: docker build -f ./images/virt-handler/debug/dlv.Dockerfile -t "{{ .DLV_IMAGE }}" --platform linux/amd64 .
Expand Down
Loading
Loading