Allow loopback and link-local addresses, resolve DNS names
- Support name resolution when detecting own private API URL
- Allow loopback and link-local addresses, log a warning
Fixes the bugs introduced in Multi-address URL for private API (!2133 - merged).
Relates to Rework KAS private API address discovery (#510 - closed).
With address: "gdk.test:8155":
{"time":"2025-01-19T11:35:48.282721+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:172.16.123.1|8155"}
With address: "localhost:8155":
{"time":"2025-01-19T11:37:01.665245+11:00","level":"WARN","msg":"Own private API multi URL contains a loopback or a link-local IP address(es). It's fine to use it if you are running a single kas replica. However, if you are running multiple kas replicas, they will likely not work correctly. See https://docs.gitlab.com/ee/administration/clusters/kas.html#enable-on-multiple-nodes for more information","url":""}
{"time":"2025-01-19T11:37:01.665278+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:::1,127.0.0.1|8155"}
With address: "gdk.test:8155" and OWN_PRIVATE_API_URL=grpc://localhost:123:
{"time":"2025-01-19T11:58:56.906046+11:00","level":"WARN","msg":"Own private API multi URL contains a loopback or a link-local IP address(es). It's fine to use it if you are running a single kas replica. However, if you are running multiple kas replicas, they will likely not work correctly. See https://docs.gitlab.com/ee/administration/clusters/kas.html#enable-on-multiple-nodes for more information","url":"grpc://localhost:123"}
{"time":"2025-01-19T11:58:56.906094+11:00","level":"INFO","msg":"Using own private API multi URL","url":"grpc:::1,127.0.0.1|123"}