-
Notifications
You must be signed in to change notification settings - Fork 575
Kubernetes Readiness probe fails if proxy is set #625
Comments
It would seem to me that the dynamic nodes that spin up should inherit the proxy settings from the hub's deployment. Similar to what I had said was needed in #438 and how https://github.com/zalando/zalenium/blob/6942f80e986e504b2cf97f7f86600d28f4aca3b4/docs/_posts/2000-01-05-docker.md reads. I'm not sure why the documentation says it can be done when it cannot. |
It’s an easy fix. Just need to put |
@mickfeech it only was implemented for docker mode and not kubernetes, that’s why it doesn’t work. See 76c66dd |
I had a spare 30 minutes, so I have implemented this fix. |
Because of issue #438 we have to modify the elgalu/selenium image with this several line dockerfile:
FROM elgalu/selenium
ENV http_proxy=http://our.proxy.server.information https_proxy=http://our.proxy.server.information
ENV no_proxy="zalenium hub route, other internal addresses"
While this has worked for quite some time, it seems to now be causing the Kubernetes readiness probe to fail.
Here is the readiness probe that is being generated
This curl statement is looking for the actual ip address of the container, so it is trying to generate a request such as
http://10.1.15.254:40000/wd/hub/status
10.1.15.254 is an internal address to Kubernetes, but because of the proxy settings which we had to add to the image, this is causing the request to be sent to the proxy server as if it were external traffic headed outside our corporate firewall. This is causing all of the readiness probes to fail, and every node to connect to the Zalenium hub, and be killed 10 minutes later when Kubernetes can not successfully complete the readiness check.
Since each pod gets a different ip address each time it is run, there is no way to add every possible address to the no_proxy string, and no_proxy does not seem to be accepting wildcards for ip ranges
If the readiness check were http://localhost:40000/wd/hub/status it would work, as localhost is in the no_proxy settings. It looks as if this can be easily changed by editing line 562 of /src/main/java/de/zalando/ep/zalenium/container/kubernetes/KubernetesContainerClient.java , but that looks like it was changed to resolve issue #584, and I don't want to re-break this issue.
Zalenium Image Version(s):
3.12.0d
Docker Version:
1.12.6
OS:
RHEL 7
Docker Command to start Zalenium:
Zalenium.yml:
The text was updated successfully, but these errors were encountered: