[4.22] OCPBUGS-98604: Add NodeSelectorAdjuster admission plugin for HCP clusters#2718
[4.22] OCPBUGS-98604: Add NodeSelectorAdjuster admission plugin for HCP clusters#2718joelsmith wants to merge 1 commit into
Conversation
…clusters Add a new kube-apiserver admission plugin that removes the node-role.kubernetes.io/master node selector to qualifying control-plane-adjacent Day 2 operator pods at admission time. On hosted-control plane clusters, there are no master nodes so Day 2 operators which expect to run on a master node are unable to run without manual intervention. On standalone OpenShift clusters, operators like the VPA operator must run on master nodes for security reasons (e.g., limiting blast radius of privilege escalation from a worker-node compromise). HCP clusters have a different security posture (using the cluster rather than the node as a security boundary) and no master nodes exist in the guest cluster, so the plugin provides a means of running the VPA on HCP without manual intervention. The plugin detects standalone clusters by checking POD_NAMESPACE=openshift-kube-apiserver at start-up. Currently the VPA Operator pod is the only registered workload. The design is extensible to other control-plane-adjacent operators by adding label matchers to requiresNodeSelectorAdjustment(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@joelsmith: This pull request references Jira Issue OCPBUGS-98604, 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. |
|
@joelsmith: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
Comment |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: joelsmith 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 |
|
@joelsmith: This pull request references Jira Issue OCPBUGS-98604, which is valid. The bug has been moved to the POST state. 7 validation(s) were run on this bug
No GitHub users were found matching the public email listed for the QA contact in Jira (zfeng@redhat.com), skipping review request. 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. |
|
/retest |
|
@joelsmith: all tests passed! 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. |
Cherry-pick of #2695
Add a new kube-apiserver admission plugin that removes the node-role.kubernetes.io/master node selector to qualifying control-plane-adjacent Day 2 operator pods at admission time.
On hosted-control plane clusters, there are no master nodes so Day 2 operators which expect to run on a master node are unable to run without manual intervention. On standalone OpenShift clusters, operators like the VPA operator must run on master nodes for security reasons (e.g., limiting blast radius of privilege escalation from a worker-node compromise). HCP clusters have a different security posture (using the cluster rather than the node as a security boundary) and no master nodes exist in the guest cluster, so the plugin provides a means of running the VPA on HCP without manual intervention. The plugin detects standalone clusters by checking
POD_NAMESPACE=openshift-kube-apiserverat start-up.Currently the VPA Operator pod is the only registered workload. The design is extensible to other control-plane-adjacent operators by adding label matchers to
requiresNodeSelectorAdjustment().