Skip to content

chore: update template & general improvement#456

Open
ThibautChoppy wants to merge 18 commits into
linagora:mainfrom
ThibautChoppy:feat/helm_improvement
Open

chore: update template & general improvement#456
ThibautChoppy wants to merge 18 commits into
linagora:mainfrom
ThibautChoppy:feat/helm_improvement

Conversation

@ThibautChoppy

@ThibautChoppy ThibautChoppy commented Jun 10, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Configurable pod/container securityContexts across components
    • Release-scoped resource naming for env, PVCs, RayCluster, services and secrets
    • Flexible secret management: values, ExternalSecret, or VaultStaticSecret with release-scoped secret name helper
    • Health checks and optional runtimeClass for reranker; indexer UI mounts config JSON volume
    • Enhanced ingress routing (regex + /api route) and proxy env support in env ConfigMap
    • Post-install notes now report secret configuration and HF token warnings
  • Chores

    • Chart bumped to 0.5.0 with metadata/maintainers; images pinned; dependency version ranges tightened

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Upgrades chart to v0.5.0: adds a secret-name helper and multi-provider secret rendering, makes resource names release-scoped, introduces pod/container securityContexts and health probes, tightens dependency ranges, and updates values for Ray, vLLM multi-models, ingress, and reranker wiring.

Changes

OpenRAG Stack Helm Release Update

Layer / File(s) Summary
Chart metadata and dependency constraints
charts/openrag-stack/Chart.yaml
Chart version bumped to 0.5.0; dependency ranges tightened and condition keys plus maintainers, home, and sources added.
Secret name helper and multi-provider template
charts/openrag-stack/templates/_helpers.tpl, charts/openrag-stack/templates/secrets-env.yaml
Adds openrag-stack.secretName helper; secrets-env.yaml renders a Kubernetes Secret, ExternalSecret, or VaultStaticSecret based on env.secretsProvider.type, with .Values.env.existingSecret bypass and validation.
Helm post-install notes and secret-name warnings
charts/openrag-stack/templates/NOTES.txt
NOTES computes env secret name, compares it to vLLM HF_TOKEN default, emits HF_TOKEN mismatch remediation instructions, and displays the configured secrets provider and existing-secret usage.
Values: enablement, Ray, and vLLM multi-model
charts/openrag-stack/values.yaml
Adds enabled: true, Ray image/tag and head/worker resource requests, and expands vLLM to multi-model specs sharing an hfTokenSecretName anchor referenced by embedder/whisper/llm/vlm.
Values: env wiring and secrets controls
charts/openrag-stack/values.yaml
Introduces env.existingSecret and env.secretsProvider, moves POSTGRES_PASSWORD into env.secrets, makes RERANKER_BASE_URL conditional, and updates INDEXERUI_URL and RAY_ADDRESS to use release-scoped service names.
Release-scoped ConfigMap, PVC, and RayCluster naming
charts/openrag-stack/templates/configmap-env.yaml, charts/openrag-stack/templates/pvc.yaml, charts/openrag-stack/templates/raycluster.yaml
ConfigMap and PVC names/claimNames use {{ .Release.Name }}; RayCluster is conditional on .Values.ray.enabled and uses a release-scoped name.
RayCluster head/worker environment, storage, and compute
charts/openrag-stack/templates/raycluster.yaml
Head/worker groups use openrag-stack.secretName for envFrom, template CPU/memory from values, add worker nodeSelector, parameterize init image tag, and use release-scoped PVC claimNames.
Reranker and Indexer UI hardening
charts/openrag-stack/templates/infinity.yaml, charts/openrag-stack/templates/indexer-ui.yaml, charts/openrag-stack/values.yaml
Reranker is rendered only when enabled, supports optional runtimeClassName, adds pod/container securityContexts and health probes, and uses release-scoped env/PVC names; Indexer UI adds securityContexts, an emptyDir config-json mount, and updates Service matchLabels.
OpenRAG Deployment security, envFrom, PVCs, and ingress routing
charts/openrag-stack/templates/openrag.yaml, charts/openrag-stack/templates/ingress.yaml
OpenRAG Deployment adds pod/container securityContexts, switches envFrom to {{ .Release.Name }}-env and helper-resolved secret, updates PVC claimNames to release-scoped names; ingress adds regex annotation and conditional /api path to the release-scoped openrag service and updates default backend.
ConfigMap proxy injection
charts/openrag-stack/templates/configmap-env.yaml
ConfigMap name is release-scoped and optionally injects proxy environment variables when .Values.proxy.enabled is true.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Suggested reviewers

  • Ahmath-Gadji

Poem

🐰 I nibble charts and sew a name anew,
Secrets that swap like carrots in view,
Release-scoped nests for PVC and env,
Security blankets wrapped end-to-end,
A tiny hop—your Helm moves on through.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'chore: update template & general improvement' is vague and generic, using non-descriptive terms that don't convey meaningful information about the substantial changes in this changeset. Revise the title to be more specific about the main change, such as 'chore: parameterize Helm chart for multi-tenant deployments with release-scoped resources' or 'chore: add security contexts and flexible secret management to Helm templates'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (6)
charts/openrag-stack/templates/openrag.yaml (1)

42-46: ⚖️ Poor tradeoff

Consider enabling readOnlyRootFilesystem in the future for additional hardening.

The container security context sets readOnlyRootFilesystem: false, which may be necessary for the application to function. For additional security hardening in the future, consider whether the application could work with a read-only root filesystem and use emptyDir tmpfs volumes for writable paths.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/templates/openrag.yaml` around lines 42 - 46, The
securityContext currently sets readOnlyRootFilesystem: false; evaluate whether
the application components (pods defined in this chart) can operate with
readOnlyRootFilesystem: true and, if so, switch readOnlyRootFilesystem to true
for hardened defaults and add explicit writable tmpfs emptyDir volumes for any
runtime-write paths; update the pod templates where securityContext is defined
(look for securityContext and readOnlyRootFilesystem keys in the chart) to set
readOnlyRootFilesystem: true and add matching emptyDir mounts (medium: "Memory")
for directories the app must write to, validating startup and runtime behavior
before committing the change.
charts/openrag-stack/templates/_helpers.tpl (1)

64-70: 💤 Low value

Consider translating the comment to English for consistency.

The comment on lines 65-66 is in French while all other comments in this file are in English. For maintainability and consistency, consider translating it.

📝 Proposed translation
 {{/*
-Nom du Secret d'environnement, utilisé par tous les consommateurs.
-Si env.existingSecret est renseigné, c'est lui qui est utilisé.
+Environment Secret name, used by all consumers.
+If env.existingSecret is set, it takes precedence.
 */}}
 {{- define "openrag-stack.secretName" -}}
 {{- .Values.env.existingSecret | default (printf "%s-env-secrets" .Release.Name) }}
 {{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/templates/_helpers.tpl` around lines 64 - 70, Translate
the French comment above the Helm helper into English for consistency: replace
the French lines describing the environment Secret with an English equivalent
(e.g., "Name of the environment Secret used by consumers. If
.Values.env.existingSecret is set, it is used.") near the define
"openrag-stack.secretName" so the comment matches the rest of the file.
charts/openrag-stack/templates/secrets-env.yaml (2)

40-40: 💤 Low value

Translate error message to English for consistency.

The error message is in French. For codebase consistency, consider translating to English.

📝 Proposed translation
   {{- else }}
-  {{- fail "externalSecret requiert dataFrom ou data" }}
+  {{- fail "externalSecret requires either dataFrom or data" }}
   {{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/templates/secrets-env.yaml` at line 40, The error
message in the Helm template uses French: the fail call in the template (the
string passed to fail in templates/secrets-env.yaml) should be translated to
English for consistency; update the fail message text (the literal inside the
{{- fail "..." }}) to an English phrase such as "externalSecret requires
dataFrom or data" so the fail invocation message is fully in English while
leaving the fail call and template logic unchanged.

72-74: 💤 Low value

Translate error message to English for consistency.

The error message is in French. For codebase consistency, consider translating to English.

📝 Proposed translation
 {{- else }}
-{{- fail (printf "env.secretsProvider.type invalide : %q (valeurs acceptées : values, externalSecret, vaultStaticSecret)" $type) }}
+{{- fail (printf "Invalid env.secretsProvider.type: %q (accepted values: values, externalSecret, vaultStaticSecret)" $type) }}
 {{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/templates/secrets-env.yaml` around lines 72 - 74, The
fail call currently raises a French error message; update the printf string so
the fail(...) uses an English message and retains the $type interpolation and
accepted values list — e.g. replace "env.secretsProvider.type invalide : %q
(valeurs acceptées : values, externalSecret, vaultStaticSecret)" with an English
equivalent like "invalid env.secretsProvider.type: %q (accepted values: values,
externalSecret, vaultStaticSecret)" so the template's fail(...) and $type
variable usage remain unchanged.
charts/openrag-stack/values.yaml (2)

274-307: 💤 Low value

Consider translating French comments to English for consistency.

The comments in lines 274-276, 278-280, 283, 289-298, and 300 are in French. For codebase consistency, consider translating them to English.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/values.yaml` around lines 274 - 307, Update the in-file
comments in values.yaml so they are all English for consistency: translate the
French comment blocks around existingSecret, the "Secrets provider" section, and
the externalSecret and vaultStaticSecret option descriptions (including lines
describing dataFrom/data and vaultStaticSecret fields like vaultAuthRef, mount,
type, path, refreshAfter, hmacSecretData). Keep the same intent and wording
clarity, preserving original keys and YAML structure (existingSecret,
secretsProvider.type, externalSecret, dataFrom, data, vaultStaticSecret) while
replacing only the comment text.

212-212: 💤 Low value

Consider translating comment to English for consistency.

The inline comment is in French. For consistency with the rest of the codebase, consider translating to English: # Set to "" to disable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/values.yaml` at line 212, The inline comment on the
runtimeClassName setting (runtimeClassName: nvidia) is in French; update it to
English to match the codebase (e.g., change the comment to "# Set to \"\" to
disable") while leaving the key and value unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/openrag-stack/templates/ingress.yaml`:
- Around line 17-23: The ingress regex /api(/|$)(.*) causes the first capture
group to be the delimiter, breaking the rewrite
nginx.ingress.kubernetes.io/rewrite-target: /$1; change the path to use a
non-capturing delimiter so the suffix becomes capture group 1 (e.g.
/api(?:/|$)(.*)) and keep the rewrite-target as /$1 to correctly map the API
suffix to the backend; update the path value where it is defined in the ingress
template.

In `@charts/openrag-stack/values.schema.json`:
- Line 4: The schema currently marks "persistence" as required which forces
persistence.storageClass even when persistence is intentionally disabled; update
charts/openrag-stack/values.schema.json so persistence is optional (remove
"persistence" from the top-level "required" array) and instead make
persistence.storageClass conditional by not requiring it unconditionally—ensure
the persistence block can be omitted when .Values.persistence.enabled is false
to match templates/pvc.yaml's {{- if .Values.persistence.enabled }} guard; keep
"openrag" required since templates/openrag.yaml and templates/ingress.yaml
access .Values.openrag.* without an .enabled gate.

---

Nitpick comments:
In `@charts/openrag-stack/templates/_helpers.tpl`:
- Around line 64-70: Translate the French comment above the Helm helper into
English for consistency: replace the French lines describing the environment
Secret with an English equivalent (e.g., "Name of the environment Secret used by
consumers. If .Values.env.existingSecret is set, it is used.") near the define
"openrag-stack.secretName" so the comment matches the rest of the file.

In `@charts/openrag-stack/templates/openrag.yaml`:
- Around line 42-46: The securityContext currently sets readOnlyRootFilesystem:
false; evaluate whether the application components (pods defined in this chart)
can operate with readOnlyRootFilesystem: true and, if so, switch
readOnlyRootFilesystem to true for hardened defaults and add explicit writable
tmpfs emptyDir volumes for any runtime-write paths; update the pod templates
where securityContext is defined (look for securityContext and
readOnlyRootFilesystem keys in the chart) to set readOnlyRootFilesystem: true
and add matching emptyDir mounts (medium: "Memory") for directories the app must
write to, validating startup and runtime behavior before committing the change.

In `@charts/openrag-stack/templates/secrets-env.yaml`:
- Line 40: The error message in the Helm template uses French: the fail call in
the template (the string passed to fail in templates/secrets-env.yaml) should be
translated to English for consistency; update the fail message text (the literal
inside the {{- fail "..." }}) to an English phrase such as "externalSecret
requires dataFrom or data" so the fail invocation message is fully in English
while leaving the fail call and template logic unchanged.
- Around line 72-74: The fail call currently raises a French error message;
update the printf string so the fail(...) uses an English message and retains
the $type interpolation and accepted values list — e.g. replace
"env.secretsProvider.type invalide : %q (valeurs acceptées : values,
externalSecret, vaultStaticSecret)" with an English equivalent like "invalid
env.secretsProvider.type: %q (accepted values: values, externalSecret,
vaultStaticSecret)" so the template's fail(...) and $type variable usage remain
unchanged.

In `@charts/openrag-stack/values.yaml`:
- Around line 274-307: Update the in-file comments in values.yaml so they are
all English for consistency: translate the French comment blocks around
existingSecret, the "Secrets provider" section, and the externalSecret and
vaultStaticSecret option descriptions (including lines describing dataFrom/data
and vaultStaticSecret fields like vaultAuthRef, mount, type, path, refreshAfter,
hmacSecretData). Keep the same intent and wording clarity, preserving original
keys and YAML structure (existingSecret, secretsProvider.type, externalSecret,
dataFrom, data, vaultStaticSecret) while replacing only the comment text.
- Line 212: The inline comment on the runtimeClassName setting
(runtimeClassName: nvidia) is in French; update it to English to match the
codebase (e.g., change the comment to "# Set to \"\" to disable") while leaving
the key and value unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5bc4bd1-ea05-42a4-b969-7577d74f118f

📥 Commits

Reviewing files that changed from the base of the PR and between 67faa64 and 7ee8d17.

⛔ Files ignored due to path filters (1)
  • charts/openrag-stack/Chart.lock is excluded by !**/*.lock
📒 Files selected for processing (11)
  • charts/openrag-stack/Chart.yaml
  • charts/openrag-stack/templates/_helpers.tpl
  • charts/openrag-stack/templates/indexer-ui.yaml
  • charts/openrag-stack/templates/infinity.yaml
  • charts/openrag-stack/templates/ingress.yaml
  • charts/openrag-stack/templates/openrag.yaml
  • charts/openrag-stack/templates/pvc.yaml
  • charts/openrag-stack/templates/raycluster.yaml
  • charts/openrag-stack/templates/secrets-env.yaml
  • charts/openrag-stack/values.schema.json
  • charts/openrag-stack/values.yaml

Comment thread charts/openrag-stack/templates/ingress.yaml Outdated
Comment thread charts/openrag-stack/values.schema.json Outdated
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["persistence", "openrag"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify persistence and openrag usage patterns in templates

# Check if persistence is conditionally rendered
echo "=== Checking persistence conditional usage ==="
rg -n "\.Values\.persistence\.enabled" charts/openrag-stack/templates/

# Check if openrag can be disabled
echo -e "\n=== Checking if openrag can be disabled ==="
rg -n "\.Values\.openrag\.enabled" charts/openrag-stack/templates/

# Check default values
echo -e "\n=== Checking default values ==="
rg -n "^persistence:" charts/openrag-stack/values.yaml -A 2
rg -n "^openrag:" charts/openrag-stack/values.yaml -A 2

Repository: linagora/openrag

Length of output: 404


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Find any openrag conditional rendering in templates ==="
rg -n "if\s+.*\.Values\.openrag|\.Values\.openrag\." charts/openrag-stack/templates/

echo -e "\n=== Check values.yaml for openrag.enabled / enabled under openrag ==="
rg -n "^\s*openrag:|^\s*enabled:" charts/openrag-stack/values.yaml -n -C 2

echo -e "\n=== Inspect values.schema.json required blocks for openrag/persistence ==="
rg -n "\"required\"\s*:\s*\[\"persistence\"\s*,\s*\"openrag\"|\"required\"\s*:" charts/openrag-stack/values.schema.json -n -C 2

echo -e "\n=== Find openrag properties (and any enabled) in values.schema.json ==="
rg -n "\"openrag\"|\"enabled\"" charts/openrag-stack/values.schema.json -n -C 2

Repository: linagora/openrag

Length of output: 3720


🏁 Script executed:

#!/bin/bash
set -euo pipefail

FILE="charts/openrag-stack/values.schema.json"

echo "=== Extract persistence block (around required/properties/enabled) ==="
python3 - <<'PY'
import json,sys
path="charts/openrag-stack/values.schema.json"
with open(path) as f:
    data=json.load(f)
p=data.get("properties",{}).get("persistence",{})
print("persistence keys:", sorted(p.keys()))
print("persistence.required:", p.get("required"))
print("persistence.properties keys:", sorted((p.get("properties") or {}).keys()))
print("persistence.properties.enabled:", (p.get("properties") or {}).get("enabled"))
PY

echo -e "\n=== Extract openrag required/properties (and whether enabled exists) ==="
python3 - <<'PY'
import json,sys
path="charts/openrag-stack/values.schema.json"
with open(path) as f:
    data=json.load(f)
o=data.get("properties",{}).get("openrag",{})
print("openrag keys:", sorted(o.keys()))
print("openrag.required:", o.get("required"))
print("openrag.properties keys:", sorted((o.get("properties") or {}).keys()))
print("openrag.properties.enabled:", (o.get("properties") or {}).get("enabled"))
PY

Repository: linagora/openrag

Length of output: 511


🏁 Script executed:

#!/bin/bash
set -euo pipefail
rg -n "\.Values\.persistence\.storageClass" charts/openrag-stack/templates/

Repository: linagora/openrag

Length of output: 570


Fix schema “required” for persistence to match conditional template rendering

  • charts/openrag-stack/templates/pvc.yaml only renders PVCs when {{- if .Values.persistence.enabled }}, but charts/openrag-stack/values.schema.json requires persistence.storageClass unconditionally (persistence.required: ["storageClass"]). This can reject valid values where persistence.enabled=false (and storageClass is intentionally omitted).
  • openrag has no .enabled gate in templates (e.g., templates/openrag.yaml and templates/ingress.yaml reference .Values.openrag.* directly), so making top-level openrag required is consistent.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/values.schema.json` at line 4, The schema currently
marks "persistence" as required which forces persistence.storageClass even when
persistence is intentionally disabled; update
charts/openrag-stack/values.schema.json so persistence is optional (remove
"persistence" from the top-level "required" array) and instead make
persistence.storageClass conditional by not requiring it unconditionally—ensure
the persistence block can be omitted when .Values.persistence.enabled is false
to match templates/pvc.yaml's {{- if .Values.persistence.enabled }} guard; keep
"openrag" required since templates/openrag.yaml and templates/ingress.yaml
access .Values.openrag.* without an .enabled gate.

@bastiansmn

Copy link
Copy Markdown

+1

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/openrag-stack/values.yaml`:
- Around line 90-97: The values.yaml currently hardcodes hfTokenSecretName:
&vllmHfTokenSecretName "rag-env-secrets", which couples secret lookup to a
release named "rag" and breaks deployments with other release names; change the
chart to accept a configurable top-level value and propagate it to the vLLM
subchart instead of a literal: introduce a chart-level value (hfTokenSecretName)
used by vllm.servingEngineSpec.modelSpec[*].hf_token.secretName (or reference
via global values) so users can override once (or inherit from .Release.Name by
default), and update the README to document overriding hfTokenSecretName when
the release name differs from "rag".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cec35ef7-083a-42b7-a785-33227aaef471

📥 Commits

Reviewing files that changed from the base of the PR and between e430262 and a530fb0.

📒 Files selected for processing (6)
  • charts/openrag-stack/templates/NOTES.txt
  • charts/openrag-stack/templates/_helpers.tpl
  • charts/openrag-stack/templates/indexer-ui.yaml
  • charts/openrag-stack/templates/infinity.yaml
  • charts/openrag-stack/templates/openrag.yaml
  • charts/openrag-stack/values.yaml
🚧 Files skipped from review as they are similar to previous changes (5)
  • charts/openrag-stack/templates/_helpers.tpl
  • charts/openrag-stack/templates/NOTES.txt
  • charts/openrag-stack/templates/indexer-ui.yaml
  • charts/openrag-stack/templates/infinity.yaml
  • charts/openrag-stack/templates/openrag.yaml

Comment thread charts/openrag-stack/values.yaml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/openrag-stack/templates/configmap-env.yaml`:
- Around line 9-16: The template sets proxy env vars when .Values.proxy.enabled
is true but doesn't validate .Values.proxy.url; update
charts/openrag-stack/templates/configmap-env.yaml to add a conditional check
that .Values.proxy.url is non-empty and not the placeholder before emitting
HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy, and similarly ensure
.Values.proxy.noProxy is validated before NO_PROXY/no_proxy is emitted; if the
URL is missing or placeholder, fail Helm rendering with a clear error (use
helm's required or fail functions) or skip injecting the proxy vars and
log/describe the validation failure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e1c77bd9-d2eb-4d8c-81b7-fc165de6b6a9

📥 Commits

Reviewing files that changed from the base of the PR and between 31b218f and e665be4.

📒 Files selected for processing (3)
  • charts/openrag-stack/templates/configmap-env.yaml
  • charts/openrag-stack/templates/openrag.yaml
  • charts/openrag-stack/values.yaml
🚧 Files skipped from review as they are similar to previous changes (2)
  • charts/openrag-stack/templates/openrag.yaml
  • charts/openrag-stack/values.yaml

Comment on lines +9 to +16
{{- if .Values.proxy.enabled }}
HTTP_PROXY: {{ .Values.proxy.url | quote }}
HTTPS_PROXY: {{ .Values.proxy.url | quote }}
http_proxy: {{ .Values.proxy.url | quote }}
https_proxy: {{ .Values.proxy.url | quote }}
NO_PROXY: {{ .Values.proxy.noProxy | quote }}
no_proxy: {{ .Values.proxy.noProxy | quote }}
{{- end }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win

Add validation that proxy.url is set when proxy is enabled.

The template injects proxy environment variables when .Values.proxy.enabled is true, but doesn't validate that .Values.proxy.url contains a valid value. If a user enables the proxy but forgets to customize the URL from the placeholder default (http://192.168.100.100:80) or sets it to an empty string, all workloads consuming this ConfigMap will have broken proxy configuration, preventing external connectivity.

🛡️ Add a validation check
 {{- if .Values.proxy.enabled }}
+{{- if not .Values.proxy.url }}
+{{- fail "proxy.url must be set when proxy.enabled is true" }}
+{{- end }}
   HTTP_PROXY: {{ .Values.proxy.url | quote }}
   HTTPS_PROXY: {{ .Values.proxy.url | quote }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- if .Values.proxy.enabled }}
HTTP_PROXY: {{ .Values.proxy.url | quote }}
HTTPS_PROXY: {{ .Values.proxy.url | quote }}
http_proxy: {{ .Values.proxy.url | quote }}
https_proxy: {{ .Values.proxy.url | quote }}
NO_PROXY: {{ .Values.proxy.noProxy | quote }}
no_proxy: {{ .Values.proxy.noProxy | quote }}
{{- end }}
{{- if .Values.proxy.enabled }}
{{- if not .Values.proxy.url }}
{{- fail "proxy.url must be set when proxy.enabled is true" }}
{{- end }}
HTTP_PROXY: {{ .Values.proxy.url | quote }}
HTTPS_PROXY: {{ .Values.proxy.url | quote }}
http_proxy: {{ .Values.proxy.url | quote }}
https_proxy: {{ .Values.proxy.url | quote }}
NO_PROXY: {{ .Values.proxy.noProxy | quote }}
no_proxy: {{ .Values.proxy.noProxy | quote }}
{{- end }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/openrag-stack/templates/configmap-env.yaml` around lines 9 - 16, The
template sets proxy env vars when .Values.proxy.enabled is true but doesn't
validate .Values.proxy.url; update
charts/openrag-stack/templates/configmap-env.yaml to add a conditional check
that .Values.proxy.url is non-empty and not the placeholder before emitting
HTTP_PROXY/HTTPS_PROXY/http_proxy/https_proxy, and similarly ensure
.Values.proxy.noProxy is validated before NO_PROXY/no_proxy is emitted; if the
URL is missing or placeholder, fail Helm rendering with a clear error (use
helm's required or fail functions) or skip injecting the proxy vars and
log/describe the validation failure.

ThibautChoppy and others added 2 commits June 15, 2026 16:37
Sync with current stream
- Configurable probes (exec ou httpGet) via values, avec support du mode Ray Serve
- Support TLS et annotations configurables dans l'ingress
- SecurityContext pour openrag, reranker et indexer-ui
- Proxy HTTP sortant optionnel
- Secrets provider configurable (values, ExternalSecret, VaultStaticSecret)
- Réranker optionnel avec URL externe
- Champs kuberay.enabled et ray.enabled pour désactiver les composants
- Paramètres vllm et reranker externalisés hors des ancres YAML
- Corrections indentation, pathType ingress, SC raycluster/indexer
- Ajout NOTES.txt, extra-objects.yaml, networkpolicy.yaml
- values-linagora.yaml pour les overrides spécifiques Linagora

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ThibautChoppy ThibautChoppy force-pushed the feat/helm_improvement branch from 2cc9113 to 8db61c9 Compare June 15, 2026 14:51
ThibautChoppy and others added 7 commits June 15, 2026 16:55
- Configurable probes (exec ou httpGet) via values, avec support du mode Ray Serve
- Support TLS et annotations configurables dans l'ingress
- SecurityContext pour openrag, reranker et indexer-ui
- Proxy HTTP sortant optionnel
- Secrets provider configurable (values, ExternalSecret, VaultStaticSecret)
- Réranker optionnel avec URL externe
- Champs kuberay.enabled et ray.enabled pour désactiver les composants
- Paramètres vllm et reranker externalisés hors des ancres YAML
- Corrections indentation, pathType ingress, SC raycluster/indexer
- Ajout NOTES.txt, extra-objects.yaml, networkpolicy.yaml
- values-linagora.yaml pour les overrides spécifiques Linagora

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sync with current stream
Sync with current stream

@EnjoyBacon7 EnjoyBacon7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. A few issues I picked up:

{{- if .Values.ingress.paths.openrag.enabled }}
- path: /(.*)
pathType: ImplementationSpecific
pathType: Prefix

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ingress does not route anything with default values.

With the default values there are no ingress annotations and pathType is set to Prefix, but the path is /(.*). Prefix matching does not understand regex, so it looks for a request path that literally starts with /(.*). Normal requests like /v1/chat/completions will not match and traffic goes nowhere. It only works once you add the nginx use-regex and rewrite-target annotations, and right now only values-linagora.yaml has those. Either set pathType: ImplementationSpecific back for this regex path, or put the working nginx annotations in the default values.yaml.

Comment thread charts/openrag-stack/values.yaml Outdated
RERANKER_ENABLED: "true"
RERANKER_TOP_K: "4"
RERANKER_BASE_URL: "http://{{ .Release.Name }}-reranker:{{ .Values.reranker.servicePort }}"
RERANKER_BASE_URL: '{{ if .Values.reranker.externalUrl }}{{ .Values.reranker.externalUrl }}{{ else }}http://{{ .Release.Name }}-reranker:{{ .Values.reranker.servicePort }}{{ end }}'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the reranker leaves the app pointing at it.

When reranker.enabled is false and externalUrl is empty, the reranker Deployment is not created, but the config still sets RERANKER_ENABLED to true and RERANKER_BASE_URL to the in-cluster reranker service. The app will keep calling a service that does not exist. Please tie RERANKER_ENABLED and RERANKER_BASE_URL to reranker.enabled and externalUrl, so turning the reranker off actually turns it off.

# values.yaml is not templated, so set this manually when your release is not named "rag":
# --set "vllm.servingEngineSpec.modelSpec[0].hf_token.secretName=<release>-env-secrets"
# (repeat for indices 1, 2, 3 — see NOTES after install for the exact commands)
hfTokenSecretName: &vllmHfTokenSecretName "rag-env-secrets"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vLLM looks for the wrong secret name unless the release is called "rag".

hfTokenSecretName is fixed to rag-env-secrets, but the chart now names its secret <release>-env-secrets. So if the release is not called rag, the vLLM pods look for a secret that is not there and cannot read HF_TOKEN. The same hardcoded rag-env-secrets shows up four times in values-linagora.yaml. The post-install NOTES warn about this, but it is easy to miss. At minimum the comment should make clear you must change this to match your release name.

serviceAccountName: ""
podSecurityContext: {}
nodeSelector: {}
resources: {} # e.g. limits: {"nvidia.com/gpu": 1}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ray block sets resources twice.

Line 40 has resources: {} with the GPU example comment, and a few lines down there is the real resources with head and worker. YAML keeps only the last one, so this line and its comment do nothing, and stricter linters will fail on the repeated key. Please remove this empty resources: {}.

- kind: Deployment
name: {{ .Release.Name }}-openrag
- kind: Deployment
name: {{ .Release.Name }}-reranker

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vault restart target points at a reranker that may not exist.

The indexer-ui restart target below is wrapped in if .Values.indexerUi.enabled, but this reranker target is not. When reranker.enabled is false this still lists <release>-reranker, a Deployment that was never created, and the Vault operator will try to restart something that is not there. Please wrap this reranker target in if .Values.reranker.enabled the same way.

env:
# Name of an existing K8s Secret to use as-is.
# When set, the chart creates no Secret/ExternalSecret/VaultStaticSecret resource.
existingSecret: ""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App and database passwords can drift apart with external secrets.

When you use externalSecret, vaultStaticSecret, or set existingSecret, the chart stops creating the env secret, so the app gets POSTGRES_PASSWORD from your external source. But the Postgres server is still started from postgresql.auth.password. The two values are no longer the same, so the app cannot log in to the database. Please document that in these modes you also have to point Postgres at the same secret (postgresql.auth.existingSecret) or set postgresql.auth.password to match.


{{- else if eq $type "externalSecret" }}
---
apiVersion: external-secrets.io/v1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

External Secrets API version.

This ExternalSecret uses external-secrets.io/v1. That version only exists in newer External Secrets Operator releases (0.14 and up). On older installs only v1beta1 is served and the apply will fail. Worth noting a minimum operator version in the docs.

@Ahmath-Gadji Ahmath-Gadji left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a full pass over the chart changes. The move to release-scoped naming and configurable securityContexts is a good direction. My main concern is that the rename from the hardcoded rag- prefix to the fullname helper is only half-applied in a few places, which breaks things for any release not named rag, plus a couple of ingress/secret wiring issues. Notes inline, grouped roughly by impact.

Likely blockers:

  • Ray worker PVC names still use .Release.Name, so workers can't find their PVCs and stay Pending
  • Ray ingress points at the unauthenticated dashboard port (8265) and is enabled by default
  • openrag and ray ingresses are both default-on with the same host and path
  • vLLM hf_token secret name hardcoded to rag-env-secrets
  • dead top-level ingress: block in values-linagora.yaml
  • reranker.externalUrl is documented but not implemented
  • PVCs lost the resource-policy: keep annotation, so uninstall now deletes the data
  • GPU resource request dropped from the Ray cluster

Smaller items and nits are inline too. Happy to help with any of these.

- name: model-weights
persistentVolumeClaim:
claimName: rag-model-weights
claimName: {{ $.Release.Name }}-model-weights

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These worker PVC claim names use {{ $.Release.Name }}, but the PVCs themselves and the head group just above both use the fullname helper. So for a release named rag, these resolve to rag-model-weights while the actual PVC is rag-openrag-stack-model-weights, and the workers can't mount it (they stay stuck Pending). Looks like the rename landed everywhere except these four. Could we switch them to {{ include "openrag-stack.fullname" $ }}-... so they match the head group?

service:
name: {{ include "openrag-stack.fullname" . }}-raycluster-head-svc
port:
number: {{ .Values.env.config.RAY_DASHBOARD_PORT }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up, this points the ingress at the Ray dashboard port (8265), which has no auth and lets anyone submit jobs (effectively RCE on the cluster). The old ingress routed to the Serve port, not the dashboard. Since ray.ingress.enabled defaults to true, this would publish the dashboard on any cluster where the NetworkPolicy isn't enforced. Can we default ray.ingress.enabled to false and avoid exposing 8265 here?

cpu: "4"
memory: "8Gi"
ingress:
enabled: true

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With both openrag.ingress and ray.ingress defaulting to enabled, and both using host: "" and path: /, they'll collide on the same host and path on a single ingress controller. Might be worth defaulting one of them off, or requiring a host before they render.

# values.yaml is not templated, so set this manually when your release is not named "rag":
# --set "vllm.servingEngineSpec.modelSpec[0].hf_token.secretName=<release>-env-secrets"
# (repeat for indices 1, 2, 3 — see NOTES after install for the exact commands)
hfTokenSecretName: &vllmHfTokenSecretName "rag-env-secrets"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that the env secret is named per release (<release>-env-secrets), this hardcoded rag-env-secrets only matches when the release is literally named rag. For any other name the vLLM pods can't find the HF token secret and gated model pulls fail. It used to work for any release name before the secret got renamed. The NOTES output already detects this and prints a workaround, but it would be nicer to wire the real secret name in here so it just works. Could we template it from the release name?

operator: In
values: ["vlm"]

ingress:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this top-level ingress: block is read anywhere anymore. The chart moved to per-service keys (openrag.ingress.* and friends), so the nginx class, the rewrite, and the 500m body-size limit here are silently ignored. Looks like it needs to move under openrag.ingress.{className,annotations}. Worth dropping the /$1 rewrite too, since the routes now use path: / with no capture group.

{{ $key }}: "{{ tpl (printf "%v" $value) $ }}"
{{- end }}
{{- if .Values.proxy.enabled }}
HTTP_PROXY: {{ .Values.proxy.url | quote }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: if the proxy URL ever includes credentials, they'd end up in this plaintext ConfigMap. And if someone also sets HTTP_PROXY in env.config, you'd get a duplicate key in the same ConfigMap. Fine for the default, just flagging it.

# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
version: 0.5.0

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: while bumping the chart version here, it would be a good moment to bump appVersion too. It's still 1.1.3 while the default images are on v1.1.12.

vLLM serving pods will fail to mount HF_TOKEN unless you override the four
hf_token.secretName entries. Re-run the install/upgrade with:

helm upgrade {{ .Release.Name }} ./openrag-stack --reuse-values \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this hardcodes ./openrag-stack as the chart path, which won't be right for anyone installing from a repo (for example helm install ... linagora/openrag-stack).

@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: an empty or null entry in extraObjects would render as --- followed by null and fail to apply. A {{- if . }} guard inside the range would cover it.

labels:
app.kubernetes.io/name: indexer-ui
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/instance: {{ include "openrag-stack.fullname" . }}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: app.kubernetes.io/instance is set to the fullname here, but the shared selectorLabels helper uses .Release.Name. Minor label inconsistency across the stack (same pattern in infinity.yaml).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants