Full Solr Cloud Initialization (ConfigSet, Collections, Alias, ...)
I would like everything to be set and ready to use for my client without any additionnal configuration through my pipeline.
Right now I use API for
- uploading configset
- creating collections
- creating aliases
- ...
It's superset of these enhancements https://github.com/apache/solr-operator/issues/85 https://github.com/apache/solr-operator/issues/59 or this SIP https://cwiki.apache.org/confluence/display/SOLR/SIP-18%3A+A+Solr+Kubernetes+Module+for+native+integration
It seems that we can't use lifecycle.podstrart because the cluster is not ready yet
https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/#discussion
Kubernetes sends the postStart event immediately after the Container is created. There is no guarantee, however, that the postStart handler is called before the Container's entrypoint is called.
Is someone knows if the probes readiness / liveness start after lifecycle.podstrart or before ?
In waiting this, what is the best practices to do it, right now with 9.2 ?
what kind of pipeline do you use? Because I would recommend writing something to wait for Solr to be healthy and alive, then write "code" in your pipeline to make sure everything is uploaded/created.
Sorry, I missed your answer. We already use the pipeline (Concourse) for initialization. With this, we are pipeline dependent.
This enhancement will give one way for initialization and it will be faster, safer, simpler.
So the only real way to deal with this, if you can only use lifecycle.podstart, is to add a wait in there. The solr operator will set up the pods such that the readinessProbe or even the startupProbe will let you know when the pod is ready to affect API calls. But if you can only use the lifecycle hooks, there isn't much that can be done.
Also the lifecycle hooks will be done for every pod, and everytime they are restarted, so initializing your environment with them is risky to say the least.