← Back to Pull requests

AUTOSCALE-998: deploy karpenter-provider-aws on HCP #26

Closed
unknown closed this pull request without merging on Sep 01, 2026 07:15 UTC
View on GitHub
unknown unknown commented on Aug 20, 2026 05:27 UTC
Author

PR is split into 2 commits, one which is the vendoring of the hypershift/api module to make review easier, and the other which is the main business logic introduced.

---

Adds logic to allow the karpenter-operator to deploy karpenter-provider-aws on HCP.

In particular, this commit adds a new hcp_controller.go which watches HostedCluster objects.
The HCP karpenter controller only runs on Management mode.

When it detects a HostedCluster object (i.e. always), it will rollout a Karpenter deployment, with a ServiceAccount.

The deployment is now configured to contain HCP specific plumbing:

  • the deployment contains a token-minter sidecar container allows karpenter to act as a ServiceAccount in the HC

  • - the token minter image for the operand can be configured by a new env var to the karpenter-operator TOKEN_MINTER_IMAGE
  • the deployment disables leader election (matching legacy behaviour)

  • the deployment is now mounted with a target-kubeconfig so Karpenter acts only upon the hosted cluster
  • This PR also refactors out common code to operands on both OCP and HCP.

    ---

    To make this all work e2e, this requires a followup in openshift/hypershift, to allow the deployment model to propagate TOKEN_MINTER_IMAGE to the karpenter-operator pod.

    Note ##

    I'm not particularly fond of the current structure i've put the controllers and code. I.e. hcp_controller.go and ocp_controller.go. If anyone has any better naming systems or code reorganization patterns for this repo, I'm happy to accept any feedback about that :-)

    Diff: 197 lines (+147 / -50) across 2 files Reviewer: joelsmith Review duration: 17387m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.59) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.59 · 197 lines diff across 2 files
    0.59
    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%
    56%
    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.316
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.059
    Real PR Conversation Timeline
    1 comments
    "Review active on #26"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 59.3% (MEDIUM) · Higher = larger blast radius
    59.3%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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.6% · Safe to merge
    25.6%