← Back to Pull requests

AUTOSCALE-660: add enforce node group min size flag #374

Merged
shyadav10 merged 4 files (45 lines) on May 20, 2026 17:36 UTC
View on GitHub
shyadav10 shyadav10 commented on May 06, 2026 19:20 UTC
Author

Add new field and plumbing for enforce node group min size

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

Summary by CodeRabbit

New Features
Added an enforceNodeGroupMinSize option to ClusterAutoscaler to enable or disable enforcement of minimum node group sizes (choices: Enabled/Disabled; defaults to Disabled).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Diff: 45 lines (+45 / -0) across 4 files Reviewer: elmiko Review duration: 20055m
All Vouch review confidence checks passed
Residual risk 0.03 = Change Risk (0.35) × (1 − Review Confidence (0.92)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 45 lines diff across 4 files
0.35
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.92 · 5 substantive comment(s)
0.92
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
91%
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.229
Ai Authored ai_authored
0.050
Real PR Conversation Timeline
13 items
openshift-ci-robot openshift-ci-robot commented on May 06, 2026 19:20 UTC
Contributor

@shyadav10: This pull request references AUTOSCALE-660 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

<details>

In response to this:

>Add new field and plumbing for enforce node group min size

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
</details>

coderabbitai[bot] coderabbitai[bot] commented on May 06, 2026 19:20 UTC
Bot

<!-- This is an auto-generated comment: summarize by coderabbit.ai -->
No actionable comments were generated in the recent review. 🎉

<details>
<summary>ℹ️ Recent review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 95860e70-7d9c-47ec-8b9c-1c4aeab05a5f

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 81bd58456ce1de1c7c89f6bfc8e19699cd40cb3d and dc27da3d734445d1600af40f2b6932d7875d3ded.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

install/01_clusterautoscaler.crd.yaml
pkg/apis/autoscaling/v1/clusterautoscaler_types.go

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (2)</summary>

install/01_clusterautoscaler.crd.yaml
pkg/apis/autoscaling/v1/clusterautoscaler_types.go

</details>

</details>

---

<!-- walkthrough_start -->

Walkthrough

Adds a new ClusterAutoscaler spec field enforceNodeGroupMinSize (enum "Enabled"/"Disabled", default "Disabled") to CRD and API types, and updates the controller to translate this setting into a --enforce-node-group-min-size CLI argument for the cluster-autoscaler process.

Changes

EnforceNodeGroupMinSize Configuration

|Layer / File(s)|Summary|
|---|---|
|API Type / Validation <br> pkg/apis/autoscaling/v1/clusterautoscaler_types.go|Introduces EnforceNodeGroupMinSizeMode (string) with constants Enabled and Disabled; adds optional EnforceNodeGroupMinSize *EnforceNodeGroupMinSizeMode field to ClusterAutoscalerSpec with +kubebuilder:default=Disabled and validation enum.|
|CRD Schema <br> install/01_clusterautoscaler.crd.yaml|Adds spec.enforceNodeGroupMinSize property: string, enum [Enabled,Disabled], default Disabled, with description referencing --enforce-node-group-min-size.|
|Controller Wiring <br> pkg/controller/clusterautoscaler/clusterautoscaler.go|Adds EnforceNodeGroupMinSizeArg constant and extends AutoscalerArgs to read ca.Spec.EnforceNodeGroupMinSize (nil-checked) and append the corresponding boolean argument to the cluster-autoscaler CLI.|

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User
  participant API_Server as "Kubernetes API\n(CRD)"
  participant Controller
  participant CA_Process as "cluster-autoscaler\n(process)"

  User->>API_Server: create/update ClusterAutoscaler with\nspec.enforceNodeGroupMinSize = Enabled/Disabled
  API_Server-->>Controller: watch event / updated CA resource
  Controller->>Controller: read ca.Spec.EnforceNodeGroupMinSize
  Controller->>CA_Process: start/reconcile with\n--enforce-node-group-min-size=<true|false>
  CA_Process-->>Controller: running with configured flag

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

<!-- walkthrough_end -->

<!-- pre_merge_checks_walkthrough_start -->

<details>
<summary>🚥 Pre-merge checks | ✅ 11 | ❌ 1</summary>

❌ Failed checks (1 warning)

| Check name | Status | Explanation | Resolution |
| :------------------------: | :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Test Structure And Quality | ⚠️ Warning | PR adds EnforceNodeGroupMinSize feature but lacks Ginkgo/Go test coverage. Similar features like CordonNodeBeforeTerminating have test cases. New CLI arg generation code is untested. | Add test cases for EnforceNodeGroupMinSize in TestAutoscalerArgsFromSpec (both Enabled and Disabled modes) matching CordonNodeBeforeTerminating test pattern to verify correct --enforce-node-group-min-size CLI arg generation. |

<details>
<summary>✅ Passed checks (11 passed)</summary>

| Check name | Status | Explanation |
| :----------------------------------------------: | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The pull request title accurately describes the main change: adding a new enforce node group min size flag feature across the CRD schema, API types, and controller logic. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Stable And Deterministic Test Names | ✅ Passed | PR introduces no Ginkgo tests. Changes are limited to CRD definitions, type definitions, and controller implementation. The check for stable test names is not applicable. |
| Microshift Test Compatibility | ✅ Passed | No Ginkgo e2e tests were added in this PR. The project uses standard Go unit tests, not Ginkgo. The three modified files contain no test additions. |
| Single Node Openshift (Sno) Test Compatibility | ✅ Passed | No new Ginkgo e2e tests were added in this PR. The changes only include CRD schema updates, type definitions, and controller logic. The SNO compatibility check is not applicable. |
| Topology-Aware Scheduling Compatibility | ✅ Passed | PR adds enforce-node-group-min-size feature via CRD, API types, and controller logic. No scheduling constraints, pod affinity, topology spreads, or deployment topology assumptions introduced. |
| Ote Binary Stdout Contract | ✅ Passed | No OTE Binary Stdout Contract violations detected. All changes are type definitions, constants, or business logic within functions. No fmt.Print, log.Print, or stdout writes in process-level code. |
| Ipv6 And Disconnected Network Test Compatibility | ✅ Passed | No Ginkgo e2e tests are added in this PR. Changes are limited to CRD manifest, API types, and controller implementation. The check does not apply. |

</details>

<sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub>

</details>

<!-- pre_merge_checks_walkthrough_end -->

<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

<details>
<summary>🧪 Generate unit tests (beta)</summary>

  • <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests
  • </details>

    </details>

    <!-- finishing_touch_checkbox_end -->
    <!-- announcements_start -->

    [!TIP]

    <details>

    <summary>💬 Introducing Slack Agent: The best way for teams to turn conversations into code.</summary>

    > Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

    > - Generate code and open pull requests

    - Plan features and break down work

    - Investigate incidents and troubleshoot customer tickets together

    - Automate recurring tasks and respond to alerts with triggers

    - Summarize progress and report instantly

    > Built for teams:

    > - Shared memory across your entire org—no repeating context

    - Per-thread sandboxes to safely plan and execute work

    - Governance built-in—scoped access, auditability, and budget controls

    > One agent for your entire SDLC. Right inside Slack.

    > 👉 Get started

    > </details>

    <!-- announcements_end -->

    <!-- tips_start -->

    ---

    Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

    <details>
    <summary>❤️ Share</summary>

  • X

  • Mastodon

  • Reddit

  • LinkedIn
  • </details>

    <sub>Comment @coderabbitai help to get the list of available commands and usage tips.</sub>

    <!-- tips_end -->

    <!-- internal state start -->

    <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAggFVoAHkAZQBhHwAZAFEwADZYgAYuNFp6MgAzfAoGEkgMRVyiCnxsbkhmeCxEeAAvXPSPNCJISAMAOUcBSi4AZgB2ABYWgz8bCK5YXFxuRA4AejmidVhsAQ0mZjn8bjJEBHTcOYYPbEQaCjA0PHxEBjQvC+3lAgo57mwPDzn+oda/RG69lgshSaAkAEYEsNgiVsrkBFQMAxYFwohhMnC2gUAOLFUqQQBJhDBnKRcJAEZhkVxmNosK1grhqKcuE86QYbCQJPASAB3SizSC0NDMWj4AA0kCoyJIHiE3GarQiKhlAqE8Cocwk93gtDAFBI6UoZByw1C+uodHQnEgACYEjbYmAEgBWJ2xaDggCcHDtPoGAC0jAARaQMCjwbjifAYDgGHypPK8yDpbkeeiYejcE7MNQYZoYyAZLIm/JKSBFEplCpVWokDTmSyhFhsDC4ZAOJwuIxQVl7eAHMAMeB6wT4MlMdHqtj0XCwXK2SUGo1I6SQfxBMKRGLxKEZyCz6j7ueQABS6rQKEQDlyqC1Hh19agcFyxQEY8v1/TkB5zgwlWaB5krOL5LvqK70GeVAftguSwGgyCYCgGB3jq/B8BUV7/vuJIkGSUgUNU0bJlkR65IyFCkuSiJUigZIkAAHjsYiWsB9gvPIBDYRRuGQPhhFYAARM6GgJCJAnkngeT4FxlF8fARE/u2uGPjAx6vu+vD4FySj0PeGAANbIJxC4bDSGD0HOHhlAAFJpPIKE45mQJZ3AAJToE5nEpl40Grk0tJnKR/A7Bgf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ar/bP/xb9POPLxMNB6AYAGGPL5oEkisL5sHurCvSAXJH7nJyAHloDXIIMkzQCP4bz6ASFoASBHNiD6FiDn6P4GFb7PMP/b9n/mMXLQEkxyBH/vMhH/09DAIMCfxxk/yAFSgFMSurVlvyy5CAO1HwDvQO8J9MChaEQEVYs8+eZflYCuAAhaAPgXAByBUx0BUK8TJsNS1LwJBABBgH3L9DgGYD/yPKf8pANuhAA -->

    <!-- internal state end -->

    elmiko elmiko commented on code on May 06, 2026 19:37 UTC
    Code Review
    pkg/apis/autoscaling/v1/clusterautoscaler_types.go:1
    @@ -98,6 +108,13 @@ type ClusterAutoscalerSpec struct {
     	// +kubebuilder:validation:MaxItems=3
     	// +optional
     	Expanders []ExpanderString `json:"expanders"`
    +	// EnforceNodeGroupMinSize enables/disables the `--enforce-node-group-min-size` cluster-autoscaler feature flag.
    +	// When enabled, the cluster autoscaler will enforce the minimum size of a node group,
    +	// ensuring that the node group never scales below the configured minimum size even if
    +	// nodes are deemed unneeded. This is useful for maintaining a baseline capacity in node groups.
    +	// Defaults to Disabled.

    i think we want to add a kubebuilder default validation here, as described in the docs https://book.kubebuilder.io/reference/markers/crd-validation.html

    	// Defaults to Disabled.
    	// +default:value="Disabled"
    

    elmiko elmiko commented on May 06, 2026 19:40 UTC
    Reviewer

    i think we want a default validation on the crd, also we should update the example ClusterAutoscaler to include a usage of the new field.

    shyadav10 shyadav10 commented on code on May 07, 2026 01:34 UTC
    Code Review
    pkg/apis/autoscaling/v1/clusterautoscaler_types.go:1
    @@ -98,6 +108,13 @@ type ClusterAutoscalerSpec struct {
     	// +kubebuilder:validation:MaxItems=3
     	// +optional
     	Expanders []ExpanderString `json:"expanders"`
    +	// EnforceNodeGroupMinSize enables/disables the `--enforce-node-group-min-size` cluster-autoscaler feature flag.
    +	// When enabled, the cluster autoscaler will enforce the minimum size of a node group,
    +	// ensuring that the node group never scales below the configured minimum size even if
    +	// nodes are deemed unneeded. This is useful for maintaining a baseline capacity in node groups.
    +	// Defaults to Disabled.

    done

    openshift-ci[bot] openshift-ci[bot] commented on May 07, 2026 04:48 UTC
    Bot

    @shyadav10: all tests passed!

    Full PR test history. Your PR dashboard.

    <details>

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.
    </details>
    <!-- test report -->

    elmiko elmiko commented on May 18, 2026 15:43 UTC
    Reviewer

    sorry, forgot to check back here. update looks great, thanks!

    /approve
    /lgtm

    openshift-ci[bot] openshift-ci[bot] commented on May 18, 2026 15:44 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/openshift/cluster-autoscaler-operator/pull/374#pullrequestreview-4311635671" title="LGTM">elmiko</a>

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    <details >
    Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [elmiko]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    elmiko elmiko commented on May 19, 2026 13:43 UTC
    Contributor

    @shyadav10 this just needs to be verified to merge. usually the author will verify based on a test or manually operating the patch. have you tried this out to make sure it works as expected?

    shyadav10 shyadav10 commented on May 20, 2026 15:21 UTC
    Author

    verified

    shyadav10 shyadav10 commented on May 20, 2026 17:26 UTC
    Author

    /verified by shyadav10

    openshift-ci-robot openshift-ci-robot commented on May 20, 2026 17:26 UTC
    Contributor

    @shyadav10: This PR has been marked as verified by shyadav10.

    <details>

    In response to this:

    >/verified by shyadav10

    Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.
    </details>

    Reviewers
    Assignees
    shyadav10 shyadav10
    Labels
    risk: low confidence: 91.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: 35.3% (MEDIUM) · Higher = larger blast radius
    35.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: 91.7% · Lower = rushed or shallow review
    91.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: 2.9% · Safe to merge
    2.9%