opensearch-k8s-operator
opensearch-k8s-operator copied to clipboard
Should allow overriding of pod settings via a pod template
Sometimes it is necessary/helpful to be able to override container settings.
Example: I want to make a custom certificate file available on the machines. This in theory could be done via a secret with 'volumes', and 'volumeMounts' configs. However, this does not appear possible in the current version of the operator.
I propose adding a configuration option: podTemplate which lets you specify a kubernetes pod template.
Something like this: https://github.com/apache/flink-kubernetes-operator/blob/af086601fd0d209540b90368e9883a87e08af98a/docs/content/docs/custom-resource/pod-template.md
Hi @lowell-criteo. It is already possible to add extra configmaps and secrets to the cluster pods via the AdditionalVolumes feature. See the documention: https://github.com/Opster/opensearch-k8s-operator/blob/main/docs/userguide/main.md#additional-volumes Is that in line with what you need?
Note that the current AdditionalVolumes implementation does not support the full range of volume types e.g., CSI driver volumes are not supported. (Mainly because the CRD does not have them in the schema, but I am not sure if some extra code is also needed other than passing the config forward to the pod definition)
Those would be very useful to have for people using https://secrets-store-csi-driver.sigs.k8s.io/ or other special volume types.
Additional volumes should work for my use case, thanks @swoehrl-mw!
I still think custom pod template would be a nice feature to have, (would add a lot of flexibility, and promotes reuse between operator functionality and k8s functionality).
Yes , this is much needed feature for example , we could use a INIT container under pod template to perform some task , may be install a plugin ?.
I still think custom pod template would be a nice feature to have, (would add a lot of flexibility, and promotes reuse between operator functionality and k8s functionality).
I'll mark this issue as a future enhancement. If you want to give it a shot yourself, PRs are always welcome.
We added the option to AdditionalConfig
and AdditionalVolumes
to OpensSearch-Dashboard