Diamon Wiggins
2fcdc77cd3
Standardize Cluster Resources Collector File Paths ( #971 )
...
* using const for cluster resources k8s objects to standardize directories and files
2023-01-25 13:34:15 -05:00
Ethan Mosbaugh
ad1a56251f
feat(hostpreflights): udp port status ( #981 )
...
* feat(hostpreflights): udp port status
* fix(hostpreflights): tcpPortStatus -> udpPortStatus
v0.55.0
2023-01-24 16:38:54 -05:00
dependabot[bot]
cf4eed1110
chore(deps): bump github.com/fatih/color from 1.13.0 to 1.14.1 ( #980 )
...
Bumps [github.com/fatih/color](https://github.com/fatih/color ) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases )
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.1 )
---
updated-dependencies:
- dependency-name: github.com/fatih/color
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-24 17:40:35 +13:00
dependabot[bot]
4939559789
chore(deps): bump k8s.io/client-go from 0.26.0 to 0.26.1 ( #979 )
...
* chore(deps): bump k8s.io/client-go from 0.26.0 to 0.26.1
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go ) from 0.26.0 to 0.26.1.
- [Release notes](https://github.com/kubernetes/client-go/releases )
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md )
- [Commits](https://github.com/kubernetes/client-go/compare/v0.26.0...v0.26.1 )
---
updated-dependencies:
- dependency-name: k8s.io/client-go
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update schemas following client-go update
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xav Paice <xav@replicated.com >
2023-01-24 17:37:00 +13:00
Nathan Sullivan
533d2917a9
CONTRIBUTING.md - fix path for design principles doc ( #975 )
...
Update CONTRIBUTING.md
fix path for design principles doc
2023-01-20 08:25:28 -06:00
Evans Mungai
c8d9864235
Upgrade dependencies ( #959 )
...
* Upgrade docker distribution module
* Upgrade github.com/blang/semver dependency
* Upgrade github.com/godbus/dbus dependency
2023-01-13 10:32:39 +00:00
Nathan Sullivan
827c49ca00
adding test coverage for preflight.RunPreflights() ( #949 )
...
* adding test coverage for preflight.RunPreflights()
TDD to work on https://github.com/replicatedhq/troubleshoot/issues/906
and verify the fix is successful
* go.mod/go.sum: removing gnomock stuff since it's not in use (yet)
* Makefile: try running the preflight integration test with the e2e tests,
since there's a K3s instance in place already
* Makefile add a dedicated test-integration task, which runs as it's own
github action job
* Makefile: exclude a few things from test-integration that break the
github action job
* WIP on preflight tests, addressing some of @banjoh's feedback, more to
go though (specifically changing over to using assert)
* preflight tests: use the testify libraries, restructure code to be
formatted more like other tests in this project
2023-01-13 08:22:57 +10:00
Nathan Sullivan
de0371053a
preflight: ensure --output produces an output file of the desired format ( #951 )
2023-01-13 07:55:47 +10:00
dependabot[bot]
2b4bcd2433
chore(deps): bump oras.land/oras-go from 1.2.1 to 1.2.2 ( #956 )
...
* chore(deps): bump oras.land/oras-go from 1.2.1 to 1.2.2
Bumps [oras.land/oras-go](https://github.com/oras-project/oras-go ) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/oras-project/oras-go/releases )
- [Commits](https://github.com/oras-project/oras-go/compare/v1.2.1...v1.2.2 )
---
updated-dependencies:
- dependency-name: oras.land/oras-go
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
* chore(deps): bump oras.land/oras-go from 1.2.1 to 1.2.2
Bumps [oras.land/oras-go](https://github.com/oras-project/oras-go ) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/oras-project/oras-go/releases )
- [Commits](https://github.com/oras-project/oras-go/compare/v1.2.1...v1.2.2 )
---
updated-dependencies:
- dependency-name: oras.land/oras-go
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evans Mungai <evans@replicated.com >
2023-01-10 13:56:56 +00:00
dependabot[bot]
d9f4dca6b7
chore(deps): bump github.com/shirou/gopsutil/v3 from 3.22.11 to 3.22.12 ( #957 )
...
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil ) from 3.22.11 to 3.22.12.
- [Release notes](https://github.com/shirou/gopsutil/releases )
- [Commits](https://github.com/shirou/gopsutil/commits/v3.22.12 )
---
updated-dependencies:
- dependency-name: github.com/shirou/gopsutil/v3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 13:48:50 +00:00
dependabot[bot]
76922ee59b
chore(deps): bump sigs.k8s.io/controller-runtime from 0.13.1 to 0.14.1 ( #955 )
...
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime ) from 0.13.1 to 0.14.1.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases )
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md )
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.13.1...v0.14.1 )
---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 13:42:15 +00:00
dependabot[bot]
4965941ea9
chore(deps): bump github.com/mattn/go-isatty from 0.0.16 to 0.0.17 ( #954 )
...
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty ) from 0.0.16 to 0.0.17.
- [Release notes](https://github.com/mattn/go-isatty/releases )
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.16...v0.0.17 )
---
updated-dependencies:
- dependency-name: github.com/mattn/go-isatty
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 11:46:01 +00:00
Diamon Wiggins
18c4a39826
chore: Use org secret for username ( #953 )
...
use org secret for username
2023-01-10 11:37:07 +00:00
Dexter Yan
962e2c7d7e
feat(support-bundle): optimize the error log of ceph and longhorn when kURL add-on were not enabled ( #943 )
2023-01-10 09:37:42 +13:00
Xav Paice
f1066f5d76
CVE: bump golang.org/x/net ( #948 )
...
Resolves code scanning alert 19
Resolves Vulnerability CVE-2022-41717
2023-01-09 16:05:52 -04:00
Evans Mungai
70af0ff3d0
fix: Collect logs from all pods specified in logs collector spec ( #952 )
...
Fixes : #945
v0.54.0
2023-01-09 12:04:01 -04:00
dependabot[bot]
4601db58f9
Bump k8s.io/cli-runtime from 0.25.4 to 0.26.0 ( #900 )
...
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime ) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/cli-runtime/releases )
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.25.4...v0.26.0 )
---
updated-dependencies:
- dependency-name: k8s.io/cli-runtime
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 15:44:38 +13:00
dependabot[bot]
ddc07e1205
Bump k8s.io/apiserver from 0.25.4 to 0.26.0 ( #901 )
...
Bumps [k8s.io/apiserver](https://github.com/kubernetes/apiserver ) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/apiserver/releases )
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.25.4...v0.26.0 )
---
updated-dependencies:
- dependency-name: k8s.io/apiserver
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 15:27:31 +13:00
dependabot[bot]
251fcc6dec
Bump k8s.io/client-go from 0.25.4 to 0.26.0 ( #902 )
...
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go ) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/client-go/releases )
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md )
- [Commits](https://github.com/kubernetes/client-go/compare/v0.25.4...v0.26.0 )
---
updated-dependencies:
- dependency-name: k8s.io/client-go
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-09 15:05:57 +13:00
dependabot[bot]
75eb0d7f89
Bump k8s.io/api from 0.25.4 to 0.26.0 ( #904 )
...
* Bump k8s.io/api from 0.25.4 to 0.26.0
Bumps [k8s.io/api](https://github.com/kubernetes/api ) from 0.25.4 to 0.26.0.
- [Release notes](https://github.com/kubernetes/api/releases )
- [Commits](https://github.com/kubernetes/api/compare/v0.25.4...v0.26.0 )
---
updated-dependencies:
- dependency-name: k8s.io/api
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
* update schemas
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Xav Paice <xav@replicated.com >
2023-01-09 14:17:57 +13:00
Edgar Lanting
199efca2ea
Added note in to clarify purpose of MaxBytes in cluster_resources.go ( #946 )
2023-01-09 10:00:12 +13:00
Edgar Lanting
a442ac8fc4
BREAKING: (Feature) maximum pod log size limit
...
introduces a new option to limit the size of a pod log when added to the bundle. This will make sure the support bundle will not grow to an unacceptable size and thus might contain information that is too old.
The maximum size of a pod log in a bundle is set by default to 5MB, and can be changed if we decide upon the need.
BREAKING CHANGE: any logs that are collected by the logs collector are now limited by default to 5MB unless a different size limit is specified. Folks expecting log files larger than that to be collected without truncation will need to adjust their support bundle specs.
Fixes : #878
2023-01-05 16:23:43 +13:00
Evans Mungai
a31e2ff1b9
chore: Add CLI flags to enable CPU & memory profiling ( #926 )
...
Allow collecting of CPU and memory diagnostics when running troubleshoot CLI applications using --memprofile and --cpuprofile flags. These flags accept file paths if where to store the collected runtime data
2023-01-04 11:56:07 +00:00
Nathan Sullivan
87c153cc8c
preflight: add yaml output format ( #940 )
...
* preflight: add yaml output format
ref https://github.com/replicatedhq/troubleshoot/issues/905
v0.53.0
2023-01-04 14:27:00 +13:00
Nathan Sullivan
8ba5d6f6cb
GitHub Action goreleaser-test - convert to a matrix ( #942 )
...
github action goreleaser-test: convert to a matrix
2023-01-04 14:15:49 +13:00
Evans Mungai
a523551da9
feat(redactors): Run redactors on an existing support bundle ( #887 )
...
* feat(redactors): Run redactors on an existing support bundle
Add redact subcommand to support-bundle to allow running redactors on an
existing bundle to creating a new redacted bundle.
The command will be launched like so
support-bundle redact <redactor urls> --bundle support-bundle.tar.gz
Fixes : #705
2023-01-03 18:05:15 +00:00
Nathan Sullivan
d73d5c6a3a
preflight: fix segfault when collector's are not defined in YAML ( #939 )
...
* preflight: fix segfault when collector's are not defined in YAML
* fix bug with kind: Preflight specs with uploadResultsTo, wrong variable being used :)
ref https://github.com/replicatedhq/troubleshoot/pull/894
Co-authored-by: Evans Mungai <evans@replicated.com >
2023-01-03 14:01:49 -04:00
dependabot[bot]
8cb922c3b9
Bump mheap/github-action-required-labels from 2 to 3 ( #938 )
...
Bumps [mheap/github-action-required-labels](https://github.com/mheap/github-action-required-labels ) from 2 to 3.
- [Release notes](https://github.com/mheap/github-action-required-labels/releases )
- [Commits](https://github.com/mheap/github-action-required-labels/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: mheap/github-action-required-labels
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evans Mungai <evans@replicated.com >
2023-01-03 16:35:35 +00:00
Nathan Sullivan
94dd7a670c
Improve build-test-deploy GitHub Actions performance ( #941 )
...
* github build-test-deploy workflow: split goreleaser-test into 3 actions,
one for each ID/component (sharing a single config file)
rationale: speeding up github actions, goreleaser-test was taking
12-14mins and is the outlier longest to execute right now on this repo
* Revert "gitlab build-test-deploy workflow: split goreleaser-test into 3 actions,"
This reverts commit 61083dbbb8 .
* github build-test-deploy workflow: split into 6 actions, divided by
GOARCH/GOOS
rationale: improve performance of checks on PR's
* .goreleaser.yaml - add a breadcrumb to ensure we keep the action jobs
list aligned
2023-01-03 13:07:10 +00:00
ada mancini
0f2892c316
add cpuArchitecture filter to nodeResources collector ( #930 )
...
* filter on cpu architecture
* filter by cpu architecture
* fail if we dont have a label match too
* add tests for cpu arch filter
* update for make schemas
v0.52.0
2022-12-29 12:17:11 -05:00
Xav Paice
df43c9fc21
If no pods are selected for log collector, do not wait for timeout ( #932 )
...
Fixes : #931
v0.51.1
2022-12-29 11:17:54 +13:00
Evans Mungai
ebeed77287
chore: Upgrade gopsutil to v3 ( #927 )
...
* Add host collector tests related to gopsutil upgrade
* Upgrade gopsutil to v3
2022-12-24 13:42:13 +13:00
Craig O'Donnell
bc6528908f
fix: collect rbac permissions error ( #928 )
v0.51.0
2022-12-24 09:13:38 +13:00
ada mancini
e2053a00a2
rename the troubleshoot label to "support-bundle" ( #918 )
2022-12-22 19:00:05 -03:00
David Rohnow
421cccf919
Add timeout context log collector ( #914 )
2022-12-22 10:23:37 +13:00
Dexter Yan
be26462c19
feat(cluster_resources): increase default client burst and qps ( #920 )
...
* feat(collect): add client burst and qps
2022-12-22 09:49:42 +13:00
Xav Paice
13534bf7fd
Minor format change to README.md ( #924 )
2022-12-21 08:34:16 -06:00
dependabot[bot]
60b4931295
Bump goreleaser/goreleaser-action from 3 to 4 ( #919 )
...
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action ) from 3 to 4.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases )
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v3...v4 )
---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-21 14:35:58 +13:00
danj-replicated
e48fa36eaf
Add generic kubernetes resource analyzer ( #780 )
...
* First draft of a generic cluster-resource analyzer
* Add more resource mappings
* Support some cluster-scoped resources
the structure of this could probably be a bit tidyer, but this now
allows us to target non-namespaced resources simply by not specifying
the namespace in the analyzer.
* General tidy up
* pull resource selection into it's own function
* remove pointless pointer to string
* Export findResource function
This lets other analyzers use it.
* Add tests for cluster resources analyzer
* Update schemas
* Address some of @banjoh's comments
* rework resource selection
thanks @banjoh
* Replace FindFiles with GetFile
Since we already know where we're looking for files,
it doesn't make sense to have to loop over a single item slice.
* Use assert instead of require
* format
* Change default behaviour for no namespace
Now not providing a namespace causes us to default to "default", with an
explicit bool to toggle cluster-scoped resource checking.
This should feel somewhat more intuitive when writing analyzers that use
this function
* Generate schemas
* Value → expectedValue
2022-12-19 11:31:43 -04:00
Diamon Wiggins
f2be6f5829
Allow Preflight CLI to consume multiple specs as input ( #894 )
...
To keep both the Support Bundle and Preflight CLIs similar, this PR adds the ability for the Preflight binary to allow multiple specs be provided as CLI args and for them all to be run.
v0.50.0
2022-12-14 14:50:01 -04:00
Evans Mungai
cd1511a8fb
fix(collectors): store unhealthy pod logs correctly ( #909 )
...
The symlinking logs feature led to a regression where symlinks of
unhealthy pods were overwritting logs in the support bundle. This
fix allows the cluster resources collector to instruct the logs
collector not to symlink logs, which in turn ensures logs are not
overwritten.
Fixes : #908
2022-12-14 14:47:20 -04:00
Diamon Wiggins
9c77a0e3da
Add sbctl integration proposal and move design directory into docs ( #893 )
...
* add sbctl integration proposal and move design directory into docs
Co-authored-by: Evans Mungai <evans@replicated.com >
2022-12-14 14:52:40 +13:00
Xav Paice
c8820b3d8e
chore: update containerd to v1.6.12 ( #896 )
...
Fixes: CVE-2022-23471
2022-12-09 16:48:37 -04:00
Xav Paice
cf3a292877
Add proposal for concurrent collection ( #809 )
...
* Add proposal for concurrent collection
Design proposal for running collectors concurrently instead of sequentially.
* Update concurrent collector proposal with PR feedback
2022-12-09 16:48:09 -04:00
Diamon Wiggins
a4c4b24056
Deduplication for Cluster Resources Collector ( #832 )
...
* add dedup for cluster resources collector
* restructure both collect.go in both pkg/supportbundle and pkg/preflight to be more similar for eventual refactor
2022-12-07 15:10:31 -04:00
dependabot[bot]
e9f386a840
Bump github.com/jackc/pgx/v5 from 5.1.1 to 5.2.0 ( #890 )
...
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx ) from 5.1.1 to 5.2.0.
- [Release notes](https://github.com/jackc/pgx/releases )
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md )
- [Commits](https://github.com/jackc/pgx/compare/v5.1.1...v5.2.0 )
---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 12:37:53 +00:00
dependabot[bot]
d96b2ded78
Bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0 ( #889 )
...
Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql ) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/go-sql-driver/mysql/releases )
- [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md )
- [Commits](https://github.com/go-sql-driver/mysql/compare/v1.6.0...v1.7.0 )
---
updated-dependencies:
- dependency-name: github.com/go-sql-driver/mysql
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 11:39:12 +00:00
Evans Mungai
8c31e61367
fix(collectors): Fix logs collection in longhorn collector ( #886 )
...
* fix(collectors): Fix logs collection in longhorn collector
* Small typo
* Run go fmt on added changes
v0.49.1
2022-12-02 12:51:07 -05:00
Evans Mungai
8e174fb46c
chore: Update PR template ( #880 )
2022-12-01 11:26:17 +00:00
Evans Mungai
2a61a8686a
feat(collectors): Add TLS parameters to the postgres collector ( #875 )
...
For a postgres collector spec targeting a server configured to accept
(m)TLS connections we need to pass in the necessary parameters in order
to successfully connect to the server. Both preflight and support bundle
specs use this collector.
This change allows us to pass in the necessary TLS parameters via inlined
TLS configuration or via a secret reference.
Fixes #747
v0.49.0
2022-11-30 15:52:08 +13:00