-
Notifications
You must be signed in to change notification settings - Fork 265
OCPBUGS-61196: Add a ValidatingAdmissionPolicy blocking ServiceCIDR changes #2605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-61196: Add a ValidatingAdmissionPolicy blocking ServiceCIDR changes #2605
Conversation
|
@danwinship: This pull request references Jira Issue OCPBUGS-46422, 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. |
|
/jira refresh |
|
@danwinship: This pull request references Jira Issue OCPBUGS-46422, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
b62995a to
7e3972b
Compare
|
@danwinship: This pull request references Jira Issue OCPBUGS-46422, which is valid. 3 validation(s) were run on this bug
Requesting review from QA contact: 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. |
7e3972b to
d0c8955
Compare
|
@danwinship: This pull request references Jira Issue OCPBUGS-46422, which is invalid:
Comment 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-required |
Do you think we could also check the user? To ensure only the apiserver can change the default ServiceCIDR. |
OCP does not yet support changing the service CIDRs at runtime.
f793f60 to
a795c90
Compare
|
/hold cancel it might take a bit to propagate through, but openshift/kubernetes#2444 fixes the conformance test failure, so once e2e passes, this can merge |
|
/test e2e-gcp-ovn |
|
/retest-required |
2 similar comments
|
/retest-required |
|
/retest-required |
|
/override ci/prow/e2e-aws-ovn-upgrade |
|
@danwinship: Overrode contexts on behalf of danwinship: ci/prow/e2e-aws-ovn-upgrade 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 kubernetes-sigs/prow repository. |
|
/verified by "ServiceCIDR should be blocked" (new test from openshift/origin#30234, which can merge after this does. Test run at https://prow.ci.openshift.org/view/gs/test-platform-results/logs/release-openshift-origin-installer-launch-aws-modern/1965905253861691392.) |
|
@danwinship: This PR has been marked as verified by 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. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danwinship, kyrtapz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@danwinship: 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. |
3dcc3fe
into
openshift:master
|
@danwinship: Jira Issue OCPBUGS-61196: Some pull requests linked via external trackers have merged: The following pull request, linked via external tracker, has not merged:
All associated pull requests must be merged or unlinked from the Jira bug in order for it to move to the next state. Once unlinked, request a bug refresh with Jira Issue OCPBUGS-61196 has not been moved to the MODIFIED state. This PR is marked as verified. If the remaining PRs listed above are marked as verified before merging, the issue will automatically be moved to VERIFIED after all of the changes from the PRs are available in an accepted nightly payload. 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. |
|
Fix included in accepted release 4.21.0-0.nightly-2025-10-02-215712 |
The ServiceCIDR API is beta
(and thus available by default)in k8s 1.31, but it will not work correctly in OCP, because (among other things) we do not support dynamically updating ovn-kubernetes with changes to the service CIDRs. Thus, we need to block admins from using this API (while not interfering with kube-apiserver's own use of the API).EDIT: the API was beta in 1.31, but not available by default. It doesn't become available by default until 1.33.
The ValidatingAdmissionPolicy here is identical to the sample one from the documentation beyond having a custom error message. (Note that, confusingly,
validations.expressiongives the condition describing when a change is allowed, whilevalidations.messagesgives the message printed when a change is denied.)(The reason that the policy allows changes to the default (
"kubernetes") ServiceCIDR is to allow single-stack to dual-stack migration; the apiserver itself will modify the default ServiceCIDR in that case when it is reconfigured.)