Skip to content

feat: add cloud-init user data support via Linode Metadata#222

Open
lots0logs wants to merge 1 commit intolinode:mainfrom
lots0logs:cloud-init-base
Open

feat: add cloud-init user data support via Linode Metadata#222
lots0logs wants to merge 1 commit intolinode:mainfrom
lots0logs:cloud-init-base

Conversation

@lots0logs
Copy link
Copy Markdown

Summary

  • add --linode-user-data / LINODE_USER_DATA support for cloud-init user data
  • support inline content and @file input forms
  • base64-encode and pass user data through Linode instance metadata
  • add tests and docs for user-data behavior

Fixes #221

* feat: support metadata user data

Co-authored-by: lots0logs <4675662+lots0logs@users.noreply.github.com>

* fix: address cloud-init review comments

Agent-Logs-Url: https://github.com/lots0logs/docker-machine-driver-linode/sessions/7c66e84c-87fb-4861-ab2d-8874c175f8f5

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: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for supplying cloud-init user data when creating Linode instances with this docker-machine driver, passing it through Linode’s Metadata service.

Changes:

  • Introduces --linode-user-data / LINODE_USER_DATA with inline and @file forms, encoding content as base64.
  • Sends the encoded user data via InstanceCreateOptions.Metadata during instance creation.
  • Adds unit tests covering inline, file-backed, and error cases, plus README option documentation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
README.md Documents the new linode-user-data option and its behavior.
pkg/drivers/linode/linode.go Adds driver field/flag parsing, base64 encoding helper, and passes user-data via instance metadata on create.
pkg/drivers/linode/linode_test.go Adds tests for inline and file-based user-data handling and error paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Cloud-Init User Data Support

3 participants