mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-11 00:33:40 +00:00
test: render fanout helm tests without dependencies
This commit is contained in:
parent
182c4a6636
commit
95023c8847
2 changed files with 25 additions and 4 deletions
|
|
@ -12,10 +12,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|||
CHART_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
REPO_ROOT="$(cd "${CHART_DIR}/../.." && pwd)"
|
||||
STATIC_CONFIG="${REPO_ROOT}/otel/langfuse-fanout/otelcol.yaml"
|
||||
RENDER_CHART_DIR="$(mktemp -d -t librechat-fanout-chart.XXXXXX)"
|
||||
RENDERED_FILE="$(mktemp -t librechat-fanout-config-render.XXXXXX)"
|
||||
STATIC_SUMMARY="$(mktemp -t librechat-fanout-static-summary.XXXXXX)"
|
||||
HELM_SUMMARY="$(mktemp -t librechat-fanout-helm-summary.XXXXXX)"
|
||||
trap 'rm -f "${RENDERED_FILE}" "${STATIC_SUMMARY}" "${HELM_SUMMARY}"' EXIT
|
||||
trap 'rm -rf "${RENDER_CHART_DIR}"; rm -f "${RENDERED_FILE}" "${STATIC_SUMMARY}" "${HELM_SUMMARY}"' EXIT
|
||||
|
||||
if ! command -v helm >/dev/null 2>&1; then
|
||||
echo "FAIL: helm not on PATH" >&2
|
||||
|
|
@ -27,7 +28,14 @@ if ! command -v node >/dev/null 2>&1; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
helm template librechat "${CHART_DIR}" \
|
||||
mkdir -p "${RENDER_CHART_DIR}/templates"
|
||||
awk '/^dependencies:/{ exit } { print }' "${CHART_DIR}/Chart.yaml" > "${RENDER_CHART_DIR}/Chart.yaml"
|
||||
cp "${CHART_DIR}/values.yaml" "${RENDER_CHART_DIR}/values.yaml"
|
||||
cp "${CHART_DIR}/templates/_helpers.tpl" "${RENDER_CHART_DIR}/templates/_helpers.tpl"
|
||||
cp "${CHART_DIR}/templates/langfuse-fanout-configmap.yaml" \
|
||||
"${RENDER_CHART_DIR}/templates/langfuse-fanout-configmap.yaml"
|
||||
|
||||
helm template librechat "${RENDER_CHART_DIR}" \
|
||||
--set langfuseFanout.enabled=true \
|
||||
--set langfuseFanout.central.authHeaderSecret.name=langfuse-central \
|
||||
--show-only templates/langfuse-fanout-configmap.yaml \
|
||||
|
|
|
|||
|
|
@ -9,15 +9,28 @@ set -euo pipefail
|
|||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CHART_DIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
REPO_ROOT="$(cd "${CHART_DIR}/../.." && pwd)"
|
||||
RENDER_CHART_DIR="$(mktemp -d -t librechat-fanout-chart.XXXXXX)"
|
||||
RENDERED_FILE="$(mktemp -t librechat-fanout-render.XXXXXX)"
|
||||
trap 'rm -f "${RENDERED_FILE}"' EXIT
|
||||
trap 'rm -rf "${RENDER_CHART_DIR}"; rm -f "${RENDERED_FILE}"' EXIT
|
||||
|
||||
if ! command -v helm >/dev/null 2>&1; then
|
||||
echo "FAIL: helm not on PATH" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
helm template librechat "${CHART_DIR}" \
|
||||
mkdir -p "${RENDER_CHART_DIR}/templates"
|
||||
awk '/^dependencies:/{ exit } { print }' "${CHART_DIR}/Chart.yaml" > "${RENDER_CHART_DIR}/Chart.yaml"
|
||||
cp "${CHART_DIR}/values.yaml" "${RENDER_CHART_DIR}/values.yaml"
|
||||
cp "${CHART_DIR}/templates/_helpers.tpl" "${RENDER_CHART_DIR}/templates/_helpers.tpl"
|
||||
cp "${CHART_DIR}/templates/service.yaml" "${RENDER_CHART_DIR}/templates/service.yaml"
|
||||
cp "${CHART_DIR}/templates/langfuse-fanout-service.yaml" \
|
||||
"${RENDER_CHART_DIR}/templates/langfuse-fanout-service.yaml"
|
||||
cp "${CHART_DIR}/templates/langfuse-fanout-deployment.yaml" \
|
||||
"${RENDER_CHART_DIR}/templates/langfuse-fanout-deployment.yaml"
|
||||
cp "${CHART_DIR}/templates/langfuse-fanout-configmap.yaml" \
|
||||
"${RENDER_CHART_DIR}/templates/langfuse-fanout-configmap.yaml"
|
||||
|
||||
helm template librechat "${RENDER_CHART_DIR}" \
|
||||
--set langfuseFanout.enabled=true \
|
||||
--set langfuseFanout.central.authHeaderSecret.name=langfuse-central \
|
||||
--show-only templates/service.yaml \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue