Skip to content

Commit

Permalink
support tolerations and node Selector (#2791)
Browse files Browse the repository at this point in the history
Co-authored-by: Fabio Marinetti <fmarinetti@expert.ai>
  • Loading branch information
fabiomarinetti and Fabio Marinetti committed Apr 30, 2024
1 parent 0204bc1 commit bc2d38f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helm/kanister-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Parameter | Description | Default
`image.tag` | controller container image tag | `0.10.0`
`image.pullPolicy` | controller container image pull policy | `IfNotPresent`
`resources` | k8s pod resources | `None`
`nodeSelector` | node labels for pod assignment. Evaluated as template | `{}` |
`tolerations` | tolerations for pod assignment. Evaluated as a template | `[]` |

Specify each parameter you'd like to override using a YAML file as described above in the [installation](#installing-the-chart) section.

Expand Down
6 changes: 6 additions & 0 deletions helm/kanister-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ spec:
{{ toYaml .Values.resources | indent 12 }}
{{- end }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
10 changes: 10 additions & 0 deletions helm/kanister-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,13 @@ resources:
# requests:
# cpu: 100m
# memory: 128Mi
#
# tolerations for pod assignment. Evaluated as a template
tolerations: []
#- effect: NoSchedule
# key: CriticalAddonsOnly
# operator: Equal
# value: "true"
#
# node labels for pod assignment. Evaluated as template
nodeSelector: {}

0 comments on commit bc2d38f

Please sign in to comment.