serving icon indicating copy to clipboard operation
serving copied to clipboard

Why we need reserve PORT env for user-container?

Open wuyafang opened this issue 2 years ago • 5 comments

Ask your question here:

hi, everyone. I find when I create ksvc, I can't set env as PORT, for its is a reserved enviroment key for user-container. But I wonder why we need to reserve the PROT env in user-container spec. And why user-container need to know the PORT of its own?Maybe USER_PORT in queue-proxy container is enough.

wuyafang avatar Aug 11 '22 13:08 wuyafang

cc @nader-ziada

jwcesign avatar Aug 27 '22 14:08 jwcesign

I the env var name PORT is reserved by knative for the user container and there is validation to enforce that because the queue-proxy will be communicating with the user container using that port, you can however set the port on the queue-proxy if you want to

can you explain what issue you are having? can you possibly use a different env var name in your user application container?

nader-ziada avatar Aug 29 '22 15:08 nader-ziada

because the queue-proxy will be communicating with the user container using that port,

Perhaps queue-proxy container will use USER_PORT env, which is its own env var, instead of the PORT env in user-container? I haven't figured out the role of env vars such as PORT in user-container. If it doesn't work, is it better not to keep it?

wuyafang avatar Sep 01 '22 01:09 wuyafang

cc @nader-ziada

wuyafang avatar Sep 06 '22 02:09 wuyafang

@wuyafang I apologize, but I don't understand the issue very well, can you explain the scenario you are trying to accomplish and having trouble with?

nader-ziada avatar Sep 06 '22 14:09 nader-ziada

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

github-actions[bot] avatar Dec 06 '22 01:12 github-actions[bot]