Repository navigation
Arbitrary cloud-init user-data via a generated NoCloud ISO - #17
Merged
Merged
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds arbitrary cloud-init user-data, delivered 100% over the API (no SSH, no
snippets). Proxmox's native cloud-init options can't carry raw user-data, and
snippets need file access to the node; instead proxmops generates a NoCloud
CIDATA seed ISO from
spec.userData, uploads it, and attaches it as a cdrom.Any NoCloud consumer (cloud-init, guix-metadata) reads it at boot.
Manifest
userDatais mutually exclusive withcloudInitandiso(all three drive thecidata disk / ide0).
How
internal/proxmox/cidata.go: build the CIDATA ISO with go-diskfs; upload via araw multipart POST (the go-proxmox SDK's Upload mis-formats the body); resolve an
iso-content storage; delete old seeds.
proxmops-cidata-<vmid>-<hash8>.iso, so the attached ide0encodes which user-data is live.
(ide2) is skipped when userData is set (would be a second cidata disk).
Re-sync (scope B)
ide0. On a change it re-provisions (upload new, attach, delete old).
applyMode: reboot, elsereported as "reboot required".
Verification
parse helpers, manifest exclusivity, and the reconciler drift branches
(running+reboot, running+informational, stopped+reprovision, no-drift).
right cidata ISO (hash matches content, no ide2); changing userData
re-provisions the new ISO, deletes the old one, and reboots only a running VM.
golangci-lint (v2), gofmt, Go + vitest suites green. Promotes go-diskfs to a
direct dependency.