[release-4.22] fix: skip CRD check for built-in Kubernetes API groups - #343
Merged
openshift-merge-bot[bot] merged 1 commit intoAug 25, 2026
Conversation
michalskrivanek
left a comment
Contributor
There was a problem hiding this comment.
maybe it could be just a comment and the code could be simpler?
crdNameFromGVK was treating any apiVersion with a "/" as a CRD, so groups like apps, batch, and rbac.authorization.k8s.io would produce spurious CRD names (e.g. "deployments.apps") and cause assets to be skipped with "CRD not installed" errors. Fix uses the .k8s.io/.apiserver.k8s.io suffix to identify Kubernetes-owned groups, with an explicit allowlist for the legacy groups (apps, batch, policy, autoscaling) that predate that naming convention. Also guard IsManagedCRD against an empty crdName to avoid a false match if any asset has an empty RequiredCRD field. (cherry picked from commit 7b53e43) Co-Authored-By: Nir Dothan <nirdothan@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Simone Tiraboschi <stirabos@redhat.com>
tiraboschi
force-pushed
the
r422_crd-name-from-gvk-builtin-groups
branch
from
August 25, 2026 15:51
a696dec to
d205c58
Compare
michalskrivanek
approved these changes
Aug 25, 2026
Member
Author
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiraboschi 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 |
openshift-merge-bot
Bot
merged commit Aug 25, 2026
69ec5dc
into
openshift-virtualization:release-4.22
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
crdNameFromGVK was treating any apiVersion with a "/" as a CRD, so groups like apps, batch, and rbac.authorization.k8s.io would produce spurious CRD names (e.g. "deployments.apps") and cause assets to be skipped with "CRD not installed" errors.
Fix uses the .k8s.io suffix to identify Kubernetes-owned groups, with an explicit allowlist for the legacy groups (apps, batch, policy, autoscaling) that predate that naming convention.
Also guard IsManagedCRD against an empty crdName to avoid a false match if any asset has an empty RequiredCRD field.
(cherry picked from commit 7b53e43)
This is manual cherry-pick of #191