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
Xav Paice
c85bf9a9a6
BREAKING: remove IP address redaction ( #734 )
...
This change removes the IPv4 address redaction which previously ran by default on all
support bundle collections.
Folks that want to redact IPv4 addresses will need to add that redactor manually to their redactor specs.
2022-11-30 08:42:42 +13:00
Evans Mungai
bfb77ad601
feat(collectors): Add TLS parameters to the redis collector ( #870 )
...
feat(collectors): Add mTLS parameters to the redis collector
For a redis collector spec targeting a redis server configured to accept
(m)TLS connections we need to pass in the necessary TLS 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 #746
2022-11-29 17:47:52 +00:00
Chuck D'Antonio
c4c66633e5
Includes virtual memory parameters in Sysctl ( #874 )
...
TL;DR
-----
Updates Sysctl collector and analyzer for virtual memory parameters
Details
-------
Adds supoort for virtual memory parameters to the Sysctl collector and
analyzers. I uncovered this writing a pre-flight for a Helm chart that
includes ECK as a subchart. Since ECK requires a specific minimum value
for `vm.max_map_count` I wanted to use the Sysctl analyzer to check for
the expected value, but wasn't able to because of the limited values it
collected. I also learned that Sonarqube expects the same parameter to
be increased, so it seemed like a general enough requirement to add it
in.
The code updates the collector to collect values under `/proc/sys/vm`
and adds tests to the analyzer to based on the ECK requirements. Making
the tests pass required adding operators to the when expression, since
the existing code only allowed for `=`, `==`, and `===`. The when
expression now supports `>`, `<`, `>=`, and `<=`.
All tests pass.
2022-11-29 12:32:59 -05:00
dependabot[bot]
f13a9598b2
Bump github/codeql-action from 1 to 2 ( #865 )
...
Bumps [github/codeql-action](https://github.com/github/codeql-action ) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases )
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md )
- [Commits](https://github.com/github/codeql-action/compare/v1...v2 )
---
updated-dependencies:
- dependency-name: github/codeql-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>
Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com >
2022-11-28 11:01:12 +13:00
dependabot[bot]
4fa8411259
Bump rajatjindal/krew-release-bot from 0.0.38 to 0.0.43 ( #866 )
...
Bumps [rajatjindal/krew-release-bot](https://github.com/rajatjindal/krew-release-bot ) from 0.0.38 to 0.0.43.
- [Release notes](https://github.com/rajatjindal/krew-release-bot/releases )
- [Changelog](https://github.com/rajatjindal/krew-release-bot/blob/master/.goreleaser.yml )
- [Commits](https://github.com/rajatjindal/krew-release-bot/compare/v0.0.38...v0.0.43 )
---
updated-dependencies:
- dependency-name: rajatjindal/krew-release-bot
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: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com >
2022-11-28 10:59:37 +13:00
Evans Mungai
b693e6650d
chore: Add GH workflow to ensure schemas are generated in a PR ( #872 )
...
* Make file target to check generated schemas
* Add missing yaml tag to Logs struct
* chore: Add GH workflow to ensure schemas are generated in a PR
2022-11-28 10:58:09 +13:00
Dexter Yan
7e3a59cfc0
feat(analyze): add ExcludeFiles field to textAnazlye ( #867 )
...
* feat(analyze): add ExcludeFiles field to textAnazlye
* feat(analyze): fix test for getFiles
* feat(analyze): change function name to excludeFilePaths
* feat(analyze): fix preflight test fail
* feat(analyze): add tests for excludeFiles
* feat(schemas): run make schemas
* feat(analyze): use getChildCollectedFileContents function prototype
* feat(analyze): reduce time complexity
* feat(longhorn): add getFileContents as getCollectedFileContents
2022-11-28 10:45:10 +13:00
Xav Paice
48faf0c144
Revert "Add ghcr to package releases ( #848 )" ( #868 )
...
This reverts commit 233966d4be .
v0.48.1
2022-11-22 17:14:04 +13:00
Evans Mungai
fbbcf87405
feat(collectors): Store all pod logs in cluster-resources directory ( #821 )
...
* feat(collectors): Store all pod logs in cluster-resources directory
All pod logs collected by the logs collector will now be stored in
/cluster-resources/pods/logs/[namespace]/[pod]/[container].log. This
will provide consistency and allow sbctl to find the logs when we run
`kubectl logs <pod>`. To allow backwards compatibility, symlinks of the
log files will be created in the current expected locations.
Closes : #744
v0.48.0
2022-11-22 07:10:34 +13:00
Xav Paice
6530cb364f
feat: Add docsgen command ( #862 )
...
* feat: Add docsgen command
* docs: add CLI docs for support-bundle and preflight
2022-11-21 11:31:08 -05:00
Xav Paice
c9b48aa716
docs: add ADR for mergable preflight specs ( #858 )
...
Adds a proposed Architecture Decision Records for the ability to specify
multiple specs per preflight test.
2022-11-21 11:29:51 -05:00
dependabot[bot]
511671f699
Bump actions/setup-go from 1 to 3 ( #853 )
...
Bumps [actions/setup-go](https://github.com/actions/setup-go ) from 1 to 3.
- [Release notes](https://github.com/actions/setup-go/releases )
- [Commits](https://github.com/actions/setup-go/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: actions/setup-go
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-11-18 18:19:42 +13:00
dependabot[bot]
7a3bcfc74a
Bump actions/download-artifact from 1 to 3 ( #854 )
...
Bumps [actions/download-artifact](https://github.com/actions/download-artifact ) from 1 to 3.
- [Release notes](https://github.com/actions/download-artifact/releases )
- [Commits](https://github.com/actions/download-artifact/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: actions/download-artifact
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-11-18 18:19:16 +13:00
dependabot[bot]
e88f309391
Bump actions/upload-artifact from 1 to 3 ( #855 )
...
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact ) from 1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases )
- [Commits](https://github.com/actions/upload-artifact/compare/v1...v3 )
---
updated-dependencies:
- dependency-name: actions/upload-artifact
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-11-18 18:18:46 +13:00
dependabot[bot]
da48621eff
Bump goreleaser/goreleaser-action from 2 to 3 ( #852 )
...
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action ) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases )
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3 )
---
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-11-18 17:44:56 +13:00
dependabot[bot]
e51a25dc2f
Bump actions/checkout from 2 to 3 ( #856 )
...
Bumps [actions/checkout](https://github.com/actions/checkout ) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases )
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md )
- [Commits](https://github.com/actions/checkout/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: actions/checkout
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-11-18 17:35:55 +13:00
Camila Macedo
7a20aa1934
Add job to dependabot to update github actions ( #851 )
...
* Add job to dependabot to update github actions
2022-11-17 17:09:36 -05:00
Dexter Yan
78bcafe489
fix(flag): fix wrong output filename ( #834 )
...
* fix(flag): fix wrong output filename
* fix(flag): add reset flag function
* fix(flag): add output flag test cases
* fix(flag): move resetFlags function into private go test
* fix(flag): restructure flag tests with testify
* fix(flag): remove resetFlags function
* fix(flag): remove duplicated test and rewrite test names
v0.47.1-rc1
2022-11-17 14:38:01 +13:00
Chris Sanders
233966d4be
Add ghcr to package releases ( #848 )
2022-11-17 11:12:54 +13:00
Camila Macedo
ebc569fcdb
doc/readme : make clear that the links are just examples ( #845 )
...
* doc/readme : make clear that the links are just examples
2022-11-16 19:52:48 +13:00
dependabot[bot]
0521b0e82b
Bump k8s.io/apiserver from 0.25.3 to 0.25.4 ( #837 )
...
Bumps [k8s.io/apiserver](https://github.com/kubernetes/apiserver ) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/apiserver/releases )
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.25.3...v0.25.4 )
---
updated-dependencies:
- dependency-name: k8s.io/apiserver
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>
v0.47.0
2022-11-16 15:55:12 +13:00
dependabot[bot]
34f29f2914
Bump k8s.io/cli-runtime from 0.25.3 to 0.25.4 ( #847 )
...
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime ) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/cli-runtime/releases )
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.25.3...v0.25.4 )
---
updated-dependencies:
- dependency-name: k8s.io/cli-runtime
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>
2022-11-16 15:40:51 +13:00
dependabot[bot]
1de1d00680
Bump github.com/containers/image/v5 from 5.23.0 to 5.23.1 ( #836 )
...
Bumps [github.com/containers/image/v5](https://github.com/containers/image ) from 5.23.0 to 5.23.1.
- [Release notes](https://github.com/containers/image/releases )
- [Commits](https://github.com/containers/image/compare/v5.23.0...v5.23.1 )
---
updated-dependencies:
- dependency-name: github.com/containers/image/v5
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>
2022-11-16 14:59:57 +13:00
dependabot[bot]
92a5f3569f
Bump k8s.io/api from 0.25.3 to 0.25.4 ( #838 )
...
Bumps [k8s.io/api](https://github.com/kubernetes/api ) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/api/releases )
- [Commits](https://github.com/kubernetes/api/compare/v0.25.3...v0.25.4 )
---
updated-dependencies:
- dependency-name: k8s.io/api
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>
2022-11-16 14:59:10 +13:00
dependabot[bot]
495b1a760d
Bump k8s.io/apimachinery from 0.25.3 to 0.25.4 ( #839 )
...
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery ) from 0.25.3 to 0.25.4.
- [Release notes](https://github.com/kubernetes/apimachinery/releases )
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.25.3...v0.25.4 )
---
updated-dependencies:
- dependency-name: k8s.io/apimachinery
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>
2022-11-16 14:58:43 +13:00
dependabot[bot]
7bcfd01d43
Bump k8s.io/client-go from 0.25.3 to 0.25.4 ( #835 )
...
Bumps [k8s.io/client-go](https://github.com/kubernetes/client-go ) from 0.25.3 to 0.25.4.
- [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.3...v0.25.4 )
---
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 >
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-16 14:58:18 +13:00
Camila Macedo
f2ffef80af
Revert "Remove ingress check from https://preflight.replicated.com ( #840 )" ( #846 )
...
This reverts commit a5244a262c .
2022-11-16 14:57:47 +13:00
Camila Macedo
a5244a262c
Remove ingress check from https://preflight.replicated.com ( #840 )
...
## Description:
Currently, when we install an k8s with kurl and we run kubectl preflight https://preflight.replicated.com it will fail:
> ------------
> Check FAIL
> Title: Ingress
> Message: Contour ingress not found!
Therefore, Contour ingress does not seems a pre-requirement to kURL. So, should we have this check in the default example/test?
2022-11-15 08:55:04 -06:00
Camila Macedo
18d9a16ceb
Minimal memory requirement for kURL is 8GI ( #843 )
2022-11-15 08:54:29 -06:00
Xav Paice
473738d709
Add proposal to consolidate collection code ( #810 )
...
Proposal to reduce duplication of code, and implement a more stable, public,
collection API.
2022-11-15 15:50:37 +13:00