Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify user_data in a template #267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fernflower
Copy link
Contributor

For some cases relying on a script to be passed to shell provisioner is not enough. So let's allow user to specify actual userdata to be passed to the vm on creation, this will help in complex scenarios like persistently changing network routing that will survive reboots.

@ppc64le-cloud-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fernflower
Once this PR has been reviewed and has the lgtm label, please assign mkumatag for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ppc64le-cloud-bot ppc64le-cloud-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 20, 2025
@fernflower fernflower changed the title Allow ro specify user_data in a template Allow to specify user_data in a template Jan 20, 2025
@fernflower
Copy link
Contributor Author

@mkumatag Could you please advise me on failing test https://github.com/ppc64le-cloud/packer-plugin-powervs/actions/runs/12869521195/job/35878518826?pr=267 ? I tried reproducing with go fmt locally but no luck

@mkumatag
Copy link
Member

@mkumatag Could you please advise me on failing test https://github.com/ppc64le-cloud/packer-plugin-powervs/actions/runs/12869521195/job/35878518826?pr=267 ? I tried reproducing with go fmt locally but no luck

https://github.com/ppc64le-cloud/packer-plugin-powervs/actions/runs/12869521195/job/35878518826?pr=267 giving all the errors you need to address

@mkumatag
Copy link
Member

For some cases relying on a script to be passed to shell provisioner is not enough. So let's allow user to specify actual userdata to be passed to the vm on creation, this will help in complex scenarios like persistently changing network routing that will survive reboots.

It will be great if you can include the sample usage of this newly introduces field in the description above.

@ppc64le-cloud-bot ppc64le-cloud-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 20, 2025
For some cases relying on a script to be passed to shell
provisioner is not enough. So let's allow user to specify
actual userdata to be passed to the vm on creation, this
will help in complex scenarios like persistently changing
network routing that will survive reboots.

Sample configuration:

"user_data": "#cloud-config\nbootcmd:\n- ip route add 10.0.0.0/8 via 10.130.68.1 dev eth0"
@ppc64le-cloud-bot ppc64le-cloud-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants