← Back to Pull requests

OCPNODE-4040: Use single KubeletConfigAccepted condition type with True/False status #5854

Closed
unknown closed this pull request without merging on Aug 05, 2026 07:01 UTC
View on GitHub
unknown unknown commented on Apr 16, 2026 07:14 UTC
Author

Replace separate Success/Failure condition types with a unified Accepted type that uses Status=True for success and Status=False for failure, following standard Kubernetes condition conventions.

<!--
If this is a bug fix, make sure your description includes "Fixes: #xxxx", or
"Closes: #xxxx"

Please provide the following information:
-->

- What I did

  • Replace Kubeletconfig status.Condition.Type from Success/Failure to Accepted and accordingly set status.Condition.Status to True/False
  • Raised API PR to add KubeletConfigAccepted const in 'openshift/api/machineconfiguration/v1/types.go'
  • - How to verify it

    Create a Kubeletconfig

    ~~~
    1. Create kubeletconfig

    $ cat kubeletconf.yaml
    apiVersion: machineconfiguration.openshift.io/v1
    kind: KubeletConfig
    metadata:
    name: kubeletconfig-test
    spec:
    autoSizingReserved: true
    kubeletConfig:
    memorySwap:
    swapBehavior: LimitedSwap
    machineConfigPoolSelector:
    matchLabels:
    pools.operator.machineconfiguration.openshift.io/worker: ""

    $ oc apply -f kubeletconf.yaml

    2. Verify kubeletconfig status:

    $ oc get kubeletconfig kubeletconfig-test -o yaml
    [.....]
    Status:
      Conditions:
        Last Transition Time:  2026-xx-xxTxx:xx:xxZ
        Message:               Success
        Status:                True
        Type:                  Accepted
        Last Transition Time:  2026-xx-xxTxx:xx:xxZ
        Message:               Error: KubeletConfiguration: swapBehavior is not allowed to be set, but contains: LimitedSwap
        Status:                False
        Type:                  Accepted
    ~~~

    - Description for the changelog
    This change makes kubeletconfig status more readable and understandable. Previously in case of Success, Status.Conditions.message and Status.Conditions.Type both fields showing Success.
    <!--

    -->

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Bug Fixes
    KubeletConfig completion now recognizes the newer "accepted" condition (true/false) as completed alongside the legacy "success" condition.
    Status condition mapping for error/success was standardized to use the "accepted" condition with appropriate true/false semantics.

    Tests
    Test assertions and helpers updated to validate the accepted-style condition, its statuses, and expected messages.

    Documentation
    * Clarified doc comments about status-only updates to KubeletConfig.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 329 lines (+246 / -83) across 4 files Reviewer: aksjadha Review duration: 159827m
    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 · 329 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.347
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #5854"
    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.3% (HIGH) · Higher = larger blast radius
    65.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: 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.8% · Safe to merge
    25.8%