Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepencies between container-images entrypoint and charts #137

Open
chaen opened this issue Feb 4, 2025 · 0 comments
Open

Discrepencies between container-images entrypoint and charts #137

chaen opened this issue Feb 4, 2025 · 0 comments

Comments

@chaen
Copy link
Contributor

chaen commented Feb 4, 2025

The helm chart generates it's own entrypoint for various reasons, however it still contains what the native docker image is supposed to have

For example:

#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
ulimit -n 8192
eval "$(micromamba shell hook --shell=posix)" && micromamba activate base
{{ if .Values.diracx.pythonModulesToInstall }}
pip install{{ if .Values.developer.offline }} --no-build-isolation{{ end }} {{- range $moduleSpec := .Values.diracx.pythonModulesToInstall }} {{ $moduleSpec | quote }} {{- end }}
{{- end }}
{{ if .Values.developer.mountedPythonModulesToInstall }}
pip install{{ if .Values.developer.offline }} --no-build-isolation{{ end }} {{- range $moduleName := .Values.developer.mountedPythonModulesToInstall }} {{ if $.Values.developer.editableMountedPythonModules }}-e {{- end }}{{ $.Values.developer.sourcePath }}/{{ $moduleName }} {{- end }}
{{- end }}
{{- if and .Values.developer.enabled .Values.developer.enableCoverage }}
SITE_PACKAGES_DIR=$(python -m sysconfig | grep platlib | head -n 1 | cut -d '=' -f 2 | cut -d '"' -f 2)
echo "Enabling coverage using pth file in SITE_PACKAGES_DIR=${SITE_PACKAGES_DIR}"
echo 'import coverage; coverage.process_startup()' > "${SITE_PACKAGES_DIR}/coverage.pth"
export COVERAGE_PROCESS_START=/diracx-coveragerc
{{- end }}
exec "$@"

https://github.com/DIRACGrid/container-images/blob/8f91a60b0da6e20196aecea087fe535e60d6a8d3/base/entrypoint.sh#L1-L66

However, when applying a change in the diracx-container entrypoint, we need to make sure to propagate it to the chart one, and this is cumbersome

(https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant