<p>I have just started using <a href="https://github.com/bitnami/charts/tree/master/bitnami/elasticsearch" rel="nofollow noreferrer">Bitnami Elasticssearch chart</a> to deploy my elasticsearch cluster on AWS EKS. I have been able to deploy it successfully using the values-production.yaml file.</p>
<p>However, there are two issues that I'd like to address:</p>
<ol>
<li><p>Specify node selector/pod affinity for metrics pod: I see that the <a href="https://github.com/bitnami/charts/blob/master/bitnami/elasticsearch/templates/metrics-deploy.yaml" rel="nofollow noreferrer">templates/metrics-deploy.yaml</a> doesn't handle both, node selector or pod affinity. I want my metrics container to run on one of the Elasticsearch master nodes. Does that mean I have to modify the metrics-deploy.yaml file?</p>
</li>
<li><p>Specify pod affinity for <a href="https://github.com/bitnami/charts/tree/master/bitnami/kibana" rel="nofollow noreferrer">kibana sub-chart</a>: Ideally, kibana pod should be co-located with the coordinating/client node. I thought that would be the default behavior but it isn't so. How do I specify pod affinity for the kibana sub-chart from inside my customized values-production.yaml file (for Elasticsearch). I suppose I can create my own helm chart from bitnami but that sounds like a lot of work for a simple ask.</p>
</li>
</ol>
<p>Thanks.</p>

<ol>
<li>Helm has recently introduced functionality to overwrite un-templated values. It is called <a href="https://helm.sh/docs/topics/advanced/#post-rendering" rel="nofollow noreferrer">post rendering</a> and allows you to integrate third party tools like <a href="https://github.com/kubernetes-sigs/kustomize" rel="nofollow noreferrer">kustomize</a> to overwrite yaml files. An example can be found <a href="https://github.com/thomastaylor312/advanced-helm-demos/tree/master/post-render" rel="nofollow noreferrer">here</a>.</li>
<li>To overwrite templated values from a sub-chart from the command line, simply prefix them with the name of the sub-chart, so in case of the node affinity setting, this would be: <code>--set kibana.affinity</code></li>
</ol>
