gitlab-runner host-aliases is not documented, and thus all tries result in a invalid flag.
Gitlab runner register command allows the --kubernetes-host_aliases value to be specified. The command itself is documented briefly here: https://docs.gitlab.com/runner/executors/kubernetes/#add-extra-host-aliases
The documentation only specifies the go language type variables that are used. What is truly missing is an example of the usage of the flag.
ChatGPT recommended trying these two sample command lines:
gitlab-runner register ... --kubernetes-host_aliases '[{"ip":"192.168.1.100","host":"myservice.local"},{"ip":"192.168.1.101","host":"otherservice.local"}]'gitlab-runner register ... --kubernetes-host_aliases '[{"ip":"192.168.1.100","hostnames":["myservice.local"]},{"ip":"192.168.1.101","hostnames":["otherservice.local"]}]'
But both commands result in the following config.toml:
[[runners]]
...
[runners.kubernetes]
...
[runners.kubernetes.host_aliases]
[[runners.kubernetes.host_aliases]]
ip = ""
As you can see, the config.toml is invalid.
How do we specify the --kubernetes-host_aliases argument? Can it be added to the documentation?