feat: add supplemental cloud-init user-data support#72
Draft
brngates98 wants to merge 5 commits into
Draft
Conversation
Add pve cloud-init source and cloud-config options, merge user-data with SSH key injection, and expose the new options in the Rancher UI. Made-with: Cursor Signed-off-by: brngates98 <briangates1998@gmail.com>
Refactor cloud-init user merge helpers and test names to satisfy wsl/testifylint/varnamelen, replace timeout magic number with a constant, and annotate SetConfigFromFlags for gocognit. Made-with: Cursor Signed-off-by: brngates98 <briangates1998@gmail.com>
b7c8756 to
6f7d5ba
Compare
Add pve-user-data driver support and a multiline User Data field in the Rancher UI, matching Harvester and vSphere workflows for pasting cloud-config YAML directly. Signed-off-by: brngates98 <briangates1998@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Show the cloud-init User Data field in the primary machine pool form instead of Advanced, and fix gofumpt formatting in cloud-init tests. Signed-off-by: brngates98 <briangates1998@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
LabeledInput type=multiline pulls in TextAreaAutoGrow in a way that breaks the machine-config extension chunk at runtime, which hides all PVE driver fields in Rancher. Signed-off-by: brngates98 <briangates1998@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Addresses #68.
Adds optional supplemental cloud-init user-data configuration, similar to other Rancher node drivers (e.g. Harvester/VMware). Users can start from stock cloud-image templates and layer custom cloud-config at node pool creation time instead of baking everything into a custom template.
Changes
--pve-cloud-init/PVE_CLOUD_INITfor an optional user-data source (local file path or URL)--pve-cloud-config/PVE_CLOUD_CONFIGfor an optional cloud-config YAML file pathIf both options are set,
--pve-cloud-configtakes precedence over--pve-cloud-init.Example cloud-config
For the use case in #68, users can supply something like:
This does not auto-install
qemu-guest-agentin the default generated user-data. Users supply packages and bootstrap steps via the new options above.Test plan
go test ./cmd/docker-machine-driver-pve/driver/ -run 'TestGenerateCloudinit|TestLoadCloudConfig'--pve-cloud-configpointing at a YAML file that installsqemu-guest-agentqemu-guest-agentis installed and running--pve-cloud-initworks with a local file path--pve-cloud-initworks with a URLRelated