Skip to content

Commit

Permalink
Add tolerations and affinity settings
Browse files Browse the repository at this point in the history
  • Loading branch information
bartjkdp committed Jul 4, 2023
1 parent e5980d1 commit 49d149f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/backend/templates/deployment-celery-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ spec:
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: celery-beat
securityContext:
Expand Down
8 changes: 8 additions & 0 deletions charts/backend/templates/deployment-celery-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ spec:
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: celery-worker
securityContext:
Expand Down
8 changes: 8 additions & 0 deletions charts/backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ spec:
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
initContainers:
- name: migrate
securityContext:
Expand Down
4 changes: 4 additions & 0 deletions charts/backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ envVars: []
# name: config-map-name
# key: config-map-key

tolerations: []

affinity: {}

settings:
secretKey: "change-to-something-secret"
allowedHosts: "*"
Expand Down
8 changes: 8 additions & 0 deletions charts/frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ spec:
- name: config
mountPath: /app.json
subPath: "app.json"
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if ne (len .Values.extraVolumeMounts) 0 }}
{{ toYaml .Values.extraVolumeMounts | indent 12 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions charts/frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,7 @@ config: {}

extraVolumes: []
extraVolumeMounts: []

tolerations: []

affinity: {}

0 comments on commit 49d149f

Please sign in to comment.