-
Notifications
You must be signed in to change notification settings - Fork 309
Description
Version
26.1.2
Installation method
Kubernetes/Helm (NIM Operator mode)
Describe the bug
When upgrading an nv-ingest deployment from nemotron_parse.enabled: false to nemotron_parse.enabled: true, the Helm upgrade fails with a "duplicate entries for key" error for the NEMOTRON_PARSE_HTTP_ENDPOINT environment variable.
This occurs because the env var is defined in two places:
- Statically in
values.yamlunder theenvVars:section (always rendered):
envVars:
# ...
NEMOTRON_PARSE_HTTP_ENDPOINT: http://nemotron-parse:8000/v1/chat/completions
NEMOTRON_PARSE_INFER_PROTOCOL: http
NEMOTRON_PARSE_MODEL_NAME: nvidia/nemotron-parse- Conditionally in
deployment.yaml(rendered when nemotron_parse is enabled):
{{- if and (hasKey .Values "nimOperator") (hasKey .Values.nimOperator "nemotron_parse") (eq .Values.nimOperator.nemotron_parse.enabled true) }}
- name: NEMOTRON_PARSE_HTTP_ENDPOINT
value: "http://nemotron-parse:8000/v1/chat/completions"
{{- end }}When nemotron_parse.enabled: true, both definitions are rendered, causing the duplicate key error.
Error message
Error: UPGRADE FAILED: failed to create typed patch object (nim/nv-ingest; apps/v1, Kind=Deployment): .spec.template.spec.containers[name="nv-ingest"].env: duplicate entries for key [name="NEMOTRON_PARSE_HTTP_ENDPOINT"]
Steps to reproduce
- Deploy nv-ingest 26.1.2 with
nimOperator.nemotron_parse.enabled: false - Upgrade with
nimOperator.nemotron_parse.enabled: true - Observe the duplicate key error
Expected behavior
The upgrade should succeed. The NEMOTRON_PARSE_* env vars should only be defined in one place - either:
- Remove them from the static
envVarssection invalues.yaml, OR - Remove the conditional block in
deployment.yaml
The conditional approach in deployment.yaml seems more appropriate since these env vars are only needed when nemotron_parse is enabled.
Workaround
Manually edit the local chart's values.yaml to remove the three static NEMOTRON_PARSE_* entries before deploying:
sed -i '/NEMOTRON_PARSE_HTTP_ENDPOINT/d' nv-ingest/values.yaml
sed -i '/NEMOTRON_PARSE_INFER_PROTOCOL/d' nv-ingest/values.yaml
sed -i '/NEMOTRON_PARSE_MODEL_NAME/d' nv-ingest/values.yamlAffected files
values.yaml(lines containing NEMOTRON_PARSE_* under envVars)templates/deployment.yaml(conditional block adding NEMOTRON_PARSE_HTTP_ENDPOINT)
Suggested fix
Remove the three NEMOTRON_PARSE_* entries from the envVars: section in values.yaml, since they are already conditionally added by deployment.yaml when nemotron_parse is enabled.