fix: promotes keycloak and realm import to v2beta1 #45840
Draft
+5,228
−298
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes: #45795
repackages the existing CRDs as v2beta1.
A custom CRD post-processor is used to reintroduce an identical non-stored v2alpha1. As I don't anticipate introducing a difference between the two, this seems fine. The only other thing that needed done is to make the CSV aware of the alternative version - which is being done via a script rather than via josdk logic.
If this approach seems valid, we'll need additional docs / notes alerting customers that v2alpha1 is deprecated and truly only for alpha use for Keycloak and RealmImports.
If / when we want to drop v2alpha1, olm will prevent this unless all of the stored versions have been updated: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#version-removal
Just letting the operator run should update the stored versions, but the update can also be done manually if needed: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#upgrade-existing-objects-to-a-new-stored-version