Skip to content

Commit

Permalink
Use nodeSelector / antiAffinity / Tolerations on CronJob
Browse files Browse the repository at this point in the history
  • Loading branch information
grieshaber committed Jan 19, 2024
1 parent 91524ff commit ee959de
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
13 changes: 13 additions & 0 deletions charts/cluster-overprovisioner/templates/cpa-cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,18 @@ spec:
defaultMode: 0777
- name: tmp
emptyDir: {}
{{- with $.Values.cpa.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.cpa.affinity }}
affinity:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.cpa.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
{{- end }}

---
{{- end }}
20 changes: 10 additions & 10 deletions charts/cluster-overprovisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ defaultConfig:
# If you want to use the schedule-feature, specify as many schedules as you want.
# Example of a schedule:
# - name: night
# cronTimeExpression: "0 16 * * 1-5" # disable overprovisioning Monday - Friday from 6pm
# timeZone: America/New_York # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# config:
# ladder:
# {
# "nodesToReplicas":
# [
# [0, 0]
# ]
# }
# cronTimeExpression: "0 16 * * 1-5" # disable overprovisioning Monday - Friday from 6pm
# timeZone: America/New_York # https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# config:
# ladder:
# {
# "nodesToReplicas":
# [
# [0, 0]
# ]
# }
schedules: []

0 comments on commit ee959de

Please sign in to comment.