Fixes #39550 - Add vendor_data template kind - #11115
Conversation
Add a new vendor_data TemplateKind alongside a dedicated /userdata/:mac/vendor-data endpoint to serve vendor-data during image-based provisioning. Unlike user-data, vendor-data is optional: if no template is configured for the host's OS, the endpoint returns an empty response instead of 404. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Initial request was, to fix issues like: It would also be possible, to add a route which would simply return nothing and maybe log the request - but, this would not be very helpful. Then I thought, it might be helpful to have the possbility to have real vendor-data templates and add additional scripts here. So, here it is :) |
| - Ubuntu | ||
| description: | | ||
| This template is served as vendor-data during image based provisioning alongside the user-data | ||
| template. It contains Foreman-specific configuration that is the responsibility of Foreman as |
There was a problem hiding this comment.
This description does not reflect the content of the template.
Right now there is only echo, and that's all. IMO, we should add stuff similar to other default templates, like in cloud_init default or user data default.
| description: | | ||
| This template is served as vendor-data during image based provisioning alongside the user-data | ||
| template. It contains Foreman-specific configuration that is the responsibility of Foreman as | ||
| the infrastructure vendor: notifying Foreman when the host is built. |
There was a problem hiding this comment.
notifying Foreman when the host is built.
That's not true with the current content.
| "finish" => N_("Post-install script for preseed-based or cloud instance. Connection is made via SSH, credentials or key must exist and inventory IP address must match. Only used when 'user data' is not set."), | ||
| "script" => N_("An arbitrary script, must be manually downloaded using wget/curl."), | ||
| "user_data" => N_("Template with seed data for virtual or cloud instances when 'user data' flag is set, typically cloud-init or ignition format."), | ||
| "vendor_data" => N_("Template with vendor data for virtual or cloud instances, typically cloud-init format."), |
There was a problem hiding this comment.
What's the benefit of adding a new kind that's (in my eyes) very similar to or almost the same as user data and cloud-init?
Add a new vendor_data TemplateKind alongside a dedicated /userdata/:mac/vendor-data endpoint to serve vendor-data during image-based provisioning.
Unlike user-data, vendor-data is optional: if no template is configured for the host's OS, the endpoint returns an empty response instead of 404.