Skip to content

Commit

Permalink
UPSTREAM: <carry>: kube-apiserver: priorize some CRD groups over others
Browse files Browse the repository at this point in the history
OpenShift-Rebase-Source: 2260f01
  • Loading branch information
deads2k authored and sairameshv committed Dec 3, 2023
1 parent bee6a8c commit b4ff82f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Expand Up @@ -221,8 +221,8 @@ func (c *crdRegistrationController) handleVersionUpdate(groupVersion schema.Grou
Spec: v1.APIServiceSpec{
Group: groupVersion.Group,
Version: groupVersion.Version,
GroupPriorityMinimum: 1000, // CRDs should have relatively low priority
VersionPriority: 100, // CRDs will be sorted by kube-like versions like any other APIService with the same VersionPriority
GroupPriorityMinimum: getGroupPriorityMin(groupVersion.Group), // CRDs should have relatively low priority
VersionPriority: 100, // CRDs will be sorted by kube-like versions like any other APIService with the same VersionPriority
},
})
return nil
Expand Down
12 changes: 12 additions & 0 deletions pkg/controlplane/controller/crdregistration/patch.go
@@ -0,0 +1,12 @@
package crdregistration

func getGroupPriorityMin(group string) int32 {
switch group {
case "config.openshift.io":
return 1100
case "operator.openshift.io":
return 1080
default:
return 1000
}
}

0 comments on commit b4ff82f

Please sign in to comment.