-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[7.x] [elasticsearch] use bash for readiness script (#1458) #1459
Conversation
This commit set the readiness probe to use bash instead of sh. This is required for Elasticsearch > 7.16.0 because the Docker image is now based on Ubuntu instead of CentOS 8, and sh on Ubuntu isn't compatible with the `if [[ ... -eq .... ]]` statements used in the readiness probe.
Tests are still failing because we can't download the goss binary from GitHub inside the Ubuntu based Elasticsearch Docker image:
It seems that's because the |
We don't install RUN set -eux ; \
export DEBIAN_FRONTEND=noninteractive ; \
apt-get update ; \
apt-get install -y ca-certificates ; \
apt-get clean ; \
rm -rf /var/lib/apt/lists/* |
Unfortunately that's not possible for Elasticsearch chart tests as we need to run tests in an already running container from the unmodified Elasticsearch image which means we also can't exec as root in the running pod to install the package. |
This commit update the way goss binary is retrieved in the tests/examples. The goss binary is now downloaded locally then copied inside the pod. This is needed because the Elasticsearch Ubuntu based Docker images is missing the ca-certificates package, and so the curl https command is failling with `curl: (77) error setting certificate verify locations` error. Follow-up of elastic#1458 Relates to elastic#1459 (comment)
PR for workaround => #1460 |
Well...we could add the package in, but 7.16.0 has already been cut so that's not going to help you. It could be added for 7.16.1 I guess. |
This commit update the way goss binary is retrieved in the tests/examples. The goss binary is now downloaded locally then copied inside the pod. This is needed because the Elasticsearch Ubuntu based Docker images is missing the ca-certificates package, and so the curl https command is failling with `curl: (77) error setting certificate verify locations` error. Follow-up of #1458 Relates to #1459 (comment)
#1460 should do the trick for helm-charts tests, I don't know if there is other use cases outside of helm-charts tests that could require having to run curl with HTTPS inside the containers. I may roll back #1460 later id you're adding back the |
Merging like this for now as tests are already failing anyway and it will need #1460 backport in addition of this PR to fix them. |
This commit update the way goss binary is retrieved in the tests/examples. The goss binary is now downloaded locally then copied inside the pod. This is needed because the Elasticsearch Ubuntu based Docker images is missing the ca-certificates package, and so the curl https command is failling with `curl: (77) error setting certificate verify locations` error. Follow-up of elastic#1458 Relates to elastic#1459 (comment)
This commit update the way goss binary is retrieved in the tests/examples. The goss binary is now downloaded locally then copied inside the pod. This is needed because the Elasticsearch Ubuntu based Docker images is missing the ca-certificates package, and so the curl https command is failling with `curl: (77) error setting certificate verify locations` error. Follow-up of #1458 Relates to #1459 (comment)
Backports the following commits to 7.x: