From b78a8b03ddf996f4e28985c7521fc3125c052440 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Wed, 18 Mar 2020 12:17:40 -0700 Subject: [PATCH] Check for columns for non-watchable types too --- pkg/controllers/schema/schemas.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkg/controllers/schema/schemas.go b/pkg/controllers/schema/schemas.go index 6e4c7e2..5c1e702 100644 --- a/pkg/controllers/schema/schemas.go +++ b/pkg/controllers/schema/schemas.go @@ -97,6 +97,19 @@ func (h *handler) queueRefresh() { }() } +func isListOrGetable(schema *types.APISchema) bool { + for _, verb := range attributes.Verbs(schema) { + switch verb { + case "list": + return true + case "get": + return true + } + } + + return false +} + func isListWatchable(schema *types.APISchema) bool { var ( canList bool @@ -119,7 +132,7 @@ func (h *handler) getColumns(ctx context.Context, schemas map[string]*types.APIS eg := errgroup.Group{} for _, schema := range schemas { - if !isListWatchable(schema) { + if !isListOrGetable(schema) { continue }