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 0c51995
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 @@ -54,3 +54,11 @@ spec:
{{- end }}
resources:
{{- toYaml .Values.beat.resources | nindent 12 }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
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 @@ -62,6 +62,14 @@ spec:
mountPath: /app/media
- name: dwh-media
mountPath: /dwh_media
{{- 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
8 changes: 8 additions & 0 deletions charts/backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,14 @@ spec:
mountPath: /app/media
- name: dwh-media
mountPath: /dwh_media
{{- 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/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 0c51995

Please sign in to comment.