Commit a09fc738 authored by zhouhaibing089's avatar zhouhaibing089 Committed by haibzhou

make discovery static when extensions/thirdpartyresources is not enabled

parent 9eaf1aa3
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment