← Back to Pull requests

fix(helm): remove duplicate labels #1844

Closed
unknown closed this pull request without merging on Sep 15, 2026 13:03 UTC
View on GitHub
unknown unknown commented on Sep 15, 2026 07:45 UTC
Author

Summary

Closes #1833

templates/job-external-mongodb-setup.yaml emitted app.kubernetes.io/name twice in the Job's metadata.labels, because it appended the key after nvsentinel.labels, which already emits it through nvsentinel.selectorLabels. Helm's own parser tolerates a duplicate mapping key (last one wins), so the chart rendered, linted, and published fine, but every strict YAML parser rejects the document.

helm template with external-MongoDB values — the duplicate key is gone, the resulting label set is unchanged:

   name: nvsentinel-external-mongodb-setup-2592000-b607f98f
   labels:
     helm.sh/chart: nvsentinel-0.1.0
-    app.kubernetes.io/name: nvsentinel
+    app.kubernetes.io/name: external-mongodb-setup
     app.kubernetes.io/instance: nvsentinel
     app.kubernetes.io/version: "1.0.0"
     app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-mongodb-setup
     app.kubernetes.io/component: mongodb-init
   annotations:

| File | Guards |
| --- | --- |
| tests/external_mongodb_setup_job_test.yaml | The Job's label set: the name is external-mongodb-setup, emitted once, with the common labels intact. |
| tests/strict_render_test.yaml | The class of bug: every template must render as strictly valid YAML, across four datastore permutations (defaults, external MongoDB, bundled MongoDB, PostgreSQL). |

Both suites were confirmed to fail against the pre-fix chart with the exact error Flux reports, and pass after:

Error: yaml: unmarshal errors:
  line 14: mapping key "app.kubernetes.io/name" already defined at line 10

Type of Change


  • [X] 🐛 Bug fix

  • ✨ New feature

  • 💥 Breaking change

  • 📚 Documentation

  • 🔧 Refactoring

  • 🔨 Build/CI
  • Component(s) Affected


  • Health Monitor

  • Core Service

  • Fault Management

  • Janitor

  • [X] Deployment/Config

  • API/Interface

  • Preflight

  • Plugins

  • Documentation/CI

  • New Component

  • Multiple Components

  • Other
  • Testing


  • [X] Tests pass locally

  • [X] Manual testing completed

  • [X] No breaking changes (or documented)
  • Checklist


  • [X] Self-review completed

  • [X] Documentation updated (if needed)

  • [X] Ready for review
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

  • Bug Fixes

  • - Improved Kubernetes resource labels to provide distinct, accurate names for each resource and avoid duplicate name mappings.
    - Updated the external MongoDB setup job to use its specific resource name in metadata.

  • Tests

  • - Added coverage for external MongoDB setup job labels.
    - Added rendering checks across default, external MongoDB, bundled MongoDB, and PostgreSQL configurations.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 360 lines (+270 / -90) across 4 files Reviewer: KaivalyaMDabhadkar Review duration: 318m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 360 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.352
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #1844"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.8% (HIGH) · Higher = larger blast radius
    65.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.0% · Safe to merge
    26.0%