← Back to Pull requests

Add clusterDomain value; deprecate misdocumented clusterName #383

Open
unknown opened this pull request with 216 lines diff across 2 files
View on GitHub
unknown unknown commented on Sep 08, 2026 21:26 UTC
Author

Problem

clusterName is documented as the Kubernetes cluster name ("Can be found in /etc/kubernetes/admin.conf: clusters -> cluster -> name"), so users set it to their kubeconfig or EKS cluster name. The chart then renders in-cluster URLs like prometheus-server.prometheus-system.svc.my-eks-cluster:80 and OpenCost fails at startup with lookup ...: no such host.

The value is only ever used as the DNS suffix of generated service FQDNs — _helpers.tpl interpolates it as <service>.<namespace>.svc.<clusterName> — never as a cluster identifier. It was introduced in #236 for a cluster with a non-default DNS domain; the actual cluster identity knob is opencost.exporter.defaultClusterId.

Fix

  • Add clusterDomain (default cluster.local), described by what it is for, pointing at opencost.exporter.defaultClusterId for cluster identity.

  • Keep clusterName as a deprecated alias (default now ""); when set it still takes precedence, so existing values files render identical URLs.

  • _helpers.tpl uses .Values.clusterName | default .Values.clusterDomain in both prometheusServerEndpoint and thanosServerEndpoint.

  • New tests/cluster_domain_test.yaml covering the default, clusterDomain, and the deprecated alias.

  • Chart 2.5.31 -> 2.5.32; README rows and version badge updated in place. A full helm-docs run also picks up unrelated drift from the v1.121.x releases, so it is left alone as in #378.
  • Rendered output with default values is unchanged apart from the helm.sh/chart label.

    Links

  • https://github.com/opencost/opencost-helm-chart/issues/382

  • https://github.com/opencost/opencost-helm-chart/issues/235 / #236, where the value was introduced
  • Yes, AI-assisted; reviewed by me.

    Diff: 216 lines (+162 / -54) across 2 files Reviewer: KR-Ravindra Review duration: 36077m
    All Vouch review confidence checks passed
    Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 216 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.322
    Real PR Conversation Timeline
    1 comments
    "Review active on #383"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% reviewed
    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: 36.6% (MEDIUM) · Higher = larger blast radius
    36.6%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.5% · Safe to merge
    19.5%