make dynamic client slightly easier to use

This commit is contained in:
David Eads
2018-04-27 11:29:05 -04:00
parent 03c5f298f3
commit 5ff923c7f9
10 changed files with 28 additions and 21 deletions

View File

@@ -183,7 +183,7 @@ func createRandomCustomResourceDefinition(
// Get a client for the custom resource.
gvr := schema.GroupVersionResource{Group: definition.Spec.Group, Version: definition.Spec.Version, Resource: definition.Spec.Names.Plural}
resourceClient := dynamicClient.NamespacedResource(gvr, namespace)
resourceClient := dynamicClient.Resource(gvr).Namespace(namespace)
return definition, resourceClient
}