Skip to content

Commit

Permalink
feat(admin console): save bundle of last run preflight in Admin Conso…
Browse files Browse the repository at this point in the history
…le (#4887)

* feat(admin console): save bundle after running preflights

- Save preflight bundle in /tmp/last-preflight-result directory
- Add collector to store the directory in support bundles

Signed-off-by: Evans Mungai <[email protected]>

* Save troubleshoot version to preflight bundle

Signed-off-by: Evans Mungai <[email protected]>

* Update troubleshoot dep in branch

Signed-off-by: Evans Mungai <[email protected]>

* Update log messages and uncomment BundlePath variable

Signed-off-by: Evans Mungai <[email protected]>

* Handle analysis when storing preflights to bundle in /tmp

Signed-off-by: Evans Mungai <[email protected]>

* Log warning if skipping preflights

Signed-off-by: Evans Mungai <[email protected]>

* Fix checking RBAC error condition

Signed-off-by: Evans Mungai <[email protected]>

* Handle case where not preflight results are collected

Signed-off-by: Evans Mungai <[email protected]>

* analyze.yaml has to be present in local preflight bundle

Signed-off-by: Evans Mungai <[email protected]>

* Update troubleshoot

Signed-off-by: Evans Mungai <[email protected]>

* Run go mod tidy

Signed-off-by: Evans Mungai <[email protected]>

---------

Signed-off-by: Evans Mungai <[email protected]>
  • Loading branch information
banjoh authored Sep 23, 2024
1 parent 53c7dff commit 99b0561
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 55 deletions.
35 changes: 18 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ require (
github.com/replicatedhq/embedded-cluster/kinds v1.14.0
github.com/replicatedhq/kotskinds v0.0.0-20240718194123-1018dd404e95
github.com/replicatedhq/kurlkinds v1.5.0
github.com/replicatedhq/troubleshoot v0.99.0
github.com/replicatedhq/troubleshoot v0.103.0
github.com/replicatedhq/yaml/v3 v3.0.0-beta5-replicatedhq
github.com/robfig/cron v1.2.0
github.com/robfig/cron/v3 v3.0.1
Expand All @@ -65,10 +65,10 @@ require (
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.9.0
github.com/tj/go-spin v1.1.0
github.com/vmware-tanzu/velero v1.14.0
github.com/vmware-tanzu/velero v1.14.1
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.26.0
golang.org/x/crypto v0.27.0
golang.org/x/oauth2 v0.22.0
golang.org/x/sync v0.8.0
google.golang.org/api v0.187.0
Expand All @@ -83,7 +83,7 @@ require (
k8s.io/client-go v0.31.1
k8s.io/cluster-bootstrap v0.31.1
k8s.io/helm v2.17.0+incompatible
k8s.io/kubelet v0.30.3
k8s.io/kubelet v0.31.1
k8s.io/metrics v0.31.1
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8
oras.land/oras-go/v2 v2.5.0
Expand Down Expand Up @@ -225,7 +225,7 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-getter v1.7.5 // indirect
github.com/hashicorp/go-getter v1.7.6 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-safetemp v1.0.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
Expand All @@ -240,10 +240,10 @@ require (
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.3 // indirect
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgtype v1.14.0 // indirect
github.com/jackc/pgx/v4 v4.18.3 // indirect
github.com/jackc/pgx/v5 v5.6.0 // indirect
github.com/jackc/pgx/v5 v5.7.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmoiron/sqlx v1.4.0 // indirect
Expand Down Expand Up @@ -349,7 +349,7 @@ require (
go.opentelemetry.io/contrib/exporters/autoexport v0.46.1 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.53.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel v1.30.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.44.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.44.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
Expand All @@ -358,17 +358,17 @@ require (
go.opentelemetry.io/otel/exporters/prometheus v0.44.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.44.0 // indirect
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.30.0 // indirect
go.opentelemetry.io/otel/sdk v1.30.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.30.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.24.0 // indirect
Expand All @@ -380,9 +380,9 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apiextensions-apiserver v0.31.0 // indirect
k8s.io/apiserver v0.31.0 // indirect
k8s.io/component-base v0.31.0 // indirect
k8s.io/apiextensions-apiserver v0.31.1 // indirect
k8s.io/apiserver v0.31.1 // indirect
k8s.io/component-base v0.31.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240709000822-3c01b740850f // indirect
k8s.io/kubectl v0.31.0 // indirect
Expand All @@ -409,6 +409,7 @@ require (
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/kopia/kopia v0.10.7 // indirect
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 // indirect
github.com/miekg/dns v1.1.58 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
Expand Down
Loading

0 comments on commit 99b0561

Please sign in to comment.