Skip to content

Commit 7d6f363

Browse files
committed
feat: add pre-run-hook for entrypoint
1 parent 1edd21c commit 7d6f363

12 files changed

Lines changed: 12 additions & 17 deletions

File tree

diracx/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ type: application
1111
# This is the chart version. This version number should be incremented each time you make changes
1212
# to the chart and its templates, including the app version.
1313
# Versions are expected to follow Semantic Versioning (https://semver.org/)
14-
version: "1.1.2"
14+
version: "1.1.3"
1515

1616
# This is the version number of the application being deployed. This version number should be
1717
# incremented each time you make changes to the application. Versions are not expected to

diracx/templates/diracx/cleanup-authdb/cronjob.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{/* Define common volume mounts for reusability */}}
44
{{- $commonVolumeMounts := list }}
5-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
5+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
66
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
77
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
88
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/deployment-cli.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ spec:
6262
{{- $commonVolumeMounts := list }}
6363
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/cs_store" "name" "cs-store-mount" "readOnly" false) }}
6464
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/ca" "name" "ca-mount" "readOnly" false) }}
65-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
65+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
6666
{{- if .Values.developer.enableCoverage }}
6767
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
6868
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ spec:
7171
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/cs_store" "name" "cs-store-mount" "readOnly" false) }}
7272
{{- end }}
7373
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/keystore" "name" "jwks-mount" "readOnly" false) }}
74-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
74+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
7575
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
7676
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
7777
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/diracx-container-entrypoint.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,12 @@ metadata:
77
"helm.sh/hook-weight": "-3"
88
"helm.sh/resource-policy": keep
99
data:
10-
entrypoint.sh: |
10+
pre-run-hook.sh: |
1111
#!/bin/bash
1212
set -euo pipefail
1313
IFS=$'\n\t'
1414
1515
ulimit -n 8192
16-
if [ -f "/activate.sh" ]; then
17-
source /activate.sh
18-
else
19-
eval "$(micromamba shell hook --shell=posix)" && micromamba activate base
20-
fi
2116
2217
{{ if .Values.diracx.pythonModulesToInstall }}
2318
pip install{{ if .Values.developer.offline }} --no-build-isolation{{ end }} {{- range $moduleSpec := .Values.diracx.pythonModulesToInstall }} {{ $moduleSpec | quote }} {{- end }}

diracx/templates/diracx/init-cs/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{/* Define common volume mounts for reusability */}}
44
{{- $commonVolumeMounts := list }}
55
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/cs_store" "name" "cs-store-mount" "readOnly" false) }}
6-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
6+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
77
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
88
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
99
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/init-keystore/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{/* Define common volume mounts for reusability */}}
44
{{- $commonVolumeMounts := list }}
5-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
5+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
66
{{- if and .Values.developer.enabled .Values.developer.mountedPythonModulesToInstall }}
77
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" .Values.developer.sourcePath "name" "diracx-code-mount" "readOnly" true) }}
88
{{- range $module := .Values.developer.mountedPythonModulesToInstall }}

diracx/templates/diracx/init-os/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
{{/* Define common volume mounts for reusability */}}
55
{{- $commonVolumeMounts := list }}
6-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
6+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
77
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
88
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
99
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/init-sql/job.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{{/* Define common volume mounts for reusability */}}
44
{{- $commonVolumeMounts := list }}
5-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
5+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
66
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
77
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
88
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

diracx/templates/diracx/task-scheduler-statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ spec:
7070
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/cs_store" "name" "cs-store-mount" "readOnly" false) }}
7171
{{- end }}
7272
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/keystore" "name" "jwks-mount" "readOnly" false) }}
73-
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/entrypoint.sh" "name" "container-entrypoint" "subPath" "entrypoint.sh") }}
73+
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/pre-run-hook.sh" "name" "container-entrypoint" "subPath" "pre-run-hook.sh") }}
7474
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
7575
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/diracx-coveragerc" "name" "container-entrypoint" "subPath" "coveragerc") }}
7676
{{- $commonVolumeMounts = append $commonVolumeMounts (dict "mountPath" "/coverage-reports" "name" "coverage-data" "readOnly" false) }}

0 commit comments

Comments
 (0)