Skip to content

OCPBUGS-85181: Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate#2141

Open
jubittajohn wants to merge 1 commit into
openshift:mainfrom
jubittajohn:mutating-admission-policy-ga
Open

OCPBUGS-85181: Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate#2141
jubittajohn wants to merge 1 commit into
openshift:mainfrom
jubittajohn:mutating-admission-policy-ga

Conversation

@jubittajohn
Copy link
Copy Markdown
Contributor

@jubittajohn jubittajohn commented May 5, 2026

MutatingAdmissionPolicy graduated to GA (v1) in Kubernetes 1.36. The v1 API is served natively by kube-apiserver, so the operator no longer needs to manage runtime-config for pre-GA versions(v1alpha1, v1beta1). The version ranges already excluded 1.36+, making this entry a no-op.

Summary by CodeRabbit

  • Bug Fixes
    • Removed pre-populated default API version configurations for feature gates from runtime configuration initialization, requiring explicit configuration for MutatingAdmissionPolicy API versions.

Signed-off-by: jubittajohn <jujohn@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

Walkthrough

The PR removes hard-coded default feature gate group-version mappings for MutatingAdmissionPolicy from the defaultGroupVersionsByFeatureGate initialization, replacing the pre-populated map with an empty map. This eliminates default API group versions previously returned by runtime-config generation functions.

Changes

Feature Gate Defaults Removal

Layer / File(s) Summary
Default Configuration
pkg/operator/configobservation/apienablement/observe_runtime_config.go
defaultGroupVersionsByFeatureGate is initialized as an empty map instead of containing MutatingAdmissionPolicy v1alpha1 and v1beta1 entries. Hard-coded default group-version mappings are removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 12
✅ Passed checks (12 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Stable And Deterministic Test Names ✅ Passed This PR contains no Ginkgo tests. The repository uses Go's standard testing package with table-driven tests that have stable, non-dynamic names. The custom check is not applicable.
Test Structure And Quality ✅ Passed Custom check requires reviewing Ginkgo test code. Analysis of all 60 modified test files shows zero Ginkgo usage—all use standard Go testing package. Check is not applicable to this PR.
Microshift Test Compatibility ✅ Passed No new Ginkgo e2e tests are added. The PR only modifies observe_runtime_config.go, a configuration observer, not an e2e test file. The check is not applicable.
Single Node Openshift (Sno) Test Compatibility ✅ Passed No new Ginkgo e2e tests added. PR modifies only operator code and standard Go unit tests for observe_runtime_config. Custom check applies only to new Ginkgo e2e tests.
Topology-Aware Scheduling Compatibility ✅ Passed No scheduling constraints. PR modifies kube-apiserver runtime-config data, not pod deployment manifests or scheduling rules. Not applicable to topology-aware scheduling check.
Ote Binary Stdout Contract ✅ Passed File contains no process-level code (main, init, TestMain, BeforeSuite). No stdout writes exist. Changes are limited to map initialization only.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No Ginkgo e2e tests are added. This PR only modifies operator configuration code (observe_runtime_config.go). The custom check requires new Ginkgo tests to apply.
Title check ✅ Passed The PR title accurately describes the main change: removing MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate, which is the core modification in the changeset.

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

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

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

@openshift-ci openshift-ci Bot requested review from gangwgr and tjungblu May 5, 2026 21:24
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 5, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bertinatto 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 6, 2026

@jubittajohn: all tests passed!

Full PR test history. Your PR dashboard.

Details

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.

@jubittajohn jubittajohn changed the title Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate OCPSTRAT-3036: Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate May 6, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 6, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 6, 2026

@jubittajohn: This pull request references OCPSTRAT-3036 which is a valid jira issue.

Details

In response to this:

MutatingAdmissionPolicy graduated to GA (v1) in Kubernetes 1.36. The v1 API is served natively by kube-apiserver, so the operator no longer needs to manage runtime-config for pre-GA versions(v1alpha1, v1beta1). The version ranges already excluded 1.36+, making this entry a no-op.

Summary by CodeRabbit

  • Bug Fixes
  • Removed pre-populated default API version configurations for feature gates from runtime configuration initialization, requiring explicit configuration for MutatingAdmissionPolicy API versions.

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.

@bertinatto
Copy link
Copy Markdown
Member

/hold

We'll merge this after the 1.36 rebase PR lands.

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 6, 2026
@jubittajohn jubittajohn changed the title OCPSTRAT-3036: Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate OCPBUGS-85181: Remove MutatingAdmissionPolicy from defaultGroupVersionsByFeatureGate May 6, 2026
@openshift-ci-robot openshift-ci-robot added the jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. label May 6, 2026
@openshift-ci-robot
Copy link
Copy Markdown

@jubittajohn: This pull request references Jira Issue OCPBUGS-85181, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (5.0.0) matches configured target version for branch (5.0.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

MutatingAdmissionPolicy graduated to GA (v1) in Kubernetes 1.36. The v1 API is served natively by kube-apiserver, so the operator no longer needs to manage runtime-config for pre-GA versions(v1alpha1, v1beta1). The version ranges already excluded 1.36+, making this entry a no-op.

Summary by CodeRabbit

  • Bug Fixes
  • Removed pre-populated default API version configurations for feature gates from runtime configuration initialization, requiring explicit configuration for MutatingAdmissionPolicy API versions.

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.

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 13, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

PR needs rebase.

Details

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.

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

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants