From 23e28995569b1b88d82f53385e4276baae445cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arda=20G=C3=BC=C3=A7l=C3=BC?= Date: Fri, 18 Nov 2022 11:27:54 +0300 Subject: [PATCH] Implement GetSingularName for LegacyBindingREST LegacyBindingREST is only used for `bindings` resource. It is not a subresource and that's why it is required to implement `GetSingularName` function. However, there is no need to implement this function for BindingREST because it is only used for binding subresource. That's why, this function statically adds GetSingularName for LegacyBindingREST. --- pkg/registry/core/pod/storage/storage.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/registry/core/pod/storage/storage.go b/pkg/registry/core/pod/storage/storage.go index 2ec0f3c5615..0109c643bdf 100644 --- a/pkg/registry/core/pod/storage/storage.go +++ b/pkg/registry/core/pod/storage/storage.go @@ -289,6 +289,10 @@ func (r *LegacyBindingREST) Create(ctx context.Context, obj runtime.Object, crea return r.bindingRest.Create(ctx, metadata.GetName(), obj, createValidation, options) } +func (r *LegacyBindingREST) GetSingularName() string { + return "bindings" +} + // StatusREST implements the REST endpoint for changing the status of a pod. type StatusREST struct { store *genericregistry.Store