Skip to content

fix(helm): honor release namespace instead of hardcoded ns-aiq#309

Open
e-minguez wants to merge 1 commit into
NVIDIA-AI-Blueprints:developfrom
e-minguez:fix/helm-namespace-release-290
Open

fix(helm): honor release namespace instead of hardcoded ns-aiq#309
e-minguez wants to merge 1 commit into
NVIDIA-AI-Blueprints:developfrom
e-minguez:fix/helm-namespace-release-290

Conversation

@e-minguez

@e-minguez e-minguez commented Jul 3, 2026

Copy link
Copy Markdown

Overview

The aiq.namespace helper rendered ns- (e.g. ns-aiq) for every resource, ignoring the install namespace. This broke helm install -n and GitOps operators (ArgoCD, Fleet) that don't pre-create ns-aiq, failing with 'namespaces "ns-aiq" not found'.

Default the helper to .Release.Namespace and add an optional namespace.name override to pin a specific namespace. Align namespace.yaml to use the same helper. Bump chart versions (aiq 0.0.4->0.0.5, aiq2-web 2.0.0->2.0.1) and refresh the vendored dependency package.

Validation

  • I ran the relevant local checks or explained why they are not applicable.
  • I added or updated tests for behavior changes.
  • I updated documentation for user-facing or contributor-facing changes.
  • I confirmed this PR does not include secrets, credentials, or internal-only data.
  • I certify this contribution under the Developer Certificate of Origin (DCO) and signed my commits with git commit -s or an equivalent sign-off.

Where should reviewers start?

Related Issues

Fixes #290

Summary by CodeRabbit

  • New Features

    • Added support for optionally setting a fixed Kubernetes namespace, while defaulting to the current release namespace when left blank.
    • Updated chart metadata to newer versions for the main chart and bundled component.
  • Bug Fixes

    • Improved namespace behavior so deployments can work more cleanly with GitOps-based workflows and avoid unexpected namespace selection.

The aiq.namespace helper rendered ns-<appname> (e.g. ns-aiq) for every
resource, ignoring the install namespace. This broke helm install -n and
GitOps operators (ArgoCD, Fleet) that don't pre-create ns-aiq, failing
with 'namespaces "ns-aiq" not found'.

Default the helper to .Release.Namespace and add an optional
namespace.name override to pin a specific namespace. Align namespace.yaml
to use the same helper. Bump chart versions (aiq 0.0.4->0.0.5,
aiq2-web 2.0.0->2.0.1) and refresh the vendored dependency package.

Fixes NVIDIA-AI-Blueprints#290

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: e-minguez <e.minguez@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: cadbc082-c318-4dbb-a697-f45d7509fcf9

📥 Commits

Reviewing files that changed from the base of the PR and between db86f8f and ead91f3.

📒 Files selected for processing (7)
  • deploy/helm/deployment-k8s/Chart.yaml
  • deploy/helm/deployment-k8s/charts/aiq-0.0.4.tgz
  • deploy/helm/deployment-k8s/charts/aiq-0.0.5.tgz
  • deploy/helm/helm-charts-k8s/aiq/Chart.yaml
  • deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl
  • deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml
  • deploy/helm/helm-charts-k8s/aiq/values.yaml
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (2)
**

⚙️ CodeRabbit configuration file

**:

AI-Q Agent Guidance

Repository-global instructions for coding agents and for humans reviewing
agent-authored changes. These rules apply to every task in this repository.
Task-specific runbooks live in .agents/skills/ — load the
relevant skill before starting a workflow it covers.

Project overview

AI-Q is an NVIDIA AI Blueprint: an enterprise research agent built on the
NeMo Agent Toolkit (NAT). The deployed product is a research blueprint, not
a general skill runtime. New retrieval sources and tools are NAT functions;
agent behavior is driven by workflow YAML, Jinja2 prompts, and a data-source
registry — not by hard-coded logic.

Primary boundaries:

  • Backend Python package: src/aiq_agent/.
  • Data-source and tool packages: sources/ (each is its own package).
  • Frontends and tooling: frontends/ (web UI in frontends/ui/, eval harnesses
    in frontends/benchmarks/).
  • Configs, deployment, docs: configs/, deploy/, docs/.

Stay inside this repository. If your workspace also contains adjacent repos
(for example a sibling NeMo-Relay checkout), do not edit them as part of an AI-Q
change. Treat sources/* as independent packages: prefer the smallest change
scoped to the package you are touching.

Repository structure

Path Purpose
src/aiq_agent/ Backend agent, FastAPI extensions, auth, observability, knowledge
sources/ Data-source / tool packages (e.g. tavily_web_search, google_scholar_paper_search)
configs/ Workflow YAML configs (e.g. config_cli_default.yml)
frontends/ui/ Next.js / React / TypeScript / Tailwind / KUI web UI
frontends/benchmarks/ Eval harnesses: freshqa, deepsearch_qa, deepresearch_bench
deploy/ Docker Compose and Helm/Kubernetes assets; deploy/.env for secrets
docs/source/ ...

Files:

  • deploy/helm/helm-charts-k8s/aiq/Chart.yaml
  • deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml
  • deploy/helm/deployment-k8s/Chart.yaml
  • deploy/helm/helm-charts-k8s/aiq/values.yaml
  • deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl
{deploy/**,configs/**}

⚙️ CodeRabbit configuration file

{deploy/**,configs/**}: Review deployment and config changes for secret separation, safe defaults, local-vs-production behavior, Helm and
Docker portability, and documentation parity. Flag committed credentials, environment-specific NVIDIA internals in
public defaults, and changes that make examples diverge from CI-tested paths.

Files:

  • deploy/helm/helm-charts-k8s/aiq/Chart.yaml
  • deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml
  • deploy/helm/deployment-k8s/Chart.yaml
  • deploy/helm/helm-charts-k8s/aiq/values.yaml
  • deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl
🔇 Additional comments (5)
deploy/helm/helm-charts-k8s/aiq/Chart.yaml (1)

6-6: LGTM!

deploy/helm/deployment-k8s/Chart.yaml (1)

5-9: LGTM!

deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl (1)

53-65: LGTM!

deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml (1)

1-21: LGTM!

deploy/helm/helm-charts-k8s/aiq/values.yaml (1)

22-31: 🗄️ Data Integrity & Integration | ⚡ Quick win

Confirm upgrade migration guidance exists for pre-existing ns-<appname> deployments.

Any release currently living in the old hardcoded ns-<appname> namespace will move to .Release.Namespace on upgrade unless namespace.name is explicitly pinned to the old value. Since Helm/Kubernetes can't relocate existing namespaced resources in-place, this can leave orphaned resources behind. Worth confirming release notes/docs call out the override needed for existing installs to avoid surprise duplication or orphaned resources.

As per path instructions, deployment/config changes should be reviewed for "local-vs-production behavior... and documentation parity."

Source: Path instructions


Walkthrough

Updates the aiq.namespace Helm helper to default to .Release.Namespace instead of deriving a hardcoded ns-<appname> name, wires the namespace.yaml template through this helper, adds a namespace.name override in values.yaml, and bumps chart versions for aiq and deployment-k8s.

Changes

Namespace resolution fix and version bumps

Layer / File(s) Summary
aiq.namespace helper logic
deploy/helm/helm-charts-k8s/aiq/templates/_helpers.tpl
Helper now resolves to .Values.namespace.name when set, otherwise .Release.Namespace, removing the previous deploymentTarget/kind and ns-<appname> derivation.
Namespace template and values wiring
deploy/helm/helm-charts-k8s/aiq/templates/namespace.yaml, deploy/helm/helm-charts-k8s/aiq/values.yaml
Namespace resource's metadata.name now uses include "aiq.namespace" .; values.yaml adds a documented namespace.name field defaulting to empty.
Chart version bumps
deploy/helm/helm-charts-k8s/aiq/Chart.yaml, deploy/helm/deployment-k8s/Chart.yaml
aiq chart version bumped 0.0.40.0.5; deployment-k8s chart version bumped 2.0.02.0.1 and its aiq dependency updated to 0.0.5.

Estimated code review effort: 2 (Simple) | ~10 minutes

Related issues: Fixes #290 by making the aiq.namespace helper honor .Release.Namespace instead of hardcoding ns-<appname>.

Sequence Diagram(s)

sequenceDiagram
    participant Helm as Helm CLI
    participant NamespaceTpl as namespace.yaml
    participant Helper as aiq.namespace helper
    participant Values as values.yaml

    Helm->>NamespaceTpl: render Namespace resource
    NamespaceTpl->>Helper: include "aiq.namespace" .
    Helper->>Values: check namespace.name
    alt namespace.name set
        Helper-->>NamespaceTpl: return namespace.name
    else namespace.name empty
        Helper-->>NamespaceTpl: return .Release.Namespace
    end
    NamespaceTpl-->>Helm: rendered metadata.name
Loading

Suggested reviewers: aiq maintainers familiar with Helm chart deployment targets and GitOps operator compatibility.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is conventional-commits compliant and accurately describes the namespace fix.
Description check ✅ Passed The description includes Overview, Validation, and Related Issues, and is mostly complete despite an empty reviewer-start section.
Linked Issues check ✅ Passed The changes satisfy #290 by defaulting to .Release.Namespace, supporting an override, and updating all namespace consumers.
Out of Scope Changes check ✅ Passed The version bumps and dependency refresh are referenced in scope and do not introduce unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

Successfully merging this pull request may close these issues.

[Bug]: Helm chart hardcodes ns-aiq namespace via aiq.namespace helper, ignoring release namespace

1 participant