Skip to content

Commit 6168fbc

Browse files
authored
Merge pull request #509 from wunderio/release/2025-11-04
Release 2025-11-04
2 parents 768263d + 08d16c2 commit 6168fbc

19 files changed

Lines changed: 243 additions & 113 deletions

drupal/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: drupal
3-
version: 1.27.0
3+
version: 1.28.0
44
dependencies:
55
- name: mariadb
66
version: 7.5.x

drupal/templates/_helpers.tpl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ imagePullSecrets:
350350
{{- define "drupal.wait-for-db-command" }}
351351
TIME_WAITING=0
352352
echo "Waiting for database.";
353-
until mysqladmin status --connect-timeout=2 -u $DB_USER -p$DB_PASS -h $DB_HOST -P ${DB_PORT:-3306} --silent; do
353+
until mariadb-admin status --connect-timeout=2 -u $DB_USER -p$DB_PASS -h $DB_HOST -P ${DB_PORT:-3306} --silent; do
354354
echo -n "."
355355
sleep 5
356356
TIME_WAITING=$((TIME_WAITING+5))
@@ -363,7 +363,7 @@ done
363363
{{- end }}
364364

365365
{{- define "drupal.create-db" }}
366-
mysql -u $DB_USER -p$DB_PASS -h $DB_HOST -P ${DB_PORT:-3306} -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;"
366+
mariadb -u $DB_USER -p$DB_PASS -h $DB_HOST -P ${DB_PORT:-3306} -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;"
367367
{{- end }}
368368

369369
{{- define "drupal.wait-for-elasticsearch-command" }}
@@ -490,11 +490,11 @@ if [[ "$(drush status --fields=bootstrap)" = *'Successful'* ]] ; then
490490
/tmp/db.sql \
491491
'/-- Table structure for table/-1' \
492492
'{*}'
493-
# First file is the mysqldump header, rename it to "header"
493+
# First file is the mariadb-dump header, rename it to "header"
494494
mv table-0000 header
495495
# Find last table file
496496
last_table=$(find -type f -name 'table-*' | sort -n | tail -n1)
497-
# Split last table file to extract mysqldump footer, which starts with a line including "@OLD_"
497+
# Split last table file to extract mariadb-dump footer, which starts with a line including "@OLD_"
498498
csplit \
499499
--silent \
500500
--prefix='last-' \
@@ -565,12 +565,12 @@ if [ "${REF_DATA_COPY_DB:-}" == "true" ]; then
565565

566566
if [[ "$import_method" == "parallel" ]]; then
567567
echo "Importing SQL files in parallel. This setting can be changed in silta.yml using the referenceData.databaseImportMethod key."
568-
find "${tmp_ref_data}/" -type f -name "*.sql" | xargs -P10 -I{} sh -c 'echo "Importing {}" && mysql -A --user="${DB_USER}" --password="${DB_PASS}" --host="${DB_HOST}" "${DB_NAME}" < {}'
568+
find "${tmp_ref_data}/" -type f -name "*.sql" | xargs -P10 -I{} sh -c 'echo "Importing {}" && mariadb -A --user="${DB_USER}" --password="${DB_PASS}" --host="${DB_HOST}" "${DB_NAME}" < {}'
569569
pipeline_exit_code=$? # Capture exit code of the pipeline (most likely influenced by xargs)
570570

571571
# Check if xargs reported an error (any non-zero exit status)
572572
if [ "$pipeline_exit_code" -ne 0 ]; then
573-
echo "ERROR: One or more parallel imports failed. Check the logs above for specific mysql errors."
573+
echo "ERROR: One or more parallel imports failed. Check the logs above for specific mariadb errors."
574574
exit 1
575575
fi
576576

@@ -580,8 +580,8 @@ if [ "${REF_DATA_COPY_DB:-}" == "true" ]; then
580580
echo "Importing SQL files sequentially. This setting can be changed in silta.yml using the referenceData.databaseImportMethod key."
581581
find "${tmp_ref_data}/" -type f -name "*.sql" | sort | while IFS= read -r sql_file; do
582582
echo "Importing ${sql_file}"
583-
if ! mysql -A --user="${DB_USER}" --password="${DB_PASS}" --host="${DB_HOST}" "${DB_NAME}" < "${sql_file}"; then
584-
echo "ERROR: Failed to import ${sql_file}. Check the logs above for specific mysql errors."
583+
if ! mariadb -A --user="${DB_USER}" --password="${DB_PASS}" --host="${DB_HOST}" "${DB_NAME}" < "${sql_file}"; then
584+
echo "ERROR: Failed to import ${sql_file}. Check the logs above for specific mariadb errors."
585585
exit 1
586586
fi
587587
done
@@ -658,8 +658,8 @@ fi
658658
659659
# Take a database dump.
660660
echo "Starting database backup."
661-
/usr/bin/mysqldump -u $DB_USER --password=$DB_PASS -h $DB_HOST --skip-lock-tables --single-transaction --max_allowed_packet=1G --quick $IGNORE_TABLES $DB_NAME > /tmp/db.sql
662-
/usr/bin/mysqldump -u $DB_USER --password=$DB_PASS -h $DB_HOST --skip-lock-tables --single-transaction --max_allowed_packet=1G --quick --force --no-data $DB_NAME $IGNORED_TABLES >> /tmp/db.sql
661+
/usr/bin/mariadb-dump -u $DB_USER --password=$DB_PASS -h $DB_HOST --skip-lock-tables --single-transaction --max_allowed_packet=1G --quick $IGNORE_TABLES $DB_NAME > /tmp/db.sql
662+
/usr/bin/mariadb-dump -u $DB_USER --password=$DB_PASS -h $DB_HOST --skip-lock-tables --single-transaction --max_allowed_packet=1G --quick --force --no-data $DB_NAME $IGNORED_TABLES >> /tmp/db.sql
663663
echo "Database backup complete."
664664
{{- end }}
665665
@@ -728,7 +728,7 @@ fi
728728
TIME_WAITING=0
729729
echo "Waiting for database.";
730730
731-
until mysqladmin status --connect-timeout=2 -u $DB_USER -p$DB_PASS -h $DB_HOST --protocol=tcp --silent; do
731+
until mariadb-admin status --connect-timeout=2 -u $DB_USER -p$DB_PASS -h $DB_HOST --protocol=tcp --silent; do
732732
echo -n "."
733733
sleep 1s
734734
TIME_WAITING=$((TIME_WAITING+1))
@@ -740,7 +740,7 @@ fi
740740
done
741741
742742
echo "Importing database dump for validation"
743-
mysql -u $DB_USER -p$DB_PASS $DB_NAME -h $DB_HOST --protocol=tcp --max_allowed_packet=1G < /tmp/db.sql
743+
mariadb -u $DB_USER -p$DB_PASS $DB_NAME -h $DB_HOST --protocol=tcp --max_allowed_packet=1G < /tmp/db.sql
744744
drush status --fields=bootstrap
745745
746746
{{- end }}

drupal/templates/drupal-configmap.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,6 @@ data:
154154
## This value is set to be identical with PHP's post_max_size.
155155
client_max_body_size {{ .Values.php.php_ini.post_max_size }};
156156
client_body_buffer_size 128k;
157-
client_header_buffer_size 4k;
158-
large_client_header_buffers 8 16K;
159157
keepalive_timeout 15 10;
160158
keepalive_requests 100;
161159
reset_timedout_connection on;
@@ -209,6 +207,19 @@ data:
209207
~^/(?<no_slash>.*)$ $no_slash;
210208
}
211209
210+
{{- if .Values.nginx.httpConfig }}
211+
# nginx.httpConfig values
212+
{{- range $k, $v := .Values.nginx.httpConfig }}
213+
{{- if not (eq $v "null") }}
214+
{{- if (contains "\n" $v) }}
215+
{{- printf "%s %s" $k (tpl $v $) | nindent 6 }}
216+
{{- else }}
217+
{{ $k }} {{ tpl $v $ }};
218+
{{- end }}
219+
{{- end }}
220+
{{- end }}
221+
{{- end }}
222+
212223
include conf.d/*.conf;
213224
}
214225

drupal/templates/varnish-configmap-vcl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ data:
434434
return (synth( 403, "Forbidden"));
435435
}
436436
437-
if (req.http.Authorization) {
437+
if (req.http.Authorization || client.ip ~ internal) {
438438
# Not cacheable by default
439439
return (pass);
440440
}

drupal/tests/nginx-extra-config_test.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,29 @@ tests:
6363
path: misc.conf
6464
name: RELEASE-NAME-nginx-extra-conf
6565
name: nginx-extra-conf
66+
- it: httpConfig can be passed
67+
template: drupal-configmap.yaml
68+
set:
69+
nginx.httpConfig:
70+
foo: "0"
71+
bar: "1"
72+
baz: "2"
73+
asserts:
74+
- matchRegex:
75+
path: data.nginx_conf
76+
pattern: "foo 0;"
77+
- matchRegex:
78+
path: data.nginx_conf
79+
pattern: "bar 1;"
80+
- matchRegex:
81+
path: data.nginx_conf
82+
pattern: "baz 2;"
83+
- it: httpConfig appears in http context
84+
template: drupal-configmap.yaml
85+
set:
86+
nginx.httpConfig:
87+
foobar: "123"
88+
asserts:
89+
- matchRegex:
90+
path: data.nginx_conf
91+
pattern: "http \\{[\\s\\S]*foobar 123;[\\s\\S]*include conf\\.d/\\*\\.conf;"

drupal/values.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
"content_security_policy": { "type": "string" },
152152
"loglevel": { "type": "string" },
153153
"comp_level": { "type": "integer" },
154+
"httpConfig": { "type": "object" },
154155
"extraConfig": { "type": "string" },
155156
"locationExtraConfig": { "type": "string" },
156157
"serverExtraConfig": { "type": "string" },

drupal/values.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,15 @@ nginx:
238238
# Extra configuration block in location context.
239239
locationExtraConfig: |
240240
241+
# Note: This will be deprecated in the future, use nginx.httpConfig instead.
241242
# Extra configuration to pass to nginx as a file
242243
extraConfig: |
243244
245+
# Configuration for http context.
246+
httpConfig:
247+
client_header_buffer_size: "4k"
248+
large_client_header_buffers: "8 16K"
249+
244250
# Toggle open_files_cache.
245251
# Naming follows https://nginx.org/en/docs/http/ngx_http_core_module.html#open_file_cache directive
246252
open_file_cache:
@@ -626,7 +632,7 @@ mariadb:
626632
# https://hub.docker.com/r/wunderio/bitnami-mariadb/tags
627633
registry: docker.io
628634
repository: wunderio/bitnami-mariadb
629-
tag: 10.6-debian-12
635+
tag: 11.4-debian-12
630636
replication:
631637
enabled: false
632638
db:

frontend/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: frontend
3-
version: 1.23.0
3+
version: 1.24.0
44
dependencies:
55
- name: mariadb
66
version: 7.10.x

frontend/templates/configmap.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ data:
6969
client_header_timeout 60s;
7070
client_max_body_size 32m;
7171
client_body_buffer_size 16k;
72-
client_header_buffer_size 4k;
73-
large_client_header_buffers 8 16K;
7472
keepalive_timeout 75s;
7573
keepalive_requests 100;
7674
reset_timedout_connection off;
@@ -115,6 +113,19 @@ data:
115113
map $http_x_proxy_auth $proxy_auth { default 0; '{{ .Values.nginx.x_proxy_auth }}' 1; }
116114
{{- end}}
117115
116+
{{- if .Values.nginx.httpConfig }}
117+
# nginx.httpConfig values
118+
{{- range $k, $v := .Values.nginx.httpConfig }}
119+
{{- if not (eq $v "null") }}
120+
{{- if (contains "\n" $v) }}
121+
{{- printf "%s %s" $k (tpl $v $) | nindent 6 }}
122+
{{- else }}
123+
{{ $k }} {{ tpl $v $ }};
124+
{{- end }}
125+
{{- end }}
126+
{{- end }}
127+
{{- end }}
128+
118129
include conf.d/*.conf;
119130
}
120131

frontend/templates/varnish-configmap-vcl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ data:
135135
}
136136
137137
# Do not cache requests with Authorization header
138-
if (req.http.Authorization) {
138+
if (req.http.Authorization || client.ip ~ internal) {
139139
return (pass);
140140
}
141141

0 commit comments

Comments
 (0)