kubernetes-sigs/image-builder

Add "http_port_min" and "http_port_max" configuration for cloud-init

cal0s93 opened this issue · 5 comments

This issue requests the addition of two new variables, http_port_min and http_port_max, to all packer.json files in the project.

These variables will allow users to specify a port range for the HTTP service used by cloud-init during image creation.

Motivation:

Currently, the HTTP port used by cloud-init is hardcoded to 80. This can be a problem if the user wants to use a different port for security reasons or conflicts with other services.

Proposal:

Add the following two lines to all packer.json files:

"http_port_min": "{{user `http_port_min`}}",
"http_port_max": "{{user `http_port_max`}}",

Testing:

The modification has been successfully tested in the creation of a template on Proxmox by adding the lines to the packer.json file at line 22.

Impact:

This change will have a minimal impact on the project. The new variables will be optional, and existing functionality will remain the same for users who do not specify them.

Request:

Please review this issue and provide your comments or suggestions.

For which cloud operator are you trying to refer to? Because atleast for VMware vSphere, able to see ability to specify this.

@cal0s93 are you still facing issues with this?