Skip to content

BUG]: Duplicate NEMOTRON_PARSE_HTTP_ENDPOINT env var causes upgrade failure when enabling nemotron_parse #1685

@dafinley

Description

@dafinley

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:

  1. Statically in values.yaml under the envVars: 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
  1. 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

  1. Deploy nv-ingest 26.1.2 with nimOperator.nemotron_parse.enabled: false
  2. Upgrade with nimOperator.nemotron_parse.enabled: true
  3. 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 envVars section in values.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.yaml

Affected 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions