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
548
548
if [ -f /lagoon/entrypoints.sh ] ; then /lagoon/entrypoints.sh ; fi
549
549
550
550
{ {- 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 1
1
{{- if .Values.backup.enabled }}
2
2
{{- $db_password := randAlphaNum 20 }}
3
3
{{- $params := dict "db_password" $db_password -}}
4
- apiVersion : batch/v1beta1
4
+ apiVersion : {{ include "drupal.cron.api-version" $ | trim }}
5
5
kind : CronJob
6
6
metadata :
7
7
name : {{ .Release.Name }}-backup
Original file line number Diff line number Diff line change @@ -463,7 +463,11 @@ data:
463
463
expires 365d;
464
464
add_header Cache-Control "public";
465
465
## 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 }}
467
471
open_file_cache_valid 45s;
468
472
open_file_cache_min_uses 2;
469
473
open_file_cache_errors off;
@@ -485,7 +489,11 @@ data:
485
489
expires 365d;
486
490
add_header Cache-Control "public";
487
491
## 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 }}
489
497
open_file_cache_valid 45s;
490
498
open_file_cache_min_uses 2;
491
499
open_file_cache_errors off;
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ spec:
148
148
- drupal
149
149
---
150
150
{{- if .Values.autoscaling.enabled }}
151
- apiVersion : autoscaling/v2beta1
151
+ apiVersion : {{ include "drupal. autoscaling.api-version" . | trim }}
152
152
kind : HorizontalPodAutoscaler
153
153
metadata :
154
154
name : {{ .Release.Name }}-drupal
Original file line number Diff line number Diff line change 1
1
{{- if .Values.referenceData.enabled }}
2
2
{{- if eq .Values.referenceData.referenceEnvironment .Values.environmentName }}
3
- apiVersion : batch/v1beta1
3
+ apiVersion : {{ include "drupal.cron.api-version" . | trim }}
4
4
kind : CronJob
5
5
metadata :
6
6
name : {{ .Release.Name }}-refdata
Original file line number Diff line number Diff line change @@ -137,6 +137,9 @@ nginx:
137
137
requests :
138
138
cpu : 1m
139
139
memory : 10M
140
+ limits :
141
+ cpu : 500m
142
+ memory : 250M
140
143
141
144
# Set of values to enable and use http basic authentication
142
145
# It is implemented only for very basic protection (like web crawlers)
@@ -197,6 +200,13 @@ nginx:
197
200
# Extra configuration to pass to nginx as a file
198
201
extraConfig : |
199
202
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
+
200
210
# Configuration for everything that runs in php containers.
201
211
php :
202
212
# 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