From 4839cce4ce71eb6d62dca728ae599cf0edbf3193 Mon Sep 17 00:00:00 2001 From: ianarsenault Date: Tue, 30 Jan 2024 16:05:08 -0500 Subject: [PATCH] charts/cluster-warmer add nodeSelector for scheduling (closes #161) --- charts/cluster-warmer/Chart.yaml | 2 +- charts/cluster-warmer/README.md | 3 ++- charts/cluster-warmer/templates/deployment.yaml | 4 ++++ charts/cluster-warmer/values.yaml | 3 +++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/charts/cluster-warmer/Chart.yaml b/charts/cluster-warmer/Chart.yaml index 523549f..e3199de 100644 --- a/charts/cluster-warmer/Chart.yaml +++ b/charts/cluster-warmer/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cluster-warmer description: A Helm Chart to deploy pods to force scaling in a node-pool to keep it warm -version: 0.1.0 +version: 0.2.0 icon: https://raw.githubusercontent.com/snowplow-devops/helm-charts/master/docs/logo/snowplow.png home: https://github.com/snowplow-devops/helm-charts sources: diff --git a/charts/cluster-warmer/README.md b/charts/cluster-warmer/README.md index 11efc5a..34b48af 100644 --- a/charts/cluster-warmer/README.md +++ b/charts/cluster-warmer/README.md @@ -1,6 +1,6 @@ # cluster-warmer -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) A Helm Chart to deploy pods to force scaling in a node-pool to keep it warm @@ -26,6 +26,7 @@ A Helm Chart to deploy pods to force scaling in a node-pool to keep it warm | image.pullPolicy | string | `"IfNotPresent"` | The image pullPolicy to use | | image.repository | string | `"registry.k8s.io/pause"` | | | image.tag | string | `"3.9"` | | +| nodeSelector | object | `{}` | nodeSelector configuration | | resources | object | `{}` | Map of resource constraints for the warm pods (should be set to a sufficiently high number to trigger scaling) | ---------------------------------------------- diff --git a/charts/cluster-warmer/templates/deployment.yaml b/charts/cluster-warmer/templates/deployment.yaml index 0f7425f..2dee153 100644 --- a/charts/cluster-warmer/templates/deployment.yaml +++ b/charts/cluster-warmer/templates/deployment.yaml @@ -12,6 +12,10 @@ spec: app: {{ include "app.fullname" . }} spec: priorityClassName: {{ include "app.fullname" . }} + {{- if .Values.nodeSelector }} + nodeSelector: + {{- toYaml .Values.nodeSelector | nindent 8 }} + {{- end }} terminationGracePeriodSeconds: 0 containers: - name: "{{ include "app.fullname" . }}" diff --git a/charts/cluster-warmer/values.yaml b/charts/cluster-warmer/values.yaml index 3dd2cd0..0ceabcc 100644 --- a/charts/cluster-warmer/values.yaml +++ b/charts/cluster-warmer/values.yaml @@ -17,3 +17,6 @@ resources: {} hpa: # -- Number of replicas to setup to manage how many warm nodes are created replicas: 1 + +# -- Node labels for pod assignment. +nodeSelector: {}