mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
make discovery static when extensions/thirdpartyresources is not enabled
This commit is contained in:
parent
9eaf1aa38f
commit
a09fc73810
@ -115,7 +115,7 @@ func startNamespaceController(ctx ControllerContext) (bool, error) {
|
||||
return true, fmt.Errorf("failed to parse preferred server resources: %v", err)
|
||||
}
|
||||
discoverResourcesFn := namespaceKubeClient.Discovery().ServerPreferredNamespacedResources
|
||||
if _, found := gvrs[extensions.SchemeGroupVersion.WithResource("thirdpartyresource")]; found {
|
||||
if _, found := gvrs[extensions.SchemeGroupVersion.WithResource("thirdpartyresource")]; !found {
|
||||
// make discovery static
|
||||
snapshot, err := discoverResourcesFn()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user