File tree Expand file tree Collapse file tree 6 files changed +40
-5
lines changed
Expand file tree Collapse file tree 6 files changed +40
-5
lines changed Original file line number Diff line number Diff line change @@ -548,3 +548,20 @@ set -e
548548if [ -f /lagoon/entrypoints.sh ] ; then /lagoon/entrypoints.sh ; fi
549549
550550{{- end }}
551+
552+
553+ {{- define "drupal.cron.api-version" }}
554+ {{- if semverCompare ">=1.21" .Capabilities.KubeVersion.Version }}
555+ batch/v1
556+ {{- else }}
557+ batch/v1beta1
558+ {{- end }}
559+ {{- end }}
560+
561+ {{- define "drupal.autoscaling.api-version" }}
562+ {{- if semverCompare ">=1.23" .Capabilities.KubeVersion.Version }}
563+ autoscaling/v2
564+ {{- else }}
565+ autoscaling/v2beta1
566+ {{- end }}
567+ {{- end }}
Original file line number Diff line number Diff line change 11{{- if .Values.backup.enabled }}
22{{- $db_password := randAlphaNum 20 }}
33{{- $params := dict "db_password" $db_password -}}
4- apiVersion : batch/v1beta1
4+ apiVersion : {{ include "drupal.cron.api-version" $ | trim }}
55kind : CronJob
66metadata :
77 name : {{ .Release.Name }}-backup
Original file line number Diff line number Diff line change @@ -463,7 +463,11 @@ data:
463463 expires 365d;
464464 add_header Cache-Control "public";
465465 ## Set the OS file cache.
466- open_file_cache max=10000 inactive=120s;
466+ {{- if .Values.nginx.open_file_cache.enabled }}
467+ open_file_cache max={{ .Values.nginx.open_file_cache.max }} inactive={{ .Values.nginx.open_file_cache.inactive }};
468+ {{- else }}
469+ open_file_cache off;
470+ {{- end }}
467471 open_file_cache_valid 45s;
468472 open_file_cache_min_uses 2;
469473 open_file_cache_errors off;
@@ -485,7 +489,11 @@ data:
485489 expires 365d;
486490 add_header Cache-Control "public";
487491 ## Set the OS file cache.
488- open_file_cache max=10000 inactive=120s;
492+ {{- if .Values.nginx.open_file_cache.enabled }}
493+ open_file_cache max={{ .Values.nginx.open_file_cache.max }} inactive={{ .Values.nginx.open_file_cache.inactive }};
494+ {{- else }}
495+ open_file_cache off;
496+ {{- end }}
489497 open_file_cache_valid 45s;
490498 open_file_cache_min_uses 2;
491499 open_file_cache_errors off;
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ spec:
148148 - drupal
149149---
150150{{- if .Values.autoscaling.enabled }}
151- apiVersion : autoscaling/v2beta1
151+ apiVersion : {{ include "drupal. autoscaling.api-version" . | trim }}
152152kind : HorizontalPodAutoscaler
153153metadata :
154154 name : {{ .Release.Name }}-drupal
Original file line number Diff line number Diff line change 11{{- if .Values.referenceData.enabled }}
22{{- if eq .Values.referenceData.referenceEnvironment .Values.environmentName }}
3- apiVersion : batch/v1beta1
3+ apiVersion : {{ include "drupal.cron.api-version" . | trim }}
44kind : CronJob
55metadata :
66 name : {{ .Release.Name }}-refdata
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ nginx:
137137 requests :
138138 cpu : 1m
139139 memory : 10M
140+ limits :
141+ cpu : 500m
142+ memory : 250M
140143
141144 # Set of values to enable and use http basic authentication
142145 # It is implemented only for very basic protection (like web crawlers)
@@ -197,6 +200,13 @@ nginx:
197200 # Extra configuration to pass to nginx as a file
198201 extraConfig : |
199202
203+ # Toggle open_files_cache.
204+ # Naming follows https://nginx.org/en/docs/http/ngx_http_core_module.html#open_file_cache directive
205+ open_file_cache :
206+ enabled : true
207+ max : 6000
208+ inactive : 120s
209+
200210# Configuration for everything that runs in php containers.
201211php :
202212 # The docker image to be used. This is typically passed by your CI system using the --set parameter.
You can’t perform that action at this time.
0 commit comments