Add Linode machine_config_v2 support for interface networking and user data#2121
Add Linode machine_config_v2 support for interface networking and user data#2121lots0logs wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds new Linode machine driver options to rancher2_machine_config_v2 so Terraform can configure Linode interface/VPC networking and metadata user data (cloud-init) for downstream provisioning.
Changes:
- Extend the Linode machine config v2 schema with interface/VPC networking fields and
user_data. - Update Linode expand/flatten logic to map the new fields between Terraform state and the Rancher machine config object.
- Add unit tests for Linode machine config v2 expand/flatten behavior, and document the new fields.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rancher2/structure_machine_config_v2_linode.go | Adds Linode config fields and maps them in expand/flatten. |
| rancher2/structure_machine_config_v2_linode_test.go | New tests covering expand/flatten for the added Linode fields. |
| rancher2/schema_machine_config_v2_linode.go | Adds schema entries for user_data and interface/VPC networking fields (plus conflicts/required-with wiring). |
| rancher2/resource_rancher2_machine_config_v2.go | Adds plan-time validation (CustomizeDiff) for interface/VPC field combinations. |
| docs/resources/machine_config_v2.md | Documents the new linode_config fields. |
9e4ec06 to
2a2e7a0
Compare
|
@lots0logs please sign your commits with verified signatures, if you look on the commits tab you will see the commits you have made. They should have the "verified" badge when signed properly. |
* feat: add linode vpc and user data fields Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * chore: user data plain string handling Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * fix: send linode user data plain text Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: validate linode interfaces subnet requirement Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * test: align linode fixture with schema constraints Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * Harden linode config validation Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> * Enforce vpc subnet interface validation Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> --------- Co-authored-by: openai-code-agent[bot] <242516109+Codex@users.noreply.github.com> Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com> Co-authored-by: Dustin Falgout <dustin@falgout.us> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2a2e7a0 to
ab1a565
Compare
Done ✔️ |
jiaqiluo
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
Since the PR depends on the machine driver, it makes sense not to merge it until the machine driver is updated in rancher/rancher.
|
@jiaqiluo is there an issue or PR in rancher/rancher for this already? |
|
@matttrach, I don't find any issue for it in rancher/rancher. The docker-machine-driver-linode is maintained by Linode. rancher/rancher#49533 tracks the last time we bumped the docker-machine-driver-linode. The actual PR was also raised by Linode. I know there is a communication channel between the Linode engineering team and us at the manager level, but I am not involved. I think the GH issue will be made by Sergey after the Linode team notifies us that they are ready for bumping the driver in Rancher. |
|
@jiaqiluo, thank you for reviewing this. Logged rancher/rancher#54573 to track Linode driver version bump that is a prerequisite to merging this PR (we can create backports as necessary). |
|
converting to draft makes sense to me |
|
@matttrach I've been informed by Linode Support that their Dev team said they are no longer accepting updates to their machine driver plugin code. They consider it to be legacy and EOL. I couldn't get any response directly from their Dev team on my PRs so not sure if this is a case of someone not knowing what they are talking about or if its legit. Maybe your team can reach out directly? |
Fixes #2120
Description
Adds support for the new Linode machine config fields in
rancher2_machine_config_v2so Terraform can configure the Linode machine driver updates for:user_data/ cloud-initThis change updates the Linode machine config schema, expand/flatten handling, validation, docs, and tests.
New
linode_configfields:use_interfacesvpc_subnet_idvpc_private_ippublic_interface_firewall_idvpc_interface_firewall_iduser_dataCompatibility notes:
create_private_ipsupport is preserved.vpc_subnet_idwhenuse_interfacesis enabled.This PR depends on the corresponding Linode machine driver support landing first:
Until those changes are merged and available in the driver consumed by Rancher, these provider fields will not be usable end-to-end.
Testing
Updated unit tests cover Linode machine config expand/flatten behavior for the new fields.
I did not run the full provider test suite as part of opening this PR.
Not a breaking change.