From 2651f6e831122699e04fe98987280800c72989ef Mon Sep 17 00:00:00 2001 From: Bryan Strassner Date: Wed, 27 Jun 2018 08:57:43 -0500 Subject: [PATCH] Separate source of node_selector_key and values Provides different fields in the values.yaml to use for the node selector keys/values used in deployments vs jobs. Change-Id: I12d7c6257aea0ac00cd77cd3f6331a2b7380b589 --- charts/shipyard/templates/deployment-airflow-flower.yaml | 2 +- charts/shipyard/templates/deployment-airflow-scheduler.yaml | 2 +- charts/shipyard/templates/deployment-airflow-web.yaml | 2 +- charts/shipyard/templates/deployment-shipyard.yaml | 2 +- charts/shipyard/templates/statefulset-airflow-worker.yaml | 2 +- charts/shipyard/values.yaml | 6 ++++++ 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/charts/shipyard/templates/deployment-airflow-flower.yaml b/charts/shipyard/templates/deployment-airflow-flower.yaml index 283ac59e..faa64b43 100644 --- a/charts/shipyard/templates/deployment-airflow-flower.yaml +++ b/charts/shipyard/templates/deployment-airflow-flower.yaml @@ -37,7 +37,7 @@ spec: spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + {{ .Values.labels.airflow.node_selector_key }}: {{ .Values.labels.airflow.node_selector_value }} restartPolicy: Always terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.airflow.timeout | default "30" }} initContainers: diff --git a/charts/shipyard/templates/deployment-airflow-scheduler.yaml b/charts/shipyard/templates/deployment-airflow-scheduler.yaml index 636dac11..430cb664 100644 --- a/charts/shipyard/templates/deployment-airflow-scheduler.yaml +++ b/charts/shipyard/templates/deployment-airflow-scheduler.yaml @@ -37,7 +37,7 @@ spec: spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + {{ .Values.labels.airflow.node_selector_key }}: {{ .Values.labels.airflow.node_selector_value }} restartPolicy: Always terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.airflow.timeout | default "30" }} initContainers: diff --git a/charts/shipyard/templates/deployment-airflow-web.yaml b/charts/shipyard/templates/deployment-airflow-web.yaml index 2e96587a..20ec52f9 100644 --- a/charts/shipyard/templates/deployment-airflow-web.yaml +++ b/charts/shipyard/templates/deployment-airflow-web.yaml @@ -37,7 +37,7 @@ spec: spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + {{ .Values.labels.airflow.node_selector_key }}: {{ .Values.labels.airflow.node_selector_value }} restartPolicy: Always terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.airflow.timeout | default "30" }} initContainers: diff --git a/charts/shipyard/templates/deployment-shipyard.yaml b/charts/shipyard/templates/deployment-shipyard.yaml index 527e5ca2..f6491591 100644 --- a/charts/shipyard/templates/deployment-shipyard.yaml +++ b/charts/shipyard/templates/deployment-shipyard.yaml @@ -37,7 +37,7 @@ spec: spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + {{ .Values.labels.shipyard.node_selector_key }}: {{ .Values.labels.shipyard.node_selector_value }} terminationGracePeriodSeconds: {{ .Values.pod.lifecycle.termination_grace_period.shipyard.timeout | default "30" }} restartPolicy: Always initContainers: diff --git a/charts/shipyard/templates/statefulset-airflow-worker.yaml b/charts/shipyard/templates/statefulset-airflow-worker.yaml index bfa59e6f..31f9939c 100644 --- a/charts/shipyard/templates/statefulset-airflow-worker.yaml +++ b/charts/shipyard/templates/statefulset-airflow-worker.yaml @@ -74,7 +74,7 @@ spec: spec: serviceAccountName: {{ $serviceAccountName }} nodeSelector: - {{ .Values.labels.job.node_selector_key }}: {{ .Values.labels.job.node_selector_value }} + {{ .Values.labels.airflow.node_selector_key }}: {{ .Values.labels.airflow.node_selector_value }} initContainers: {{ tuple $envAll "airflow_server" list | include "helm-toolkit.snippets.kubernetes_entrypoint_init_container" | indent 8 }} {{- if .Values.prod_environment }} diff --git a/charts/shipyard/values.yaml b/charts/shipyard/values.yaml index 85244fbe..0ed5b875 100644 --- a/charts/shipyard/values.yaml +++ b/charts/shipyard/values.yaml @@ -22,6 +22,12 @@ labels: job: node_selector_key: ucp-control-plane node_selector_value: enabled + shipyard: + node_selector_key: ucp-control-plane + node_selector_value: enabled + airflow: + node_selector_key: ucp-control-plane + node_selector_value: enabled images: tags: