hasura / gitkube

Build and deploy docker images to Kubernetes using git push
Apache License 2.0
3.81k stars 207 forks source link

silence 'Did not receive identification string from...' messages from SSHD/gikubed #114

Closed yld closed 5 years ago

yld commented 5 years ago

With current SSHD configuration, gitkubed deployement readynessProbe on port 22 is throwing dozens of logs message like Did not receive identification string from 10.93.50.85 port 5510 (every 2 seconds).

This tiny PR set SSH log level to ERROR instead of INFO fixing logs verbosity.

tirumaraiselvan commented 5 years ago

Although this is fine.

I think considering the readinessProbe is failing (hence it is continuously polled), we should also just remove the readinessProbe?

yld commented 5 years ago

I like having this probe, otherwise how will we know if the service still up and running.

ReadynessProbe is a little bit misleading name but documentation state that:

Readiness probes runs on the container during its whole lifecycle.

Maybe setting the log level in an environment variable could be better (to ease debuging for example)?

tirumaraiselvan commented 5 years ago

But I am guessing the readinessProbe is not successful because sshd connections need to have identifying information atleast. I am not sure how k8s is marking this ready with such errors.

yld commented 5 years ago

It is working fine, otherwise kubernetes won't allow any incoming connection to reach gitkube.

According documentation about tcpSocket probes:

(...) TCP Socket. With this configuration, the kubelet will attempt to open a socket to your container on the specified port. If it can establish a connection, the container is considered healthy, if it can’t it is considered a failure.

So it's working fine and useful.

tirumaraiselvan commented 5 years ago

Cool. Interesting behaviour of readinessProbe. I didn't imagine it would more than once after a container startup.