You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/07 22:40:51 UTC

[airflow] branch master updated: Separate nodeSelector logic of chart (#13508)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/master by this push:
     new 8ab964e  Separate nodeSelector logic of chart (#13508)
8ab964e is described below

commit 8ab964eb19301b4ef87fa02815c07701450c1a4e
Author: Jun <Ju...@users.noreply.github.com>
AuthorDate: Fri Jan 8 06:40:37 2021 +0800

    Separate nodeSelector logic of chart (#13508)
---
 chart/README.md                                    |  24 +++++
 chart/templates/cleanup/cleanup-cronjob.yaml       |   9 +-
 chart/templates/create-user-job.yaml               |   9 +-
 chart/templates/flower/flower-deployment.yaml      |   9 +-
 chart/templates/migrate-database-job.yaml          |   9 +-
 .../templates/pgbouncer/pgbouncer-deployment.yaml  |   9 +-
 chart/templates/redis/redis-statefulset.yaml       |   9 +-
 .../templates/scheduler/scheduler-deployment.yaml  |   9 +-
 chart/templates/statsd/statsd-deployment.yaml      |   9 +-
 .../templates/webserver/webserver-deployment.yaml  |   9 +-
 chart/templates/workers/worker-deployment.yaml     |   9 +-
 chart/values.schema.json                           | 120 +++++++++++++++++++++
 chart/values.yaml                                  |  40 +++++++
 13 files changed, 244 insertions(+), 30 deletions(-)

diff --git a/chart/README.md b/chart/README.md
index d0ca12b..83fc64d 100644
--- a/chart/README.md
+++ b/chart/README.md
@@ -237,6 +237,9 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `workers.serviceAccountAnnotations`                   | Annotations to add to worker kubernetes service account                                                      | `{}`                                            |
 | `workers.extraVolumes`                                | Mount additional volumes into worker                                                                         | `[]`                                            |
 | `workers.extraVolumeMounts`                           | Mount additional volumes into worker                                                                         | `[]`                                            |
+| `workers.nodeSelector`                                | Node labels for pod assignment                                                                               | `{}`                                              |
+| `workers.affinity`                                    | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `workers.tolerations`                                 | Toleration labels for pod assignment                                                                         | `[]`                                              |
 | `scheduler.podDisruptionBudget.enabled`               | Enable PDB on Airflow scheduler                                                                              | `false`                                           |
 | `scheduler.podDisruptionBudget.config.maxUnavailable` | MaxUnavailable pods for scheduler                                                                            | `1`                                               |
 | `scheduler.replicas`                                  | # of parallel schedulers (Airflow 2.0 using Mysql 8+ or Postgres only)                                       | `1`                                               |
@@ -249,6 +252,9 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `scheduler.serviceAccountAnnotations`                 | Annotations to add to scheduler kubernetes service account                                                   | `{}`                                            |
 | `scheduler.extraVolumes`                              | Mount additional volumes into scheduler                                                                      | `[]`                                            |
 | `scheduler.extraVolumeMounts`                         | Mount additional volumes into scheduler                                                                      | `[]`                                            |
+| `scheduler.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
+| `scheduler.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `scheduler.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
 | `webserver.livenessProbe.initialDelaySeconds`         | Webserver LivenessProbe initial delay                                                                        | `15`                                              |
 | `webserver.livenessProbe.timeoutSeconds`              | Webserver LivenessProbe timeout seconds                                                                      | `30`                                              |
 | `webserver.livenessProbe.failureThreshold`            | Webserver LivenessProbe failure threshold                                                                    | `20`                                              |
@@ -264,6 +270,24 @@ The following tables lists the configurable parameters of the Airflow chart and
 | `webserver.resources.requests.memory`                 | Memory Request of webserver                                                                                  | `~`                                               |
 | `webserver.service.annotations`                       | Annotations to be added to the webserver service                                                             | `{}`                                              |
 | `webserver.defaultUser`                               | Optional default airflow user information                                                                    | `{}`                                              |
+| `webserver.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
+| `webserver.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `webserver.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `flower.nodeSelector`                                 | Node labels for pod assignment                                                                               | `{}`                                              |
+| `flower.affinity`                                     | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `flower.tolerations`                                  | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `statsd.nodeSelector`                                 | Node labels for pod assignment                                                                               | `{}`                                              |
+| `statsd.affinity`                                     | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `statsd.tolerations`                                  | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `pgbouncer.nodeSelector`                              | Node labels for pod assignment                                                                               | `{}`                                              |
+| `pgbouncer.affinity`                                  | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `pgbouncer.tolerations`                               | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `redis.nodeSelector`                                  | Node labels for pod assignment                                                                               | `{}`                                              |
+| `redis.affinity`                                      | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `redis.tolerations`                                   | Toleration labels for pod assignment                                                                         | `[]`                                              |
+| `cleanup.nodeSelector`                                | Node labels for pod assignment                                                                               | `{}`                                              |
+| `cleanup.affinity`                                    | Affinity labels for pod assignment                                                                           | `{}`                                              |
+| `cleanup.tolerations`                                 | Toleration labels for pod assignment                                                                         | `[]`                                              |
 | `dags.persistence.*`                                  | Dag persistence configuration                                                                                | Please refer to `values.yaml`                     |
 | `dags.gitSync.*`                                      | Git sync configuration                                                                                       | Please refer to `values.yaml`                     |
 | `multiNamespaceMode`                                  | Whether the KubernetesExecutor can launch pods in multiple namespaces                                        | `False`                                           |
diff --git a/chart/templates/cleanup/cleanup-cronjob.yaml b/chart/templates/cleanup/cleanup-cronjob.yaml
index fd253d2..a2b1d0d 100644
--- a/chart/templates/cleanup/cleanup-cronjob.yaml
+++ b/chart/templates/cleanup/cleanup-cronjob.yaml
@@ -19,6 +19,9 @@
 ## Airflow Cleanup Pods CronJob
 #################################
 {{- if .Values.cleanup.enabled }}
+{{- $nodeSelector := or .Values.cleanup.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.cleanup.affinity .Values.affinity }}
+{{- $tolerations := or .Values.cleanup.tolerations .Values.tolerations }}
 apiVersion: batch/v1beta1
 kind: CronJob
 metadata:
@@ -46,11 +49,11 @@ spec:
         spec:
           restartPolicy: Never
           nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 12 }}
+{{ toYaml $nodeSelector | indent 12 }}
           affinity:
-{{ toYaml .Values.affinity | indent 12 }}
+{{ toYaml $affinity | indent 12 }}
           tolerations:
-{{ toYaml .Values.tolerations | indent 12 }}
+{{ toYaml $tolerations | indent 12 }}
           serviceAccountName: {{ .Release.Name }}-cleanup
           {{- if or .Values.registry.secretName .Values.registry.connection }}
           imagePullSecrets:
diff --git a/chart/templates/create-user-job.yaml b/chart/templates/create-user-job.yaml
index c41cc3d..30b6c25 100644
--- a/chart/templates/create-user-job.yaml
+++ b/chart/templates/create-user-job.yaml
@@ -19,6 +19,9 @@
 ## Airflow Create User Job
 #################################
 {{- if .Values.webserver.defaultUser.enabled }}
+{{- $nodeSelector := or .Values.webserver.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.webserver.affinity .Values.affinity }}
+{{- $tolerations := or .Values.webserver.tolerations .Values.tolerations }}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -48,11 +51,11 @@ spec:
           runAsUser: {{ .Values.uid }}
       restartPolicy: OnFailure
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       {{- if or .Values.registry.secretName .Values.registry.connection }}
       imagePullSecrets:
         - name: {{ template "registry_secret" . }}
diff --git a/chart/templates/flower/flower-deployment.yaml b/chart/templates/flower/flower-deployment.yaml
index 01a90b3..0697fdb 100644
--- a/chart/templates/flower/flower-deployment.yaml
+++ b/chart/templates/flower/flower-deployment.yaml
@@ -19,6 +19,9 @@
 ## Airflow Flower Deployment
 #################################
 {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
+{{- $nodeSelector := or .Values.flower.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.flower.affinity .Values.affinity }}
+{{- $tolerations := or .Values.flower.tolerations .Values.tolerations }}
 kind: Deployment
 apiVersion: apps/v1
 metadata:
@@ -52,11 +55,11 @@ spec:
 {{- end }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       restartPolicy: Always
       securityContext:
         runAsUser: {{ .Values.uid }}
diff --git a/chart/templates/migrate-database-job.yaml b/chart/templates/migrate-database-job.yaml
index 6c18bfc..975c46b 100644
--- a/chart/templates/migrate-database-job.yaml
+++ b/chart/templates/migrate-database-job.yaml
@@ -18,6 +18,9 @@
 ################################
 ## Airflow Run Migrations
 #################################
+{{- $nodeSelector := or .Values.webserver.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.webserver.affinity .Values.affinity }}
+{{- $tolerations := or .Values.webserver.tolerations .Values.tolerations }}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -47,11 +50,11 @@ spec:
           runAsUser: {{ .Values.uid }}
       restartPolicy: OnFailure
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       {{- if or .Values.registry.secretName .Values.registry.connection }}
       imagePullSecrets:
         - name: {{ template "registry_secret" . }}
diff --git a/chart/templates/pgbouncer/pgbouncer-deployment.yaml b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
index 18e1b21..c7dd2ea 100644
--- a/chart/templates/pgbouncer/pgbouncer-deployment.yaml
+++ b/chart/templates/pgbouncer/pgbouncer-deployment.yaml
@@ -19,6 +19,9 @@
 ## Airflow Pgbouncer Deployment
 #################################
 {{- if .Values.pgbouncer.enabled }}
+{{- $nodeSelector := or .Values.pgbouncer.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.pgbouncer.affinity .Values.affinity }}
+{{- $tolerations := or .Values.pgbouncer.tolerations .Values.tolerations }}
 kind: Deployment
 apiVersion: apps/v1
 metadata:
@@ -57,11 +60,11 @@ spec:
         checksum/pgbouncer-certificates-secret: {{ include (print $.Template.BasePath "/secrets/pgbouncer-certificates-secret.yaml") . | sha256sum }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       restartPolicy: Always
       {{- if or .Values.registry.secretName .Values.registry.connection }}
       imagePullSecrets:
diff --git a/chart/templates/redis/redis-statefulset.yaml b/chart/templates/redis/redis-statefulset.yaml
index ca47d97..6da1b9c 100644
--- a/chart/templates/redis/redis-statefulset.yaml
+++ b/chart/templates/redis/redis-statefulset.yaml
@@ -19,6 +19,9 @@
 ## Airflow Redis StatefulSet
 #################################
 {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
+{{- $nodeSelector := or .Values.redis.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.redis.affinity .Values.affinity }}
+{{- $tolerations := or .Values.redis.tolerations .Values.tolerations }}
 kind: StatefulSet
 apiVersion: apps/v1
 metadata:
@@ -54,11 +57,11 @@ spec:
       {{- end }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       {{- if or .Values.registry.secretName .Values.registry.connection }}
       imagePullSecrets:
         - name: {{ template "registry_secret" . }}
diff --git a/chart/templates/scheduler/scheduler-deployment.yaml b/chart/templates/scheduler/scheduler-deployment.yaml
index aecc008..c3af09e 100644
--- a/chart/templates/scheduler/scheduler-deployment.yaml
+++ b/chart/templates/scheduler/scheduler-deployment.yaml
@@ -28,6 +28,9 @@
 {{- $stateful := and $local $persistence }}
 # If we're using elasticsearch logging
 {{- $elasticsearch := .Values.elasticsearch.enabled }}
+{{- $nodeSelector := or .Values.scheduler.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.scheduler.affinity .Values.affinity }}
+{{- $tolerations := or .Values.scheduler.tolerations .Values.tolerations }}
 
 kind: {{ if $stateful }}StatefulSet{{ else }}Deployment{{ end }}
 apiVersion: apps/v1
@@ -76,11 +79,11 @@ spec:
         {{- end }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       restartPolicy: Always
       terminationGracePeriodSeconds: 10
       serviceAccountName: {{ .Release.Name }}-scheduler
diff --git a/chart/templates/statsd/statsd-deployment.yaml b/chart/templates/statsd/statsd-deployment.yaml
index d836e81..274ab63 100644
--- a/chart/templates/statsd/statsd-deployment.yaml
+++ b/chart/templates/statsd/statsd-deployment.yaml
@@ -19,6 +19,9 @@
 ## Airflow StatsD Deployment
 #################################
 {{- if .Values.statsd.enabled }}
+{{- $nodeSelector := or .Values.statsd.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.statsd.affinity .Values.affinity }}
+{{- $tolerations := or .Values.statsd.tolerations .Values.tolerations }}
 kind: Deployment
 apiVersion: apps/v1
 metadata:
@@ -50,11 +53,11 @@ spec:
 {{- end }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       restartPolicy: Always
       {{- if or .Values.registry.secretName .Values.registry.connection }}
       imagePullSecrets:
diff --git a/chart/templates/webserver/webserver-deployment.yaml b/chart/templates/webserver/webserver-deployment.yaml
index ffa911c..7674e21 100644
--- a/chart/templates/webserver/webserver-deployment.yaml
+++ b/chart/templates/webserver/webserver-deployment.yaml
@@ -18,6 +18,9 @@
 ################################
 ## Airflow Webserver Deployment
 #################################
+{{- $nodeSelector := or .Values.webserver.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.webserver.affinity .Values.affinity }}
+{{- $tolerations := or .Values.webserver.tolerations .Values.tolerations }}
 kind: Deployment
 apiVersion: apps/v1
 metadata:
@@ -63,11 +66,11 @@ spec:
     spec:
       serviceAccountName: {{ .Release.Name }}-webserver
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       restartPolicy: Always
       securityContext:
         runAsUser: {{ .Values.uid }}
diff --git a/chart/templates/workers/worker-deployment.yaml b/chart/templates/workers/worker-deployment.yaml
index 5eb826a..bd3029a 100644
--- a/chart/templates/workers/worker-deployment.yaml
+++ b/chart/templates/workers/worker-deployment.yaml
@@ -20,6 +20,9 @@
 #################################
 {{- $persistence := .Values.workers.persistence.enabled }}
 {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
+{{- $nodeSelector := or .Values.workers.nodeSelector .Values.nodeSelector }}
+{{- $affinity := or .Values.workers.affinity .Values.affinity }}
+{{- $tolerations := or .Values.workers.tolerations .Values.tolerations }}
 kind: {{ if $persistence }}StatefulSet{{ else }}Deployment{{ end }}
 apiVersion: apps/v1
 metadata:
@@ -67,11 +70,11 @@ spec:
         {{- end }}
     spec:
       nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 8 }}
+{{ toYaml $nodeSelector | indent 8 }}
       affinity:
-{{ toYaml .Values.affinity | indent 8 }}
+{{ toYaml $affinity | indent 8 }}
       tolerations:
-{{ toYaml .Values.tolerations | indent 8 }}
+{{ toYaml $tolerations | indent 8 }}
       terminationGracePeriodSeconds: {{ .Values.workers.terminationGracePeriodSeconds }}
       restartPolicy: Always
       serviceAccountName: {{ .Release.Name }}-worker
diff --git a/chart/values.schema.json b/chart/values.schema.json
index 3248b66..6a4edc7 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -621,6 +621,21 @@
                 "extraVolumeMounts": {
                     "description": "Mount additional volumes into workers.",
                     "type": "array"
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -680,6 +695,21 @@
                 "extraVolumeMounts": {
                     "description": "Mount additional volumes into scheduler.",
                     "type": "array"
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -817,6 +847,21 @@
                 "serviceAccountAnnotations": {
                   "description": "Annotations to add to the webserver kubernetes service account.",
                   "type": "object"
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -863,6 +908,21 @@
                             "type": "string"
                         }
                     }
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -892,6 +952,21 @@
                             "type": "object"
                         }
                     }
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -994,6 +1069,21 @@
                             "type": ["string", "null"]
                         }
                     }
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -1055,6 +1145,21 @@
                 "safeToEvict": {
                     "description": "This setting tells Kubernetes that its ok to evict when it wants to scale a node down.",
                     "type": "boolean"
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
@@ -1157,6 +1262,21 @@
                 "schedule": {
                     "description": "Cleanup schedule.",
                     "type": "string"
+                },
+                "nodeSelector": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object",
+                    "additionalProperties": {
+                        "type": "string"
+                    }
+                },
+                "affinity": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "object"
+                },
+                "tolerations": {
+                    "description": "Select certain nodes for airflow pods.",
+                    "type": "array"
                 }
             }
         },
diff --git a/chart/values.yaml b/chart/values.yaml
index a6b84f3..65b1660 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -349,6 +349,11 @@ workers:
   extraVolumes: []
   extraVolumeMounts: []
 
+  # Select certain nodes for airflow worker pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Airflow scheduler settings
 scheduler:
   # Airflow 2.0 allows users to run multiple schedulers,
@@ -385,6 +390,11 @@ scheduler:
   extraVolumes: []
   extraVolumeMounts: []
 
+  # Select certain nodes for airflow scheduler pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Airflow webserver settings
 webserver:
   allowPodLogReading: true
@@ -449,6 +459,11 @@ webserver:
   # Annotations to add to webserver kubernetes service account.
   serviceAccountAnnotations: {}
 
+  # Select certain nodes for airflow webserver pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Flower settings
 flower:
   # Additional network policies as needed
@@ -471,6 +486,11 @@ flower:
   service:
     type: ClusterIP
 
+  # Select certain nodes for airflow flower pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Statsd settings
 statsd:
   enabled: true
@@ -487,6 +507,11 @@ statsd:
   service:
     extraAnnotations: {}
 
+  # Select certain nodes for statsd pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Pgbouncer settings
 pgbouncer:
   # Enable pgbouncer
@@ -541,6 +566,11 @@ pgbouncer:
     cert: ~
     key: ~
 
+  # Select certain nodes for pgbouncer pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 redis:
   terminationGracePeriodSeconds: 600
 
@@ -572,6 +602,11 @@ redis:
   # when it wants to scale a node down.
   safeToEvict: true
 
+  # Select certain nodes for redis pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Auth secret for a private registry
 # This is used if pulling airflow images from a private registry
 registry:
@@ -624,6 +659,11 @@ cleanup:
   # Run every 15 minutes
   schedule: "*/15 * * * *"
 
+  # Select certain nodes for airflow cleanup pods.
+  nodeSelector: {}
+  affinity: {}
+  tolerations: []
+
 # Configuration for postgresql subchart
 # Not recommended for production
 postgresql: