From bcaaa9e59af1c6efcaadd034f332010301256383 Mon Sep 17 00:00:00 2001 From: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com> Date: Wed, 12 Oct 2022 19:54:40 -0400 Subject: [PATCH] Fix Preflight CheckRBAC (#776) * return collect result instead of nil --- pkg/preflight/collect.go | 3 ++- preflight_default.yaml | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pkg/preflight/collect.go b/pkg/preflight/collect.go index c7af543e..6ee06ba1 100644 --- a/pkg/preflight/collect.go +++ b/pkg/preflight/collect.go @@ -170,7 +170,8 @@ func Collect(opts CollectOpts, p *troubleshootv1beta2.Preflight) (CollectResult, } if foundForbidden && !opts.IgnorePermissionErrors { - return nil, errors.New("insufficient permissions to run all collectors") + collectResult.isRBACAllowed = false + return collectResult, errors.New("insufficient permissions to run all collectors") } // generate a map of all collectors for atomic status messages diff --git a/preflight_default.yaml b/preflight_default.yaml index 8dee1133..28840a05 100644 --- a/preflight_default.yaml +++ b/preflight_default.yaml @@ -4,8 +4,13 @@ metadata: name: modules spec: collectors: - - cpu: {} - # - kernelModules: {} + - logs: + selector: + - app=svclb-traefik + namespace: kube-system + name: backend/container/logs + limits: + maxLines: 1000 analyzers: - clusterVersion: outcomes: