Commit Graph

1477 Commits

Author SHA1 Message Date
Dexter Yan
531edf42e2 feat(support-bundle): add host certificate collector and analyzer (#1132) v0.70.0 2023-07-17 17:05:05 +12:00
Dexter Yan
f69ae77bc3 feat(analyzer): add detailed message for unhealthy pod (#1261)
* feat(analyzer): add detailed message for unhealthy pod
2023-07-17 08:01:40 +12:00
David Morgan
b02d12ff1e JSONPath support for json compare analyzer (#1244)
This adds JSONPath support to the json compare analyzer using
k8s.io/client-go/util/jsonpath implementation.

To preserve backwards compatibility a new attribute, `JsonPath, is added
to the compare analyzer as opposed to changing how `Path` works. Only
one should be set, but preference is given to `Path`, again to maintain
backwards compatibility.

As a convience for users, if the result of running the JSONPath
expression returns a single value, that value is unwrapped from its
enclosing array and used as the comparison with `Value`. This isn't
strictly compatible with how JSONPath works (all results are wrapped in
an array), but it's easier for end users who are expecting a single
result from their JSONPath expression.
2023-07-10 13:02:00 -04:00
Martin Hrabovcin
24822b7f95 fix(collector): cluster-resources PV filename pattern (#1262) 2023-07-10 12:53:56 -04:00
Dexter Yan
784918e7ee feat(preflight): adding warning message when validating the content of preflight and host preflight spec (#1250) v0.69.3 2023-07-06 16:10:16 +12:00
dependabot[bot]
819dd5fc26 chore(deps): bump github.com/mitchellh/go-wordwrap from 1.0.0 to 1.0.1 (#1260)
Bumps [github.com/mitchellh/go-wordwrap](https://github.com/mitchellh/go-wordwrap) from 1.0.0 to 1.0.1.
- [Commits](https://github.com/mitchellh/go-wordwrap/compare/v1.0.0...v1.0.1)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/go-wordwrap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nathan Sullivan <nathans@replicated.com>
2023-07-06 15:53:25 +12:00
dependabot[bot]
27e06517bf chore(deps): bump golang.org/x/text from 0.10.0 to 0.11.0 (#1259)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 13:11:44 +10:00
dependabot[bot]
d14e0dd18c chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.5 to 3.23.6 (#1258)
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.5 to 3.23.6.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v3.23.5...v3.23.6)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 14:55:10 +12:00
dependabot[bot]
d7b3dd8abb chore(deps): bump github.com/microsoft/go-mssqldb from 1.1.0 to 1.3.0 (#1255)
Bumps [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) from 1.1.0 to 1.3.0.
- [Release notes](https://github.com/microsoft/go-mssqldb/releases)
- [Changelog](https://github.com/microsoft/go-mssqldb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/go-mssqldb/compare/v1.1.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/microsoft/go-mssqldb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 14:52:41 +12:00
Evans Mungai
f64d98b5c3 feat(examples): loading troubleshoot specs from helm chart example (#1252)
* feat(examples): loading troubleshoot specs from helm chart example
2023-06-29 13:31:59 +12:00
Dexter Yan
f0efbf658a fix(message): solve the terminal UI issue of truncating the message if it is long (#1242) v0.69.2 2023-06-28 11:06:15 +12:00
dependabot[bot]
ec2d14a7ad chore(deps): bump k8s.io/apiserver from 0.27.2 to 0.27.3 (#1247)
Bumps [k8s.io/apiserver](https://github.com/kubernetes/apiserver) from 0.27.2 to 0.27.3.
- [Commits](https://github.com/kubernetes/apiserver/compare/v0.27.2...v0.27.3)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:56:02 +01:00
dependabot[bot]
6385a1247f chore(deps): bump k8s.io/cli-runtime from 0.27.2 to 0.27.3 (#1246)
Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.27.2 to 0.27.3.
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.27.2...v0.27.3)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:38:34 +01:00
dependabot[bot]
80a946d0c2 chore(deps): bump golang.org/x/sync from 0.2.0 to 0.3.0 (#1245)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.2.0 to 0.3.0.
- [Commits](https://github.com/golang/sync/compare/v0.2.0...v0.3.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:38:05 +01:00
ada mancini
58c428347e get cluster-resources even if negotiating RBAC fails (#1243)
* log errors negotiating and set ignoreRBAC when authorizer webhooks would fail
2023-06-27 15:07:08 +12:00
Xav Paice
2c6b1869e2 feat: add test for HostPreflight spec read (#1227) 2023-06-22 14:56:19 +01:00
Evans Mungai
944da4543a chore: Upgrade sigstore and goreleaser binaries (#1104)
* chore: Upgrade sigstore and goreleaser binaries
* Pin to goreleaser's v1 major versions
2023-06-21 07:07:48 +12:00
dependabot[bot]
e8340d54d4 chore(deps): bump golang.org/x/text from 0.9.0 to 0.10.0 (#1221)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 12:30:17 +12:00
dependabot[bot]
0fc92122d7 chore(deps): bump k8s.io/metrics from 0.27.2 to 0.27.3 (#1234)
Bumps [k8s.io/metrics](https://github.com/kubernetes/metrics) from 0.27.2 to 0.27.3.
- [Commits](https://github.com/kubernetes/metrics/compare/v0.27.2...v0.27.3)

---
updated-dependencies:
- dependency-name: k8s.io/metrics
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 12:29:38 +12:00
dependabot[bot]
f7f5604734 chore(deps): bump k8s.io/api from 0.27.2 to 0.27.3 (#1232)
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.27.2 to 0.27.3.
- [Commits](https://github.com/kubernetes/api/compare/v0.27.2...v0.27.3)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 12:18:29 +12:00
dependabot[bot]
de44c21efa chore(deps): bump github.com/jackc/pgx/v5 from 5.3.1 to 5.4.1 (#1231)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.3.1 to 5.4.1.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.3.1...v5.4.1)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 12:17:46 +12:00
Andrew Lavery
557a1381a9 explicitly test TCPConnectAnalyze unconditional fallthrough behavior (#1226) 2023-06-16 15:01:41 +12:00
Dexter Yan
fefe118943 feat(collector): checking existing service account before create running pod (#1222) 2023-06-15 15:39:18 +12:00
Dexter Yan
5b1e48258f fix(collector): solving pod stuck in terminating with CNI issue (#1196)
* feat(collector): add force delete for pods when they're done with in a collector
2023-06-15 13:59:59 +12:00
ada mancini
03c53cabd6 make ConfigMap collector namespace-optional (#1212)
* try to load default namespace from kubectl current context

* use  ns from kubectl context when no ns is given in the spec

* remove test prints

* Update pkg/collect/configmap.go

Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com>

---------

Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com>
2023-06-13 13:12:17 -04:00
David Rohnow
a5628874b0 Add code to collect cluster endpoint data with cluster-resources collector (#1219)
added code to collect cluster endpoint data to cluster-resources collector
v0.69.1
2023-06-13 16:33:52 +12:00
Ahmed Mousa
620fa75eb5 feat: add k8s custom metrics collector (#1174)
Collector that collects custom k8s metrics from custom.metrics.k8s.io/v1beta1/ and saves them in the bundle under the /metrics directory
v0.69.0
2023-06-09 10:26:03 +01:00
David Rohnow
60d5b686cc Add Daemonset collection to cluster_resources (#1213)
* added daemonset collection to cluster_resources

* squash commit to remove commit that was submitted by root
2023-06-08 16:05:54 -07:00
Dexter Yan
f9dbccd354 feat(support-bundle): add support labels for troubleshoot.io and troubleshoot.sh (#1203) 2023-06-08 16:05:35 +01:00
Evans Mungai
08a1075d82 chore: remove unnecessary logrus dependency (#1214)
The troubleshoot project uses klog logging library. There is room for
only one library unfortunately. Sorry logrus :)
v0.68.0
2023-06-08 10:43:08 -04:00
dependabot[bot]
0a855f26c2 chore(deps): bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#1209)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 12:54:19 +01:00
danj-replicated
0d1e23651a Add ability for Cluster resources analyzer to do number and size comparison (#1210)
* make CR analyzer compare ints and sizes

* schemas

* typo

* more comments

* tests for cluster resources analyzer doing number/size comparisons

* switch from humanize to k8s size parsing

* schemas

---------

Co-authored-by: Nathan Sullivan <nathans@replicated.com>
2023-06-08 07:51:11 -04:00
dependabot[bot]
70f0e071dd chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.4 to 3.23.5 (#1208)
Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.4 to 3.23.5.
- [Release notes](https://github.com/shirou/gopsutil/releases)
- [Commits](https://github.com/shirou/gopsutil/compare/v3.23.4...v3.23.5)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 12:17:06 +01:00
dependabot[bot]
5add5d6f9d chore(deps): bump github.com/microsoft/go-mssqldb from 1.0.0 to 1.1.0 (#1207)
Bumps [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/microsoft/go-mssqldb/releases)
- [Changelog](https://github.com/microsoft/go-mssqldb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/go-mssqldb/compare/v1.0.0...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/microsoft/go-mssqldb
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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-06-08 11:45:19 +01:00
dependabot[bot]
191e002a9b chore(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.3 (#1206)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-06-08 11:44:35 +01:00
dependabot[bot]
fbacd055cd chore(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#1205)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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-06-08 11:44:06 +01:00
Evans Mungai
401dfe2c57 feat: add loader APIs to load specs from raw troubleshoot spec (#1202)
* feat: add loader APIs to load specs from a list of yaml docs

The change introduces a loader package that will contain loader
public APIs. The aim of these APIs will be to, given any source of
troubleshoot specs, the loaders will fetch the specs and parse out
all troubleshoot objects that can be extracted.

* Some refactoring

* Some more changes

* More changes caught when testing vendor portal

* Add tests and rename Troubleshoot kinds struct

* Additional test

* Handle ConfigMap and Secrets with multiple specs in them

* Fix failing test

* Revert multidoc split implementation

* Fix merge conflict

* Change LoadFromXXX functions to a single LoadSpecs function
v0.67.0
2023-06-06 16:48:29 -04:00
Evans Mungai
145bad7e8e chore: add make target to build all binaries together (#1211)
Add make build target that builds all troubleshoot binaries in parallel
using -j make flag that lets make run all make sub-targets as separate jobs
2023-06-06 10:15:28 -04:00
Xav Paice
a3b7975690 Update the preflight secret label to troubleshoot.sh/kind (#1204)
Partial-fix: #1070

Changes the default label for preflights to troubleshoot.sh/kind: preflight
2023-06-06 07:19:49 +12:00
ada mancini
41cd7c2aa4 watchrsync job to push binaries to a test machine (#1158)
* ignore some more stuff

* watchrsync make command like kurl project

* document watchrsync

* the actual watchrsync script

* dont need these for npm dependencies

* Revert "dont need these for npm dependencies"

This reverts commit bdb4e62c38.

* install gaze-run-interrupt with make

* watchrsync instructions
2023-06-05 10:35:25 -04:00
Dexter Yan
2b8e3fb6bb fix(collector): removed unused name in certificates collector (#1200) v0.66.0 2023-06-01 09:46:34 +01:00
Evans Mungai
27c68a7e53 chore: update deprecated trivy cli option (#1197) 2023-05-31 10:49:58 -04:00
dependabot[bot]
8fb417a896 chore(deps): bump go.opentelemetry.io/otel/sdk from 1.15.1 to 1.16.0 (#1191)
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 09:04:13 +01:00
dependabot[bot]
88022bb67b chore(deps): bump github.com/mattn/go-isatty from 0.0.18 to 0.0.19 (#1192)
Bumps [github.com/mattn/go-isatty](https://github.com/mattn/go-isatty) from 0.0.18 to 0.0.19.
- [Commits](https://github.com/mattn/go-isatty/compare/v0.0.18...v0.0.19)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 09:01:30 +01:00
dependabot[bot]
7304c9f20d chore(deps): bump github.com/microsoft/go-mssqldb from 0.21.0 to 1.0.0 (#1193)
Bumps [github.com/microsoft/go-mssqldb](https://github.com/microsoft/go-mssqldb) from 0.21.0 to 1.0.0.
- [Release notes](https://github.com/microsoft/go-mssqldb/releases)
- [Changelog](https://github.com/microsoft/go-mssqldb/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/go-mssqldb/compare/v0.21.0...v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/microsoft/go-mssqldb
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 17:08:12 +12:00
dependabot[bot]
097d20edcb chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.6 to 0.15.0 (#1190)
Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.6 to 0.15.0.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes-sigs/controller-runtime/compare/v0.14.6...v0.15.0)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 17:06:56 +12:00
Diamon Wiggins
3b61b3025e Add regex to clusterResources analyzer (#1189)
* similar to the textAnalyze analyzer, adds support to evaluate the value at the specified yamlPath with regex or regexGroups
* fixes a typo in the shorthand name used for searching for cluster resource PVC objects
2023-05-30 17:53:03 -04:00
Xav Paice
6a9ad7842d Update preflight e2e test (#1187)
Replace the `run` collector (deprecated) with `runPod`.
2023-05-29 11:56:45 -04:00
Dexter Yan
830e357b48 fix(analyzer): fix clusterResource analyzer always uses the first object found (#1185)
* fix(analyzer): fix clusterResource analyzer  always uses the first object found
2023-05-29 17:26:37 +12:00
Dexter Yan
acb1099bda feat(analyzer): add certificate analyzer (#1128)
* feat(analyzer): add cert analyzer
* feat(analyzer): add certificates tests
2023-05-29 16:40:10 +12:00