imageswap-webhook icon indicating copy to clipboard operation
imageswap-webhook copied to clipboard

Environment variable to set listening port

Open M4C4R opened this issue 3 years ago • 3 comments

What would you like to be added:

I'd like to be able to set which port the application listens on, instead of being fixed to 5000.

Why is this needed:

It would add flexibility in allowing me to re-use already open ports as opposed to having to open a new one.

M4C4R avatar Sep 21 '22 11:09 M4C4R

Changing the port would require more than an ENV var. It would require changing the service as well. Can you provide more information on the scenario you have in mind? If I have more context, I may be able to better understand your needs and come up with another solution.

phenixblue avatar Dec 16 '22 06:12 phenixblue

Hey @phenixblue, so this came out of https://github.com/phenixblue/imageswap-webhook/issues/82, where I had to allow inbound access on the port the pod was listening on (5000) to get the webhook to work in AWS EKS.

As such, I'd like to be able to configure which port the application listens on (and the targetPort on the svc) to re-use already open ports.

M4C4R avatar Jan 10 '23 22:01 M4C4R

Maybe I'm not familiar with something EKS is doing. Does it not target the port on the ImageSwap Service? The way I understand things is the Webhook Configuration should point at the Service/Port and not the pod/port.

phenixblue avatar Jan 11 '23 03:01 phenixblue