mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	make discovery static when extensions/thirdpartyresources is not enabled
This commit is contained in:
		@@ -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 {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user