opensearch-k8s-operator
opensearch-k8s-operator copied to clipboard
Add support for adding 'standard' fields to pods
For our cluster configuration we need a few fields to be present on the Helm chart to use the cluster in an production environment:
- Annotations on pods (mainly for metric collection and sidecar container injection)
- PriorityClass support
Looking at other helm template, this seems like a standard/good practice to add as variables. Could you please consider adding these fields?
Hi @JoostvdB94. Just to clarify:
Do you want to set these fields on the pod of the operator itself or on the pods of the opensearch clusters created by the operator?
And if the opensearch pods would you rather set them in the helm chart so the operator applies them to all clusters and pods created or would you rather set them using the OpensearchCluster
CRD on a per-cluster basis?
Both would be needed in our case. PriorityClass is needed as we want to give operators another priority over the instances that it creates. Labels are needed especially for metric and loggign collection and annotation in our case, so they should be present on the instances especially.
@JoostvdB94 thanks for the clarification. I can see where this would be helpful, so I believe this is something we can add. No idea on a timeline though, so if you want to give it a shot yourself, PRs are always welcome.
Allowing to set labels on the opensearch pods and operator would also be nice.
Allowing to set labels on the opensearch pods and operator would also be nice.
At least for the opensearch pods this is already possible. Via spec.nodePools.[].labels
you can configure additional labels that are added to the pods.
yes, but this only applies to the nodes. We cannot set the label on opensearch dashboard. The labels are not set on the bootstrap or security config pod. also labels are added in the selector so the are inmutable after the creation of the cluster.
also labels are added in the selector so the are inmutable after the creation of the cluster.
There is a PR (#318) to fix the selector so that labels that can change are only added to the STS object itself and the pods and not the selector.
Everything else, yeah, currently not yet possible.