-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes uses the same ENV var "VOUCH_PORT" by default when container is named "vouch" #482
Comments
Hi @vumdao I'm guessing you've configured the port with a full URL but it's really hard to tell without more information. Please read the README and supply the requested information in the manner described there. Once we have that it'll be much easier to provide support. Cheers! |
@bnfinet Thanks for your reply, I did check carefully the README of how to request issue and what need to provide, so I provided my config and the only logs of the I did further investigation and see that it's due to
Without the service, it started successfully but that service is required so that
|
Adding env to container fixed the issue
|
@vumdao I'm so glad you were able to get it working. Please do let me know if you have any further questions |
The issue is, if the container is named vouch, then the env assigned in kubernetes is VOUCH_PORT=tcp://clusterip:port As you can see in the example above for get svc vouch, it would add ${NAME}_PORT=tcp://${CLUSTER-IP}:${PORT} |
@patrickdk77 you're pointing at a naming conflict/overlap for environmental variables between VP and kubernetes running vouch? That seems like a different issue. Could you please open a new issue to address that problem. |
I'm not sure how it is a different issue, the original issue was about the env overlap in kubernetes, and my response was about the same, since why it happens, or when you need or why you need to override it was not addressed. |
@patrickdk77 if that's the case then you're helping me to better understand the original issue I was under the impression that it was a configuration issue and that the container required the additional env var. I think I see it better now. |
@patrickdk77 what do you think the correct behavior of VP should be here? Is there a way to detect a Kubernetes cluster from within the container? |
The only way I know to detect it inside the container is looking for env KUBERNETES_PORT, but not sure if that is foolproof. I would likely just parse VOUCH_PORT, and if it is invalid, throw the error as currently done, and ignore the value and use the default it would have used instead. If it doesn't work, they can see it in the logs, and if it does work, it can also be a hint if they do look at the logs and see it. |
During config sanity check, it'd probably be nice if VP determined if VOUCH_PORT was not a number and then check if KUBERNETES_PORT was set and offer a helpful warning before failure. I feel like anything more than that changes the expected (and currently deployed) behavior of VP's VOUCH_PORT env var. |
@patrickdk77 thanks for clarifying my understanding of the problem. PR is most welcome |
I used AWS cognito with config
image: quay.io/vouch/vouch-proxy
No idea what's wrong here
The text was updated successfully, but these errors were encountered: