Hey all, for an internal deploy of ECK, we are using a custom docker image that we host on GCR (gcr.io/etc/etc/kibana:latest). in the Dockerfile, I replace some images that are part of the assets, then remove the optimize folder so that they can be built on boot. Unfortunately, it seems as though kibana's readinessProbe only has an initialDelay of 10 seconds. And unfortunately, the optimizing process takes fairly longer than this, causing this pod to go into a boot loop.
Two questions:
Is there some way for me to force the optimize in the Dockerfile during build time?
If not, any way to modify the readinessProbe for the Kibana CRD? I am on 0.8
Alright, I've managed to solve this myself. Its definitely a hack but it does work.
Here is my dockerfile:
FROM docker.elastic.co/kibana/kibana:7.2.0
ARG loadingIcon=url\('data:image/png;base64,insertbase64pnghere);
# Use sed to drop our loading icon into the correct places.
RUN sed -i 's@url("data:image.*;@'"${loadingIcon}"'@g' /usr/share/kibana/src/legacy/ui/ui_render/views/chrome.pug
RUN sed -i 's@url("data:image.*;@'"${loadingIcon}"'@g' /usr/share/kibana/src/legacy/ui/ui_render/views/ui_app.pug
# Clear the optimize folder
RUN rm -rf /usr/share/kibana/optimize/*
# copy over the optimize script
COPY optimize.sh /usr/share/kibana/
RUN sh /usr/share/kibana/optimize.sh
and this is optimize.sh, which essentially just runs kibana for 5 minutes, then kills it, which gives it time to build out the optimize folder.
Essentially, whenever I build this docker image, it runs kibana momentarily to rebuild the optimize folder. When kubernetes then deploys it, the readinessProbes pass.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.