← Back to Pull requests

fix(kro-clusters): propagate resourcePrefix to spoke EksclusterWithVpc #911

Closed
unknown closed this pull request without merging on Sep 21, 2026 13:49 UTC
View on GitHub
unknown unknown commented on Sep 17, 2026 22:07 UTC
Author

Problem

On a deployment using a custom resource prefix (e.g. peeks-031), the parent cluster-addons ArgoCD Application stays Degraded because the ack_pod_identities ApplicationSet reports ApplicationValidationError:

application destination spec is invalid: there are no clusters with this name: peeks-hub (and 1 more)

Root cause

Spoke EksclusterWithVpc instances never received resourcePrefix, so they fell back to the RGD schema default "peeks". The nested EksCluster (which the EksclusterWithVpc RGD already forwards resourcePrefix to) then stamped the spoke ArgoCD cluster secret with:

  • resource_prefix: peeks

  • hub_cluster_name: peeks-hub (${resourcePrefix}-hub)
  • Addons flagged destinationHub: true (e.g. ack_pod_identities) resolve their destination to {{ default .name (index .metadata.annotations "hub_cluster_name") }} = peeks-hub. Under a custom prefix the hub is registered as peeks-031-hub, so peeks-hub is not a known cluster → destination invalid → ApplicationSet error → cluster-addons Degraded.

    Verified live on peeks-031-hub:

    | cluster secret | resource_prefix | hub_cluster_name |
    |---|---|---|
    | peeks-031-hub | peeks-031 ✅ | null → falls back to .name = peeks-031-hub ✅ |
    | peeks-031-spoke-dev | peeks ❌ | peeks-hub ❌ |
    | peeks-031-spoke-prod | peeks ❌ | peeks-hub ❌ |

    The RGDs are not at fault — rg-eks-vpc.yaml already threads resourcePrefix: ${schema.spec.resourcePrefix} into the nested EksCluster. The gap is purely in the caller layer that never sets EksclusterWithVpc.spec.resourcePrefix.

    Fix

  • gitops/bootstrap/clusters-kro.yaml — thread global.resourcePrefix from the hub cluster secret's resource_prefix annotation.

  • gitops/abstractions/kro/kro-clusters/templates/clusters.yaml — set spec.resourcePrefix per spoke as per-cluster override | global | default "peeks".
  • Mirrors the spoke repoURL global-inheritance pattern from #894.

    Scope / impact

  • Default-prefix (peeks) deployments are unaffected — ${resourcePrefix}-hub coincidentally equals the real peeks-hub, so no workshop-participant impact.

  • Only custom-prefix deployments were broken; this closes the multi-prefix isolation gap on the gitops side.

  • Functionally non-blocking today (the ack-pod-identity addon itself is Healthy on the hub); this clears the cosmetic parent cluster-addons Degraded.
  • Validation

    helm template of abstractions/kro/kro-clusters:

  • per-cluster override → renders the override value

  • global.resourcePrefix=peeks-031, no per-cluster value → renders peeks-031

  • global present without resourcePrefix → renders default "peeks"
  • Test plan

  • Deploy with a custom --resource-prefix (kind-kro-ack); confirm spoke cluster secrets carry resource_prefix=<prefix> and hub_cluster_name=<prefix>-hub.

  • ack_pod_identities ApplicationSet has no ApplicationValidationError; cluster-addons reaches Healthy.

  • Default peeks deployment unchanged.
  • Diff: 380 lines (+285 / -95) across 4 files Reviewer: shapirov103 Review duration: 5261m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.43 · 380 lines diff across 4 files
    0.43
    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.356
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #911"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% 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: 42.9% (MEDIUM) · Higher = larger blast radius
    42.9%
    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: 17.0% · Safe to merge
    17.0%