Skip to content

Commit

Permalink
Added nodeSelector and tolerations to operator helm chart (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsoloviov authored Jan 4, 2024
1 parent 922b88c commit b39cc4d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ When cutting a new release, update the `unreleased` heading to the tag being gen
* [CHANGE] Upgrade to cass-operator v1.16.0
* [ENHANCEMENT] [#693](https://github.com/k8ssandra/k8ssandra-operator/issues/693) Build and publish arm64 images
* [ENHANCEMENT] [#842](https://github.com/k8ssandra/k8ssandra-operator/issues/842) Remove usages of deprecated created-by label
* [ENHANCEMENT] [#1010](https://github.com/k8ssandra/k8ssandra-operator/issues/1010) Add nodeSelector and tolerations parameters to operator helm chart
6 changes: 6 additions & 0 deletions charts/k8ssandra-operator/templates/crd/batch_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,9 @@ spec:
- {{ .Chart.Version }}
- --chartName
- {{ .Chart.Name }}
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/k8ssandra-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ spec:
- mountPath: /tmp/k8s-webhook-server/serving-certs
name: cert
readOnly: true
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{ toYaml .Values.tolerations | nindent 8 }}
{{- end }}
terminationGracePeriodSeconds: 10
volumes:
- configMap:
Expand Down
8 changes: 8 additions & 0 deletions charts/k8ssandra-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ securityContext:
# `requests` and `limits` for `cpu` and `memory` while removing the existing
# `{}`
resources: {}
# -- Node labels for operator pod assignment
## Ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/
##
nodeSelector: {}
# -- Node tolerations for server scheduling to nodes with taints
## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
##
tolerations: []
# -- The cleaner is a pre-delete hook that that ensures objects with finalizers
# get deleted. For example, cass-operator sets a finalizer on the
# CassandraDatacenter. Kubernetes blocks deletion of an object until all of its
Expand Down

0 comments on commit b39cc4d

Please sign in to comment.