Added nodeSelector for celery deployment and migrate job (#1085)
# What this PR does Adds nodeSelector for celery deployment and migrate job ## Which issue(s) this PR fixes Fixes errors while deploying resources in a cluster with Gatekeeper policy ( that restricts deployments without nodeSelector). ## Checklist - [x] Tests updated - [x] Documentation added - [x] `CHANGELOG.md` updated --------- Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com> Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
This commit is contained in:
parent
c1935ef46c
commit
a0da31f745
3 changed files with 14 additions and 0 deletions
|
|
@ -34,6 +34,10 @@ spec:
|
|||
{{- if eq .Values.database.type "postgresql" }}
|
||||
{{- include "oncall.postgresql.wait-for-db" . | indent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.celery.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ spec:
|
|||
serviceAccountName: {{ include "oncall.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- with .Values.migrate.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-migrate
|
||||
securityContext:
|
||||
|
|
|
|||
|
|
@ -67,6 +67,9 @@ celery:
|
|||
initialDelaySeconds: 30
|
||||
periodSeconds: 300
|
||||
timeoutSeconds: 10
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
resources: {}
|
||||
# limits:
|
||||
# cpu: 100m
|
||||
|
|
@ -161,6 +164,9 @@ oncall:
|
|||
# Whether to run django database migrations automatically
|
||||
migrate:
|
||||
enabled: true
|
||||
## Node labels for pod assignment
|
||||
## ref: https://kubernetes.io/docs/user-guide/node-selection/
|
||||
nodeSelector: {}
|
||||
# TTL can be unset by setting ttlSecondsAfterFinished: ""
|
||||
ttlSecondsAfterFinished: 20
|
||||
# use a helm hook to manage the migration job
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue