Skip to content

Commit 5ab5f98

Browse files
nikhitak8s-publishing-bot
authored andcommitted
add subresources for custom resources
Kubernetes-commit: 6fbe8157e39f6bd7ad885a8a6f8614e2fe45dc5e
1 parent ef0fd62 commit 5ab5f98

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dynamic/client.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ func (rc *ResourceClient) Watch(opts metav1.ListOptions) (watch.Interface, error
280280
Watch()
281281
}
282282

283+
// Patch applies the patch and returns the patched resource.
283284
func (rc *ResourceClient) Patch(name string, pt types.PatchType, data []byte) (*unstructured.Unstructured, error) {
284285
result := new(unstructured.Unstructured)
285286
resourceName, subresourceName := rc.parseResourceSubresourceName()

scale/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func fakeScaleClient(t *testing.T) (ScalesGetter, []schema.GroupResource) {
9999

100100
restMapperRes, err := discovery.GetAPIGroupResources(fakeDiscoveryClient)
101101
if err != nil {
102-
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v")
102+
t.Fatalf("unexpected error while constructing resource list from fake discovery client: %v", err)
103103
}
104104
restMapper := discovery.NewRESTMapper(restMapperRes, apimeta.InterfacesForUnstructured)
105105

0 commit comments

Comments
 (0)