diff --git a/charts/opensearch-cluster/templates/opensearch-cluster-cr.yaml b/charts/opensearch-cluster/templates/opensearch-cluster-cr.yaml index dee83035..d1f72e93 100644 --- a/charts/opensearch-cluster/templates/opensearch-cluster-cr.yaml +++ b/charts/opensearch-cluster/templates/opensearch-cluster-cr.yaml @@ -197,6 +197,10 @@ spec: nodeSelector: {{- toYaml $val.nodeSelector | nindent 8 }} {{- end }} + {{- if $val.affinity }} + affinity: + {{- toYaml $val.affinity | nindent 8 }} + {{- end }} {{- if $val.labels }} labels: # Add any extra labels as key-value pairs here {{ toYaml $val.labels | nindent 8 }} @@ -309,4 +313,4 @@ spec: {{- end }} {{- end }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }}