Skip to content

Commit 9dbf93f

Browse files
committed
fix(drupal): gate PreSync cleanup job behind cleanup.enabled flag
The cleanup job uses volumes (PVCs) that don't exist during ArgoCD PreSync phase on first deploy. Add cleanup.enabled (default true for backward compat) and set false in platform base-values for ArgoCD clusters. Also use default SA for cleanup job since custom SA isn't available in PreSync.
1 parent 315cd5c commit 9dbf93f

4 files changed

Lines changed: 15 additions & 2 deletions

File tree

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.34.0
3+
version: 1.34.3
44
dependencies:
55
- name: mariadb
66
version: 7.5.x

drupal/templates/pre-release-cleanup.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.cleanup.enabled }}
12
apiVersion: batch/v1
23
kind: Job
34
metadata:
@@ -28,6 +29,7 @@ spec:
2829
{{- include "drupal.cleanup-job" . | nindent 12 }}
2930
volumeMounts:
3031
{{- include "drupal.volumeMounts" . | nindent 12 }}
31-
serviceAccountName: {{ include "drupal.serviceAccountName" . }}
32+
serviceAccountName: default
3233
volumes:
3334
{{- include "drupal.volumes" . | nindent 8 }}
35+
{{- end }}

drupal/values.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"projectName": { "type": "string" },
77
"environmentName": { "type": "string" },
88
"branchName": { "type": "string" },
9+
"cleanup": {
10+
"type": "object",
11+
"properties": {
12+
"enabled": { "type": "boolean" }
13+
}
14+
},
915
"imagePullSecrets": { "type": "array" },
1016
"imagePullSecret": { "type": "string" },
1117
"serviceAccount": {

drupal/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,3 +1051,8 @@ logging:
10511051
# - projectName (scrambles project name subdomain, e.g., release.yyy.<clusterDomain>)
10521052
# - both (obfuscates both, e.g., zzz.<clusterDomain>)
10531053
maskSubdomains: none
1054+
1055+
# Pre-release cleanup job (runs before sync to clear caches).
1056+
# Disable for ArgoCD deployments where PVCs may not exist during PreSync.
1057+
cleanup:
1058+
enabled: true

0 commit comments

Comments
 (0)