mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-31 14:54:27 +00:00
add subresources for custom resources
Kubernetes-commit: 6fbe8157e39f6bd7ad885a8a6f8614e2fe45dc5e
This commit is contained in:
parent
35f61b2f03
commit
5cf3fd5ef1
@ -280,6 +280,7 @@ func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error
|
||||
Watch()
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched resource.
|
||||
func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) {
|
||||
result := new(unstructured.Unstructured)
|
||||
resourceName, subresourceName := rc.parseResourceSubresourceName()
|
||||
|
@ -99,7 +99,7 @@ func fakeScaleClient(t *testing.T) (ScalesGetter, []schema.GroupResource) {
|
||||
|
||||
restMapperRes, err := discovery.GetAPIGroupResources(fakeDiscoveryClient)
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v")
|
||||
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v", err)
|
||||
}
|
||||
restMapper := discovery.NewRESTMapper(restMapperRes, apimeta.InterfacesForUnstructured)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user