Skip to content

Remove all the code from deprecated v1beta2 API version#630

Open
averevki wants to merge 1 commit into
mainfrom
remove-v1beta2
Open

Remove all the code from deprecated v1beta2 API version#630
averevki wants to merge 1 commit into
mainfrom
remove-v1beta2

Conversation

@averevki

@averevki averevki commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

Remove all the code from deprecated v1beta2 API version of the AuthConfig CRD. Only the current v1beta3 remains now.

Closes #628

Changes

  • Delete api/v1beta2/ package and remove scheme registration from main.go
  • Remove v1beta2 oneOf patches and conversion webhook patch
  • Delete tests/v1beta2/ e2e fixtures and remove v1beta2 from CI test matrix
  • Update GoDoc links and documentation references

Upgrade considerations

v1beta3 has been the current and default API version for a long time. This PR only removes the deprecated v1beta2 code. Users already on v1beta3 — and clusters where Kuadrant was installed after v1beta3 became the CRD storage version — should not experience any issues upgrading.

Users still referencing apiVersion: authorino.kuadrant.io/v1beta2 in their AuthConfig manifests must migrate to v1beta3 before upgrading.

Clusters where v1beta2 was previously the storage version may need to patch the CRD storedVersions:

kubectl patch crd authconfigs.authorino.kuadrant.io --type=json -p='[{"op":"replace","path":"/status/storedVersions","value":["v1beta3"]}]'

Summary by CodeRabbit

Release Notes

  • Refactor

    • Discontinued v1beta2 API version support; v1beta3 is now the only supported version.
    • Removed webhook-based CRD conversion mechanism.
  • Documentation

    • Updated all documentation, guides and configuration examples to exclusively reference v1beta3.
    • Updated CRD validation rules and patterns for v1beta3.

@averevki averevki self-assigned this Jun 15, 2026
@averevki averevki moved this to Ready For Review in Kuadrant Jun 15, 2026
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 68406634-5466-4bfb-8a17-ec8b62d49425

📥 Commits

Reviewing files that changed from the base of the PR and between 9b55ef2 and ab687a6.

📒 Files selected for processing (14)
  • AGENTS.md
  • PROJECT
  • api/v1beta2/auth_config_types.go
  • api/v1beta2/groupversion_info.go
  • api/v1beta2/zz_generated.deepcopy.go
  • docs/features.md
  • docs/user-guides/validating-webhook.md
  • install/crd/authorino.kuadrant.io_authconfigs.yaml
  • install/crd/kustomization.yaml
  • install/crd/patches/oneof_in_authconfigs.yaml
  • install/crd/patches/webhook_in_authconfigs.yaml
  • install/manifests.yaml
  • main.go
  • tests/cel/README.md
💤 Files with no reviewable changes (7)
  • install/crd/kustomization.yaml
  • install/crd/patches/webhook_in_authconfigs.yaml
  • api/v1beta2/groupversion_info.go
  • api/v1beta2/zz_generated.deepcopy.go
  • PROJECT
  • main.go
  • api/v1beta2/auth_config_types.go
✅ Files skipped from review due to trivial changes (3)
  • tests/cel/README.md
  • docs/user-guides/validating-webhook.md
  • docs/features.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • install/crd/patches/oneof_in_authconfigs.yaml

📝 Walkthrough

Walkthrough

Removes the v1beta2 AuthConfig API entirely: deletes the api/v1beta2 Go package (~2,300 lines), unregisters it from the controller-runtime scheme in main.go, removes the CRD conversion webhook patch, collapses all CRD oneOf JSONPatch operations to spec.versions[0], and updates documentation links and developer guidance to reference only v1beta3.

Changes

v1beta2 API Removal

Layer / File(s) Summary
Delete v1beta2 Go API package and scheme registration
PROJECT, main.go
PROJECT records the AuthConfig resource version as v1beta3. main.go removes the v1beta2 import and its AddToScheme call so the runtime scheme registers only v1beta3 types. (The deleted api/v1beta2/ source files themselves carry no surviving rangeIds in this diff.)
Collapse CRD oneOf patches to spec.versions[0] and remove conversion webhook
install/crd/kustomization.yaml, install/crd/patches/oneof_in_authconfigs.yaml, install/crd/patches/webhook_in_authconfigs.yaml
kustomization.yaml activates the oneof_in_authconfigs.yaml patch (replacing commented scaffold). The patch retargets all JSONPatch op: add operations from spec.versions[1] to spec.versions[0], adds predicate to oneOf branches across authentication, metadata, authorization, response.success, and all when locations. The conversion webhook patch (webhook_in_authconfigs.yaml) is fully deleted.
Update documentation, developer guidance, and webhook example to v1beta3
AGENTS.md, docs/features.md, docs/user-guides/validating-webhook.md, tests/cel/README.md
All pkg.go.dev feature heading links in docs/features.md are retargeted from v1beta2 to v1beta3. The ValidatingWebhookConfiguration example targets apiVersions: ["v1beta3"]. AGENTS.md repository map, Key Packages, and API Versions sections are rewritten to a single v1beta3 entry. CEL test README references only api/v1beta3/auth_config_types.go.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Kuadrant/authorino#624: Overlaps directly with changes to install/crd/patches/oneof_in_authconfigs.yaml and AuthConfig CRD validation rules across v1beta2/v1beta3.
  • Kuadrant/authorino#631: Tackles the same v1beta2 deprecation work — marks v1beta2 as unserved (served: false) in the CRD as a precursor step.
  • Kuadrant/authorino#632: Part of the same v1beta2v1beta3 migration, modifying the api/v1beta2 types in a backport context.

Suggested reviewers

  • thomasmaas
  • guicassolato

Poem

🐇 Hop, hop — one version remains!
v1beta2 has left the lane,
The scheme now holds a single truth,
v1beta3, forever youth.
Less cruft to carry, patches lean —
The cleanest CRD you've ever seen! 🌟

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarises the main objective of the PR: removing the deprecated v1beta2 API version code entirely.
Linked Issues check ✅ Passed The PR comprehensively addresses all coding requirements from issue #628: deletion of api/v1beta2 package, v1beta2 scheme registration removal, CRD patch updates, and documentation reference updates.
Out of Scope Changes check ✅ Passed All changes align with the documented scope in issue #628. The PR removes v1beta2 code references, updates documentation, and modifies CRD patches as specified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-v1beta2

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.

@guicassolato guicassolato left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Sorry, @averevki. Although I really appreciate you having sent this PR and removing v1beta2 straight away being how I personally would like to proceed indeed, TIL that OLM might actually block us from doing that:

OLM will not allow a serving version of CRD to be removed right away. Instead, a deprecated version of CRD should have been disabled first by marking Served field in CRD to false first. Then, the non-serving version can be removed on the subsequent CRD upgrade.

https://github.com/operator-framework/operator-lifecycle-manager/blob/master/doc/design/dependency-resolution.md#deprecateremove-a-version-of-crd

Let's put this PR on hold for a while and provide users with a smoother upgrade path instead by first flipping v1beta2 to served: false, then completely remove it from the CRD in a consecutive release.

Signed-off-by: averevki <sandyverevkin@gmail.com>
@eguzki

eguzki commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

This is good to go now. The v1beta2 has been marked as served=false in previous releases.

Branch PR Title Merged
main #326 Update Authorino manifests 2026-06-18
release-0.23 #322 Update Authorino manifests to v0.24.2 for v0.23.3 patch release 2026-06-22
release-0.24 #323 Update Authorino manifests to v0.25.1 for v0.24.1 patch release 2026-06-23
release-0.25 #324 Update Authorino manifests to v0.26.1 for v0.25.1 patch release 2026-06-23

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

Labels

None yet

Projects

Status: Ready For Review

Development

Successfully merging this pull request may close these issues.

Completely remove deprecated AuthConfig CRD v1beta2 version

3 participants