This repository has been archived by the owner on Aug 14, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather look at a health check status for effective availability (also usually more efficient and reliable)
https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here we just want to check for the dns and not introduce dependency on the way the service is configured (port or protocol or health)
a simple nslookup is enough, the healthness is testd by the readiness of the elasticsearch service that is using the es health status.
note also that check using busybox image and nslookup requires specific version to work properly (1.28)
docker-library/busybox#48 -> kubernetes/website#9901
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes so it sucks, k8s resolves the service name while it is not READY.
The readinessprobe logic must be duplicated in the nuxeo deployment initContainers.
Using elastic health state is better, even if nuxeo is waiting for the non red state it will fail faster in case of pb and we will not take the risk of exceeding the nuxeo es timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in the end it looks like that K8s service ports are open only once the service is ready (the readiness probe of the service is successful), so we can just use "nc -w1 service port" to wait for the service, see next pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#9