Skip to content

✨ feat: add "random" placement prioritizer#437

Open
dhaiducek wants to merge 1 commit into
open-cluster-management-io:mainfrom
dhaiducek:19784-random-placement
Open

✨ feat: add "random" placement prioritizer#437
dhaiducek wants to merge 1 commit into
open-cluster-management-io:mainfrom
dhaiducek:19784-random-placement

Conversation

@dhaiducek

@dhaiducek dhaiducek commented May 1, 2026

Copy link
Copy Markdown
Member

Summary

Add "random" placement prioritizer to Placement API description.

Related issue(s)

Summary by CodeRabbit

  • New Features
    • Added Random prioritizer option for cluster placement. Users can now randomly select clusters when deploying workloads, providing an alternative distribution strategy for flexible resource management.

ref: https://redhat.atlassian.net/browse/ACM-19784
Signed-off-by: Dale Haiducek <19750917+dhaiducek@users.noreply.github.com>
@openshift-ci openshift-ci Bot requested review from deads2k and jnpacker May 1, 2026 13:50
@openshift-ci

openshift-ci Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: dhaiducek
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3770fca5-5f6e-4478-904b-c520e9026efe

📥 Commits

Reviewing files that changed from the base of the PR and between 527878a and 7d44927.

📒 Files selected for processing (2)
  • cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml
  • cluster/v1beta1/types_placement.go

Walkthrough

Adds a new Random built-in prioritizer option to the placement CRD schema and its corresponding Go type documentation. Both files are updated to recognize and document random cluster selection as a valid prioritizer strategy.

Changes

Cohort / File(s) Summary
Random Prioritizer Addition
cluster/v1beta1/0000_02_clusters.open-cluster-management.io_placements.crd.yaml, cluster/v1beta1/types_placement.go
Adds documentation for a new Random BuiltIn prioritizer option in the placement schema and type definitions, enabling random cluster selection behavior.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a 'random' placement prioritizer to the Placement API, which aligns with the actual modifications to the CRD schema and type documentation.
Description check ✅ Passed The description includes a summary of changes and related issues/links, though it omits the optional icon/prefix note from the template's guidance section.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@mikeshng mikeshng left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would introducing randomness lead to unnecessary write operations and increased churn (ie excessive updates stored in etcd)?

I am assuming the list is no longer stabilized? Maybe the comment needs to explain that a bit futher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants