mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
feat(kubevirt-youko): serve VM golden images from a shared NFS store (#282)
* feat(kubevirt-youko): export a shared golden-image store over NFS * feat(vm-images): upload golden images into the cluster Replace the rsync-to-orangepi5 step with a CDI upload into the golden-image PVCs (vms/golden-images in k8s-gitops), so VM images no longer depend on the single-board file server.
This commit is contained in:
1 parent
1c3b826c73
commit
a4609501c4
2 files changed
+41
-2
No files matched your search
@@ -89,6 +89,14 @@ export def upload-vm [
|
||||
nix build $target
|
||||
}
|
||||
|
||||
let remote = $"root@192.168.5.178:/data/caddy/fileserver/vms/kubevirt-($name).qcow2"
|
||||
rsync -avz --progress --copy-links --checksum result/nixos-image-*.qcow2 $remote
|
||||
# Push the freshly built image into its golden-image PVC. The PVC is
|
||||
# declared in k8s-gitops (vms/golden-images) and lives on the shared NFS
|
||||
# store exported by kubevirt-youko, so every node can clone it when a VM
|
||||
# is (re)created.
|
||||
#
|
||||
# Requires the CDI upload proxy to be reachable from here; it is exposed
|
||||
# as a NodePort by the cluster (see infra/configs/base/kubevirt).
|
||||
let uploadProxyUrl = "https://192.168.5.181:30443"
|
||||
let image = (glob result/nixos-image-*.qcow2 | first)
|
||||
virtctl image-upload pvc $"golden-($name)" -n vms --image-path $image --uploadproxy-url $uploadProxyUrl --insecure
|
||||
}
|
||||
Reference in new issue
Block a user