Check for columns for non-watchable types too

This commit is contained in:
Darren Shepherd 2020-03-18 12:17:40 -07:00
parent eda3ecf987
commit b78a8b03dd

View File

@ -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 { func isListWatchable(schema *types.APISchema) bool {
var ( var (
canList bool canList bool
@ -119,7 +132,7 @@ func (h *handler) getColumns(ctx context.Context, schemas map[string]*types.APIS
eg := errgroup.Group{} eg := errgroup.Group{}
for _, schema := range schemas { for _, schema := range schemas {
if !isListWatchable(schema) { if !isListOrGetable(schema) {
continue continue
} }