← Back to Pull requests

feat(mgmt): make mgmt-agent and kube-applier node scheduling configurable (default infra) #7350

Closed
unknown closed this pull request without merging on Oct 06, 2026 07:40 UTC
View on GitHub
unknown unknown commented on Oct 05, 2026 10:17 UTC
Author

Summary

Pin mgmt-agent and kube-applier (both deploy only to management clusters) to the management cluster's infra nodes, with the node role selectable from management-cluster config and the matching toleration derived automatically at Helm render time.

Intentional placement change: previously neither component constrained its scheduling, so with the infra and system pools tainted they effectively ran on the untainted worker pool. This makes infra the default role so they run on the infra pools — the requested behavior. It does not move anything to the system pool or remove infra pools; the eventual infra-pool retirement (coordinating Prometheus and other workloads) is a separate migration.

Follow-up to #7198 (svc-cluster schedulingRole pattern). svc.aks.systemPoolOnly is service-cluster-only and is intentionally not used here.

Config model

New mgmt.scheduling config (schema-validated), minimal and EV2-safe — only a scalar config reference, no list / range over config (see docs/service-deployment-concept.md):

  • role — infra or system (enum), default infra. Selected via nodeAffinity on aro-hcp.azure.com/role.
  • The matching toleration is derived in Helm from the role:

  • infra → infra=true:NoSchedule

  • system → CriticalAddonsOnly=true:NoSchedule
  • with operator: Equal, value: "true", effect: NoSchedule fixed. (If a management pool's taint key changes in future, that will be an explicit reviewed change rather than a config override.)

    Changes

  • mgmt-agent and kube-applier render the quoted role nodeAffinity and the derived toleration.

  • Regenerated rendered config and helm fixtures.

  • Tests: default (infra) and system-role override (CriticalAddonsOnly, no residual infra toleration) via helmtest golden fixtures for both charts, TestMgmtScheduling Go assertions, and a config schema validation test (role enum).

  • Brief, neutral docs note.
  • Validation

    Full make verify passes (deepcopy, tidy, materialize, helm fixtures, schema, lint). EV2 resolve-mode manifest generation was validated by the reviewer on a prior revision; re-validation of this revision is pending. The diff is scoped to scheduling-related files plus the required tooling/helmtest go.mod normalization.

    Tracking

    No separate tracking issue: this implements scheduling changes requested directly in review (building on #7198). The eventual management infra-pool retirement will be tracked separately as its own migration.

    ---
    AI-generated. Review for accuracy.

    @raelga requested from Slack

    Diff: 321 lines (+240 / -81) across 4 files Reviewer: raelga Review duration: 1283m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.65) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 321 lines diff across 4 files
    0.65
    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.345
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #7350"
    general weight: 0.35
    Reviewers
    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.1% (HIGH) · Higher = larger blast radius
    65.1%
    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: 25.7% · Safe to merge
    25.7%
    Repository