Skip to content

Commit

Permalink
Merge pull request #17 from RonasIT/feat/worker-tolerations
Browse files Browse the repository at this point in the history
Feat/worker tolerations
  • Loading branch information
eleonov authored Jul 1, 2024
2 parents ce97f8e + 1f4430e commit 2c43ccf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion charts/laravel/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.16.0
description: A Helm chart for Kubernetes to deploy Laravel applications
name: laravel
type: application
version: 2.3.2
version: 2.4.0
dependencies:
- name: postgresql
condition: postgresql.enabled
Expand Down
2 changes: 1 addition & 1 deletion charts/laravel/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# laravel

![Version: 2.3.2](https://img.shields.io/badge/Version-2.3.2-informational?style=flat-square)
![Version: 2.4.0](https://img.shields.io/badge/Version-2.4.0-informational?style=flat-square)

## Installing the Chart

Expand Down
12 changes: 10 additions & 2 deletions charts/laravel/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
{{- toYaml $root.Values.volumeMounts | nindent 14 }}
{{- end }}
resources:
{{ toYaml ( .resources | default $root.Values.cronjobs.resources ) | indent 16 }}
{{ toYaml ( .resources | default $root.Values.cronjobs.resources ) | indent 16 }}
command:
- sh
- -c
Expand All @@ -51,7 +51,15 @@ spec:
{{- toYaml $root.Values.volumes | nindent 12 }}
{{- end }}
nodeSelector:
{{- toYaml $root.Values.nodeSelector | nindent 12 }}
{{- toYaml (.nodeSelector | default $root.Values.cronjobs.nodeSelector | default $root.Values.nodeSelector) | nindent 12 }}
{{- with .affinity | default $root.Values.affinity }}
affinity:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .tolerations | default $root.Values.cronjobs.tolerations | default $root.Values.tolerations }}
tolerations:
{{- toYaml . | nindent 12 }}
{{- end }}
restartPolicy: "{{ .restartPolicy | default $root.Values.cronjobs.restartPolicy }}"
{{- end }}
{{- end }}
10 changes: 9 additions & 1 deletion charts/laravel/templates/workers-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
{{- toYaml $root.Values.volumeMounts | nindent 10 }}
{{- end }}
resources:
{{ toYaml ( .resources | default $root.Values.workers.resources ) | indent 10 }}
{{ toYaml ( .resources | default $root.Values.workers.resources ) | indent 10 }}
command:
- sh
- -c
Expand All @@ -50,5 +50,13 @@ spec:
{{- end }}
nodeSelector:
{{- toYaml (.nodeSelector | default $root.Values.workers.nodeSelector | default $root.Values.nodeSelector) | nindent 8 }}
{{- with .affinity | default $root.Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .tolerations | default $root.Values.workers.tolerations | default $root.Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 2c43ccf

Please sign in to comment.