OCPBUGS-82584: Add labelSelector to MachineSet status for scale subresource#2807
OCPBUGS-82584: Add labelSelector to MachineSet status for scale subresource#2807RadekManak wants to merge 1 commit intoopenshift:masterfrom
Conversation
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-82584, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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. |
|
Hello @RadekManak! Some important instructions when contributing to openshift/api: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (10)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAn optional LabelSelector field of type string was added to MachineSetStatus in machine/v1beta1/types_machineset.go (JSON: labelSelector,omitempty, validation: MaxLength=4096). It represents the serialized label selector for the MachineSet's machines and is exposed via the scale subresource as status.selector. If omitted, it indicates the controller has not yet reconciled spec.selector into status.labelSelector. No other spec or status fields or control-flow logic were changed. 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.4)Error: build linters: unable to load custom analyzer "kubeapilinter": tools/_output/bin/kube-api-linter.so, plugin: not implemented Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/jira refresh |
|
@RadekManak: This pull request references Jira Issue OCPBUGS-82584, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
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. |
fae2c31 to
ca2059a
Compare
| // It is exposed via the scale subresource as status.selector. | ||
| // When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. | ||
| // +optional | ||
| LabelSelector string `json:"labelSelector,omitempty"` |
There was a problem hiding this comment.
Is there a reasonable upper bounds we can set here?
There was a problem hiding this comment.
The labelSelector for MachineSet is typically the machineset name and cluster name. Additionally, user could add their own. There is no limit on how many they can add on the spec. Set this to 4096 as reasonable high number that won't cause issue to existing clusters.
ca2059a to
62d795b
Compare
62d795b to
6cb9185
Compare
|
@RadekManak: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. |
Summary
MachineSet already advertises a scale subresource with
labelSelectorPath: .status.labelSelector, but the API/schema does not define that status field.status.labelSelectortomachine.openshift.io/v1beta1MachineSetStatusThe paired openshift/machine-api-operator#1490 change populates
status.labelSelectorfromspec.selectorduring MachineSet status reconciliation so the/scalesubresource can exposeScale.status.selectorfor HPA/KEDA-style consumers.