From 03580ec90afa162c166661acf27f351b83565375 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Tue, 10 Dec 2019 15:55:38 -0600 Subject: [PATCH] Elasticsearch: Make node selectors more granular This updates the Elasticsearch chart to make the values keys used for defining node selectors for the various elasticsearch components more granular Change-Id: Ic1ac343b1d6ee48fc7cb456afe4cd9588c4aa13b Signed-off-by: Steve Wilkerson --- elasticsearch/templates/deployment-client.yaml | 2 +- .../monitoring/prometheus/exporter-deployment.yaml | 2 +- elasticsearch/templates/statefulset-data.yaml | 2 +- elasticsearch/templates/statefulset-master.yaml | 2 +- elasticsearch/values.yaml | 11 ++++++++++- 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/elasticsearch/templates/deployment-client.yaml b/elasticsearch/templates/deployment-client.yaml index 9e2bf20e8..2031778ee 100644 --- a/elasticsearch/templates/deployment-client.yaml +++ b/elasticsearch/templates/deployment-client.yaml @@ -54,7 +54,7 @@ spec: affinity: {{ tuple $envAll "elasticsearch" "client" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: - {{ .Values.labels.elasticsearch.node_selector_key }}: {{ .Values.labels.elasticsearch.node_selector_value | quote }} + {{ .Values.labels.client.node_selector_key }}: {{ .Values.labels.client.node_selector_value | quote }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.client.timeout | default "600" }} initContainers: {{ tuple $envAll "elasticsearch_client" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml b/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml index df33178c1..88caad0b0 100644 --- a/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml +++ b/elasticsearch/templates/monitoring/prometheus/exporter-deployment.yaml @@ -44,7 +44,7 @@ spec: {{ dict "envAll" $envAll "application" "exporter" | include "helm-toolkit.snippets.kubernetes_pod_security_context" | indent 6 }} serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.elasticsearch.node_selector_key }}: {{ .Values.labels.elasticsearch.node_selector_value | quote }} + {{ .Values.labels.exporter.node_selector_key }}: {{ .Values.labels.exporter.node_selector_value | quote }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.prometheus_elasticsearch_exporter.timeout | default "30" }} initContainers: {{ tuple $envAll "prometheus_elasticsearch_exporter" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/elasticsearch/templates/statefulset-data.yaml b/elasticsearch/templates/statefulset-data.yaml index 8fcfad60a..6a44d1796 100644 --- a/elasticsearch/templates/statefulset-data.yaml +++ b/elasticsearch/templates/statefulset-data.yaml @@ -56,7 +56,7 @@ spec: affinity: {{ tuple $envAll "elasticsearch" "data" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} nodeSelector: - {{ .Values.labels.elasticsearch.node_selector_key }}: {{ .Values.labels.elasticsearch.node_selector_value | quote }} + {{ .Values.labels.data.node_selector_key }}: {{ .Values.labels.data.node_selector_value | quote }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.data.timeout | default "600" }} initContainers: {{ tuple $envAll "elasticsearch_data" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} diff --git a/elasticsearch/templates/statefulset-master.yaml b/elasticsearch/templates/statefulset-master.yaml index 0a4b2abf5..e2916563f 100644 --- a/elasticsearch/templates/statefulset-master.yaml +++ b/elasticsearch/templates/statefulset-master.yaml @@ -56,7 +56,7 @@ spec: {{ tuple $envAll "elasticsearch" "master" | include "helm-toolkit.snippets.kubernetes_pod_anti_affinity" | indent 8 }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.master.timeout | default "600" }} nodeSelector: - {{ .Values.labels.elasticsearch.node_selector_key }}: {{ .Values.labels.elasticsearch.node_selector_value | quote }} + {{ .Values.labels.master.node_selector_key }}: {{ .Values.labels.master.node_selector_value | quote }} initContainers: {{ tuple $envAll "elasticsearch_master" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} - name: memory-map-increase diff --git a/elasticsearch/values.yaml b/elasticsearch/values.yaml index ab02fcbcf..232a2b990 100644 --- a/elasticsearch/values.yaml +++ b/elasticsearch/values.yaml @@ -40,7 +40,16 @@ images: - image_repo_sync labels: - elasticsearch: + client: + node_selector_key: openstack-control-plane + node_selector_value: enabled + data: + node_selector_key: openstack-control-plane + node_selector_value: enabled + exporter: + node_selector_key: openstack-control-plane + node_selector_value: enabled + master: node_selector_key: openstack-control-plane node_selector_value: enabled job: