Skip to content

Commit

Permalink
charts/cluster-warmer add nodeSelector for scheduling (closes #161)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianarsenault committed Jan 30, 2024
1 parent 2a4fb19 commit 4839cce
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/cluster-warmer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 2 additions & 1 deletion charts/cluster-warmer/README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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) |

----------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions charts/cluster-warmer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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" . }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/cluster-warmer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}

0 comments on commit 4839cce

Please sign in to comment.