Skip to content

Conversation

@bertinatto
Copy link
Member

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 22, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Sep 22, 2025

@bertinatto: This pull request references OCPSTRAT-2371 which is a valid jira issue.

In response to this:

The API started being served in v1.32.0: https://github.com/kubernetes/kubernetes/blob/release-1.34/pkg/features/kube_features.go#L1964

/assign @benluddy
CC @jacobsee

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.

@coderabbitai
Copy link

coderabbitai bot commented Sep 22, 2025

Walkthrough

Updated MutatingAdmissionPolicy KubeVersionRange entries in the runtime config observer: v1alpha1 range set to ">= 1.33.0 and < 1.35.0", v1beta1 set to ">= 1.34.0 and < 1.35.0". Added explanatory comments about pre-GA API handling and removed a stray blank line. No public API or type signature changes.

Changes

Cohort / File(s) Summary of changes
API enablement runtime config observer
pkg/operator/configobservation/apienablement/observe_runtime_config.go
Replaced prior discrete version entries with bounded KubeVersionRange values: v1alpha1 now ">= 1.33.0 and < 1.35.0"; v1beta1 now ">= 1.34.0 and < 1.35.0". Added multi-line comments explaining retention of pre-GA ranges and guidance for future rebases. Removed a standalone blank line in NewFeatureGateObserverWithRuntimeConfig (formatting-only).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title accurately summarizes the primary change: it states that MutatingAdmissionPolicy e2es require both v1alpha1 and v1beta1 of admissionregistration.k8s.io to be served in Kubernetes 1.34, which aligns with the PR's updates to the version-range entries in observe_runtime_config.go and the linked rationale; it is specific and meaningful for reviewers.
Description Check ✅ Passed The PR description is directly related to the changeset: it cites when the API began being served (v1.32.0) and links to the Kubernetes source used to justify the updated version ranges, so it is not off-topic.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between cd3079a and 03b528d.

📒 Files selected for processing (1)
  • pkg/operator/configobservation/apienablement/observe_runtime_config.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • pkg/operator/configobservation/apienablement/observe_runtime_config.go

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

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

@bertinatto
Copy link
Member Author

/payload-job-with-prs periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-ovn-techpreview openshift/kubernetes#2148

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

@bertinatto: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-nightly-4.21-e2e-vsphere-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/d2dcf890-97bf-11f0-8395-2a98cc7e2228-0

@bertinatto
Copy link
Member Author

/payload-job-with-prs periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview openshift/kubernetes#2148

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

@bertinatto: trigger 1 job(s) for the /payload-(with-prs|job|aggregate|job-with-prs|aggregate-with-prs) command

  • periodic-ci-openshift-release-master-ci-4.21-e2e-aws-ovn-techpreview

See details on https://pr-payload-tests.ci.openshift.org/runs/ci/f022de10-97bf-11f0-9461-3197e061a774-0

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
pkg/operator/configobservation/apienablement/observe_runtime_config.go (1)

20-22: Correct lower bound; consider bounding v1alpha1 to avoid double-enabling post‑1.34

  • Setting v1alpha1 to start at 1.32 is correct (introduced in 1.32), and v1beta1 is available in 1.34. This change aligns with upstream. (pkg.go.dev)
  • If we don’t want to enable both v1alpha1 and v1beta1 on ≥1.34 clusters, tighten the v1alpha1 range to be mutually exclusive:
- {KubeVersionRange: semver.MustParseRange(">= 1.32.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"}},
+ {KubeVersionRange: semver.MustParseRange(">= 1.32.0 < 1.34.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"}},

If serving both versions simultaneously is desired (it’s generally fine), then the current edit is good to go. Please confirm the intent.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 6333489 and 7018157.

📒 Files selected for processing (1)
  • pkg/operator/configobservation/apienablement/observe_runtime_config.go (1 hunks)

@jacobsee
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2025
@bertinatto
Copy link
Member Author

/retest-required

@bertinatto bertinatto force-pushed the mutatingadmissionpolicy-v1alpha1 branch from 7018157 to a9091c7 Compare September 22, 2025 18:46
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2025
@benluddy
Copy link
Contributor

benluddy commented Sep 22, 2025

/retitle OCPSTRAT-2371: MutatingAdmissionPolicy e2es depend on both v1alpha1 and v1beta1 of admissionregistration.k8s.io being served in k8 1.34

@openshift-ci openshift-ci bot changed the title OCPSTRAT-2371: MutatingAdmissionPolicy v1alpha1 started being served in k8 1.32.0 OCPSTRAT-2371: MutatingAdmissionPolicy e2es depend on both v1alpha1 and v1beta1 of admissionregistration.k8s.io being served in k8 1.34 Sep 22, 2025
@bertinatto bertinatto force-pushed the mutatingadmissionpolicy-v1alpha1 branch from a9091c7 to 1942ea5 Compare September 22, 2025 18:53
@benluddy
Copy link
Contributor

/approve

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 22, 2025
@bertinatto bertinatto force-pushed the mutatingadmissionpolicy-v1alpha1 branch from 1942ea5 to cd3079a Compare September 22, 2025 19:34
{KubeVersionRange: semver.MustParseRange("< 1.34.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1alpha1"}},
{KubeVersionRange: semver.MustParseRange(">= 1.34.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1beta1"}},
// MutatingAdmissionPolicy was introduced as TechPreviewNoUpgrade in OCP 4.20 (k8s v1.33) with v1alpha1 API.
// OCP 4.21 (k8s v1.34) added v1beta1 API support alongside v1alpha1.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please mention that the upstream E2E feature tests exercise both versions, so pre-GA we must serve both.

{KubeVersionRange: semver.MustParseRange(">= 1.34.0"), GroupVersion: schema.GroupVersion{Group: "admissionregistration.k8s.io", Version: "v1beta1"}},
// MutatingAdmissionPolicy was introduced as TechPreviewNoUpgrade in OCP 4.20 (k8s v1.33) with v1alpha1 API.
// OCP 4.21 (k8s v1.34) added v1beta1 API support alongside v1alpha1.
// Both APIs are expected to be removed when the feature goes GA.
Copy link
Contributor

Choose a reason for hiding this comment

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

They won't be removed right away. What we must prevent is a GA release of OpenShift that serves either of these versions. That could happen if MutatingAdmissionPolicy is added to the default featureset in openshift/api in the future as part of a pivot from (feature default-off, v1beta1 default-off) to (feature default-on, v1 default-on).

// OCP 4.21 (k8s v1.34) added v1beta1 API support alongside v1alpha1.
// Both APIs are expected to be removed when the feature goes GA.
// GA is tentatively assumed for k8s v1.35, but the KEP does not specify a version yet: https://github.com/kubernetes/enhancements/issues/3962
// TODO: Update these ranges when rebasing to k8s v1.35+
Copy link
Contributor

Choose a reason for hiding this comment

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

To be specific: if we have a v1 version of the resources required for MutatingAdmissionPolicy in 1.35, then we can remove all references to MutatingAdmissionPolicy here. If we don't get v1 resources, then these ranges should be bumped to "<1.36.0" and we'll make another decision during the following rebase.

MutatingAdmissionPolicy e2es depend on both v1alpha1 and v1beta1 of admissionregistration.k8s.io being served in k8 1.34.
@bertinatto bertinatto force-pushed the mutatingadmissionpolicy-v1alpha1 branch from cd3079a to 03b528d Compare September 22, 2025 20:11
@benluddy
Copy link
Contributor

/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 22, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy, bertinatto, jacobsee

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

The pull request process is described here

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

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 22, 2025
@bertinatto
Copy link
Member Author

/retest-requird

@bertinatto
Copy link
Member Author

/retest-required

25 similar comments
@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@jacobsee
Copy link
Member

/retest-required

@jacobsee
Copy link
Member

/retest-required

@jacobsee
Copy link
Member

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@jacobsee
Copy link
Member

/retest-required

@jacobsee
Copy link
Member

/retest-required

@jacobsee
Copy link
Member

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@bertinatto
Copy link
Member Author

/retest-required

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 27, 2025

@bertinatto: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-single-node 03b528d link false /test e2e-aws-ovn-single-node
ci/prow/e2e-azure-ovn 03b528d link false /test e2e-azure-ovn
ci/prow/e2e-aws-operator-disruptive-single-node 03b528d link false /test e2e-aws-operator-disruptive-single-node
ci/prow/okd-scos-e2e-aws-ovn 03b528d link false /test okd-scos-e2e-aws-ovn
ci/prow/e2e-gcp-operator-single-node 03b528d link false /test e2e-gcp-operator-single-node

Full PR test history. Your PR dashboard.

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.

@bertinatto
Copy link
Member Author

/retest-required

@openshift-merge-bot openshift-merge-bot bot merged commit aaf8f8b into openshift:main Sep 28, 2025
16 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants