elastic / cloud-on-k8s

Elastic Cloud on Kubernetes
Other
2.52k stars 686 forks source link

Implement war offloading in Enterprise Search controller to allow readOnlyFilesystem #7913

Open pebrc opened 2 weeks ago

pebrc commented 2 weeks ago
          Is this something we should make the operator do by default for Enterprise Search?

Originally posted by @thbkrkr in https://github.com/elastic/cloud-on-k8s/issues/7898#issuecomment-2178658537

Implement the documented workaround directly in the operator. Copy war files to emptyDir volumes via initcontainer

Less than half a GB, so it seems reasonable.

tested in 8.14.0 (https://github.com/elastic/cloud-on-k8s/blob/main/config/samples/enterprisesearch/ent_es.yaml) enterprise-search@ent-sample-ent-67fff4c559-zkqmn:~$ du -sh /usr/share/enterprise-search/{tmp,filebeat/data,lib/war} 4.7M /usr/share/enterprise-search/tmp 24K /usr/share/enterprise-search/filebeat/data 428M /usr/share/enterprise-search/lib/war

https://github.com/elastic/cloud-on-k8s/pull/7898#issuecomment-2178920182

barkbay commented 1 week ago

Should we not try to fix the image first? Or make it easier to run it in a read only fs? For example by including the script to copy the files in the image or in the Enterprise Search startup script? @leemthompo do you know if this is something that can be improved on the Enterprise Search side?

The fact that ECK must rely on this level of detail on the Enterprise Search image implementation feels a bit wrong to me tbh.

pebrc commented 1 week ago

That's a very good point @barkbay and we should do that for future versions of Enterprise Search (the workaround might still be relevant for already released ones).

leemthompo commented 1 week ago

@leemthompo do you know if this is something that can be improved on the Enterprise Search side?

Pinging the dev team for input!

leemthompo commented 1 week ago

Because this hasn't come up before and we have a documented workaround the feedback from team is that we won't be prioritizing updating the image right now