make-files / makefiles

A library of opinionated Makefiles for popular programming languages.
https://makefiles.dev
MIT License
4 stars 5 forks source link

Provide a way to explicitly set the Telepresence **remote** service port #96

Closed ezzatron closed 4 months ago

ezzatron commented 2 years ago

In some of our services, we've starting having multiple ports, and Telepresence does not always try to intercept the expected port. It would be nice to be able to specify the remote port (or port name) via a Makefile/environment variable (perhaps TELEPRESENCE_SERVICE_REMOTE_PORT).

Usage would look like this:

make intercept                                                # intercepts default remote port
TELEPRESENCE_SERVICE_REMOTE_PORT=observability make intercept # intercepts custom named remote port

Where the Makefile might have a default port defined:

TELEPRESENCE_SERVICE_REMOTE_PORT := api
jmalloc commented 2 years ago

I nearly added this the other day, but what would be even better is being able to intercept multiple ports as a single logical operation. It's not currently supported by Telepresence natively, but we could do it in the Makefiles.

ezzatron commented 2 years ago

Yeah, I suppose for make intercept that could work. Less so for make intercept-run.