-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Having a hard time trying to work out a solution to running the ElasticSearch image in Kubernetes non-privileged container environment. A.k.a Openshift Online or Google Kubernetes Engine. It's not possible to set vm.max_map_count due to lack of permissions using an init-container, unless you run your own kubernetes platform and allow privileged containers.
After some investigation I found that you can use NIO instead of mmap:
index: store: type: niofs
I tried that but the boostrap checks still fired for the MaxMapCountCheck. I tried setting "es.enforce.bootstrap.checks" to false (not ideal) on the container, but it throws the exception:
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalArgumentException: [es.enforce.bootstrap.checks] must be [true] but was [false]
Looking at the code the MaxMapCountCheck is hardwired in and the es.enforce.bootstrap.checks logic has some extra assumptions built in.
If using niofs should I expect this check to occur?
It would be ideal if I could just disable the specific MaxMapCountCheck.
Willing to tackle a PR if necessary. There are probably several approaches.
Trying to avoid the possibility of having to run a dedicated kubernetes platform.