Skip to content

Commit

Permalink
Merge pull request #166 from shoplineapp/feature/CLDA-80-backburner-c…
Browse files Browse the repository at this point in the history
…hart-add-nodeselector

feat(): add nodeSelector and tolerations for backburner chart
  • Loading branch information
Dose0128 authored Dec 4, 2024
2 parents 3ed81bd + 8c4ad77 commit cdc8848
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backburner/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
description: Helm chart for ruby backburner workers
name: backburner
version: 0.5.1
version: 0.6.0
appVersion: 0.0.1
20 changes: 20 additions & 0 deletions backburner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,25 @@ spec:
{{- if $.Values.global.affinity }}
affinity: {{ toYaml $.Values.global.affinity | nindent 8 }}
{{- end }}
{{- if $.Values.global.nodeSelector }}
nodeSelector:
{{ $.Values.global.nodeSelector.labelName }}: {{ $.Values.global.nodeSelector.labelValue }}
{{- end}}
{{- if $.Values.global.tolerations }}
tolerations:
{{- toYaml $.Values.global.tolerations | nindent 8 }}
{{- end}}
{{- if $.Values.global.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml $.Values.global.topologySpreadConstraints | nindent 8 }}
{{- else }}
topologySpreadConstraints:
- labelSelector:
matchLabels:
app: {{ $.Values.name }}-{{ $resourceName }}
maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: ScheduleAnyway
{{- end}}
---
{{- end }}
18 changes: 18 additions & 0 deletions backburner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,24 @@ global:
envFromSecret:
- name: secret-env
affinity: {}
nodeSelector: {}
# nodeSelector:
# labelName: nodegroup
# labelValue: "nodepool-name"
tolerations: []
# tolerations:
# - key: "nodepool-name"
# operator: "Equal"
# value: "true"
# effect: "NoSchedule"
topologySpreadConstraints: []
# topologySpreadConstraints:
# - labelSelector:
# matchLabels:
# app: app-name
# maxSkew: 1
# topologyKey: topology.kubernetes.io/zone
# whenUnsatisfiable: ScheduleAnyway

workers: []
# - name: custom-jobs
Expand Down

0 comments on commit cdc8848

Please sign in to comment.