Skip to content

Commit bd18742

Browse files
chasehaineycrdantyunju.llycamilamacedo86diamonwiggins
committed
feat: Add mssql collector and analyser (#990)
* Adds MSSQL collector based on Postgres collector * Adds tests for MSSQL based on the tests for Postgres * Adds analyzer * Adds MS SQL Server example * Assures MS SQL tests pass * Aligns naming and adds to API * Corrects names that weren't updated * Updates text on sample * Corrects typo * Makes troubleshoot aware of mssql * Uses Hashicorp version library for SQL Server versions * Resyncs generated file * Cleaning up the workspace. * Updates schemas per PR feedback * Unit Tests. * fix: address runtime error of nil pointer when concatenating preflight specs (#998) fix: address runtime error of nil pointer when concatenating preflight spec with hostpreflight spec in preflight run.go * chore: chore: update binaries used to build manifests and k8s (#997) - client-gen version from v0.22.0 to v0.26.1 - controller-gen version from v0.7.0 to v0.11.2 - k8s pacth from 1.26.0 to 1.26.1 * Deduplication for In-Cluster Collectors (#972) * adding dedup for in cluster collectors * add tests * return collector as is whenever marshalling to json fails --------- Co-authored-by: Evans Mungai <evans@replicated.com> * refactor: keep support bundle concat logic to be consistent with Preflight concat (#1002) * refactor: keep support bundle concat logic to be consistent with Preflight * test: add tests for support bundle spec concat function * chore: Refactor in cluster analysers (#999) Have all in-cluster analysers implement the same interface. This will help with the implementation of code that requires making calls to all analysers Fixes #995 * feat: Record summary of execution times of support bundle operations (collect/redact/analyse) (#935) When running a support bundle, we want to know how long each operation (collect, redact, analyze) takes. This commit adds a new trace exporter that records the start and end times of each operation, and then prints a summary of the execution. The summary is also stored in the support bundle. Related to #923 * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.4 (#1006) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.2 to 0.14.4. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.2...v0.14.4) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-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> * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.22.12 to 3.23.1 (#1007) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.22.12 to 3.23.1. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.22.12...v3.23.1) --- updated-dependencies: - dependency-name: github.com/shirou/gopsutil/v3 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> * chore: Don't hardcode /bin/bash (#1011) Bash is not always installed in /bin/bash. Mitigate that by relying on bash being in PATH. * chore: Don't print which error in Makefile (#1012) The which binary is used to detect if client-gen is installed, and if it's not, the Makefile will install it. The initial detection prints an error if it's not found. This is misleading, as it is actually an expected situation. * chore: remove unused code (#1013) Remove code snippets that are not used across the codebase. * remove PR label enforcement workflow (#1015) * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.11.2 to 1.13.0 (#1020) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.11.2 to 1.13.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.11.2...v1.13.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> * chore(deps): bump golang.org/x/text from 0.6.0 to 0.7.0 (#1017) Bumps [golang.org/x/text](https://github.com/golang/text) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/text/releases) - [Commits](golang/text@v0.6.0...v0.7.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> * chore(deps): bump github.com/jackc/pgx/v5 from 5.2.0 to 5.3.0 (#1018) Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.2.0 to 5.3.0. - [Release notes](https://github.com/jackc/pgx/releases) - [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md) - [Commits](jackc/pgx@v5.2.0...v5.3.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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/hashicorp/go-getter from 1.6.2 to 1.7.0 (#1019) Bumps [github.com/hashicorp/go-getter](https://github.com/hashicorp/go-getter) from 1.6.2 to 1.7.0. - [Release notes](https://github.com/hashicorp/go-getter/releases) - [Changelog](https://github.com/hashicorp/go-getter/blob/main/.goreleaser.yml) - [Commits](hashicorp/go-getter@v1.6.2...v1.7.0) --- updated-dependencies: - dependency-name: github.com/hashicorp/go-getter 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> * feat(support-bundle): print progress in debug non-interactive mode (#1010) Currently, there's no debug logs whatsoever when running a command like troubleshoot --debug --interactive=false Tackle this by printing similar log statements as presented in interactive mode to the debug logger. Refactor the code a bit so there's no need for a dedicated finished channel and to exit the goroutines properly. Co-authored-by: Evans Mungai <evans@replicated.com> * chore(deps): bump github.com/containerd/containerd from 1.6.12 to 1.6.18 (#1021) Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.18. - [Release notes](https://github.com/containerd/containerd/releases) - [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md) - [Commits](containerd/containerd@v1.6.12...v1.6.18) --- updated-dependencies: - dependency-name: github.com/containerd/containerd dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net from 0.6.0 to 0.7.0 (#1025) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.6.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](golang/net@v0.6.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/containers/image/v5 from 5.24.0 to 5.24.1 (#1026) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.0 to 5.24.1. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.0...v5.24.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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update README to add link for the docs (#1022) Co-authored-by: Evans Mungai <evans@replicated.com> * feat: use klog as the default logging library (#1008) * chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.1 to 3.23.2 (#1043) Bumps [github.com/shirou/gopsutil/v3](https://github.com/shirou/gopsutil) from 3.23.1 to 3.23.2. - [Release notes](https://github.com/shirou/gopsutil/releases) - [Commits](shirou/gopsutil@v3.23.1...v3.23.2) --- 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> * chore(deps): bump go.opentelemetry.io/otel from 1.13.0 to 1.14.0 (#1040) Bumps [go.opentelemetry.io/otel](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.0) --- updated-dependencies: - dependency-name: go.opentelemetry.io/otel 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> * chore(deps): bump github.com/containers/image/v5 from 5.24.1 to 5.24.2 (#1038) Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.24.1 to 5.24.2. - [Release notes](https://github.com/containers/image/releases) - [Commits](containers/image@v5.24.1...v5.24.2) --- 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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * feat: support for rhel 9 variants (rhel, centos, ol, rocky) (#1045) * fix: Use namespace from the collector spec for Ceph (#1042) use namespace from the collector spec for ceph * chore(deps): bump go.opentelemetry.io/otel/sdk from 1.13.0 to 1.14.0 (#1039) Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.13.0 to 1.14.0. - [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-go@v1.13.0...v1.14.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> * Collector/Analyzer - Subnet Available (#1004) * Adding a new Subnet Available Collector and Analyzer, used to check if a subnet is available for use on a K8s node. * chore(deps): bump k8s.io/apimachinery from 0.26.1 to 0.26.2 (#1050) Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apimachinery/releases) - [Commits](kubernetes/apimachinery@v0.26.1...v0.26.2) --- 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> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump sigs.k8s.io/controller-runtime from 0.14.4 to 0.14.5 (#1048) Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.4 to 0.14.5. - [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases) - [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/main/RELEASE.md) - [Commits](kubernetes-sigs/controller-runtime@v0.14.4...v0.14.5) --- updated-dependencies: - dependency-name: sigs.k8s.io/controller-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> * dont run tests on draft PRs (#966) Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 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> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- 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> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 (#1051) * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#1052) Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](kubernetes/klog@v2.90.0...v2.90.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 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> * chore(deps): bump k8s.io/cli-runtime from 0.26.1 to 0.26.2 (#1049) Bumps [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/cli-runtime/releases) - [Commits](kubernetes/cli-runtime@v0.26.1...v0.26.2) --- 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> * chore(deps): bump k8s.io/apiextensions-apiserver from 0.26.1 to 0.26.2 Bumps [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) from 0.26.1 to 0.26.2. - [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases) - [Commits](kubernetes/apiextensions-apiserver@v0.26.1...v0.26.2) --- updated-dependencies: - dependency-name: k8s.io/apiextensions-apiserver dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Update go.sum --------- 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> * Adds MSSQL collector based on Postgres collector * Missed a merge conflict. * More merge conflicts fixed. * Ran go mod tidy. * Fixed the function name return. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Chuck D'Antonio <chuck@crdant.io> Co-authored-by: yunju.lly <yunju.lly@infracreate.com> Co-authored-by: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Co-authored-by: Diamon Wiggins <38189728+diamonwiggins@users.noreply.github.com> Co-authored-by: Evans Mungai <evans@replicated.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Wieczorek <twz123@users.noreply.github.com> Co-authored-by: Nick Meyer <nickm@replicated.com> Co-authored-by: Ethan Mosbaugh <ethan@replicated.com> Co-authored-by: Nathan Sullivan <nathans@replicated.com> Co-authored-by: ada mancini <adamancini@users.noreply.github.com> Co-authored-by: Xav Paice <xavpaice@users.noreply.github.com>
1 parent 02d7e1d commit bd18742

19 files changed

+1243
-1
lines changed

config/crds/troubleshoot.sh_analyzers.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,58 @@ spec:
774774
- namespace
775775
- outcomes
776776
type: object
777+
mssql:
778+
properties:
779+
annotations:
780+
additionalProperties:
781+
type: string
782+
type: object
783+
checkName:
784+
type: string
785+
collectorName:
786+
type: string
787+
exclude:
788+
type: BoolString
789+
fileName:
790+
type: string
791+
outcomes:
792+
items:
793+
properties:
794+
fail:
795+
properties:
796+
message:
797+
type: string
798+
uri:
799+
type: string
800+
when:
801+
type: string
802+
type: object
803+
pass:
804+
properties:
805+
message:
806+
type: string
807+
uri:
808+
type: string
809+
when:
810+
type: string
811+
type: object
812+
warn:
813+
properties:
814+
message:
815+
type: string
816+
uri:
817+
type: string
818+
when:
819+
type: string
820+
type: object
821+
type: object
822+
type: array
823+
strict:
824+
type: BoolString
825+
required:
826+
- collectorName
827+
- outcomes
828+
type: object
777829
mysql:
778830
properties:
779831
annotations:

config/crds/troubleshoot.sh_collectors.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,42 @@ spec:
359359
required:
360360
- namespace
361361
type: object
362+
mssql:
363+
properties:
364+
collectorName:
365+
type: string
366+
exclude:
367+
type: BoolString
368+
parameters:
369+
items:
370+
type: string
371+
type: array
372+
tls:
373+
properties:
374+
cacert:
375+
type: string
376+
clientCert:
377+
type: string
378+
clientKey:
379+
type: string
380+
secret:
381+
properties:
382+
name:
383+
type: string
384+
namespace:
385+
type: string
386+
required:
387+
- name
388+
- namespace
389+
type: object
390+
skipVerify:
391+
type: boolean
392+
type: object
393+
uri:
394+
type: string
395+
required:
396+
- uri
397+
type: object
362398
mysql:
363399
properties:
364400
collectorName:

config/crds/troubleshoot.sh_preflights.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,58 @@ spec:
774774
- namespace
775775
- outcomes
776776
type: object
777+
mssql:
778+
properties:
779+
annotations:
780+
additionalProperties:
781+
type: string
782+
type: object
783+
checkName:
784+
type: string
785+
collectorName:
786+
type: string
787+
exclude:
788+
type: BoolString
789+
fileName:
790+
type: string
791+
outcomes:
792+
items:
793+
properties:
794+
fail:
795+
properties:
796+
message:
797+
type: string
798+
uri:
799+
type: string
800+
when:
801+
type: string
802+
type: object
803+
pass:
804+
properties:
805+
message:
806+
type: string
807+
uri:
808+
type: string
809+
when:
810+
type: string
811+
type: object
812+
warn:
813+
properties:
814+
message:
815+
type: string
816+
uri:
817+
type: string
818+
when:
819+
type: string
820+
type: object
821+
type: object
822+
type: array
823+
strict:
824+
type: BoolString
825+
required:
826+
- collectorName
827+
- outcomes
828+
type: object
777829
mysql:
778830
properties:
779831
annotations:
@@ -1751,6 +1803,42 @@ spec:
17511803
required:
17521804
- namespace
17531805
type: object
1806+
mssql:
1807+
properties:
1808+
collectorName:
1809+
type: string
1810+
exclude:
1811+
type: BoolString
1812+
parameters:
1813+
items:
1814+
type: string
1815+
type: array
1816+
tls:
1817+
properties:
1818+
cacert:
1819+
type: string
1820+
clientCert:
1821+
type: string
1822+
clientKey:
1823+
type: string
1824+
secret:
1825+
properties:
1826+
name:
1827+
type: string
1828+
namespace:
1829+
type: string
1830+
required:
1831+
- name
1832+
- namespace
1833+
type: object
1834+
skipVerify:
1835+
type: boolean
1836+
type: object
1837+
uri:
1838+
type: string
1839+
required:
1840+
- uri
1841+
type: object
17541842
mysql:
17551843
properties:
17561844
collectorName:

config/crds/troubleshoot.sh_supportbundles.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -805,6 +805,58 @@ spec:
805805
- namespace
806806
- outcomes
807807
type: object
808+
mssql:
809+
properties:
810+
annotations:
811+
additionalProperties:
812+
type: string
813+
type: object
814+
checkName:
815+
type: string
816+
collectorName:
817+
type: string
818+
exclude:
819+
type: BoolString
820+
fileName:
821+
type: string
822+
outcomes:
823+
items:
824+
properties:
825+
fail:
826+
properties:
827+
message:
828+
type: string
829+
uri:
830+
type: string
831+
when:
832+
type: string
833+
type: object
834+
pass:
835+
properties:
836+
message:
837+
type: string
838+
uri:
839+
type: string
840+
when:
841+
type: string
842+
type: object
843+
warn:
844+
properties:
845+
message:
846+
type: string
847+
uri:
848+
type: string
849+
when:
850+
type: string
851+
type: object
852+
type: object
853+
type: array
854+
strict:
855+
type: BoolString
856+
required:
857+
- collectorName
858+
- outcomes
859+
type: object
808860
mysql:
809861
properties:
810862
annotations:
@@ -1782,6 +1834,42 @@ spec:
17821834
required:
17831835
- namespace
17841836
type: object
1837+
mssql:
1838+
properties:
1839+
collectorName:
1840+
type: string
1841+
exclude:
1842+
type: BoolString
1843+
parameters:
1844+
items:
1845+
type: string
1846+
type: array
1847+
tls:
1848+
properties:
1849+
cacert:
1850+
type: string
1851+
clientCert:
1852+
type: string
1853+
clientKey:
1854+
type: string
1855+
secret:
1856+
properties:
1857+
name:
1858+
type: string
1859+
namespace:
1860+
type: string
1861+
required:
1862+
- name
1863+
- namespace
1864+
type: object
1865+
skipVerify:
1866+
type: boolean
1867+
type: object
1868+
uri:
1869+
type: string
1870+
required:
1871+
- uri
1872+
type: object
17851873
mysql:
17861874
properties:
17871875
collectorName:

examples/preflight/mssql.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
apiVersion: troubleshoot.sh/v1beta2
2+
kind: Preflight
3+
metadata:
4+
name: sample
5+
spec:
6+
collectors:
7+
- mssql:
8+
collectorName: mssql
9+
uri: sqlserver://SA:nac3lle-ch@stise-bOMBay-wag@db.lab.shortrib.net:1433/master
10+
analyzers:
11+
- mssql:
12+
checkName: Must be SQLServer 15.x or later
13+
collectorName: mssql
14+
outcomes:
15+
- fail:
16+
when: "connected == false"
17+
message: Cannot connect to SQLServer
18+
- fail:
19+
when: "version < 15.x"
20+
message: The SQLServer must be at least version 15
21+
- pass:
22+
message: The SQLServer connection checks out
23+
- mssql:
24+
checkName: Must be SQLServer 14 or earlier
25+
collectorName: mssql
26+
outcomes:
27+
- fail:
28+
when: "connected == false"
29+
message: Cannot connect to SQLServer
30+
- fail:
31+
when: "version > 14.x"
32+
message: The SQLServer must be at most version 14
33+
- pass:
34+
message: The SQLServer connection checks out
35+
- mssql:
36+
checkName: Must be SQLServer 15.0.2000.1565
37+
collectorName: mssql
38+
outcomes:
39+
- fail:
40+
when: "connected == false"
41+
message: Cannot connect to SQLServer
42+
- fail:
43+
when: "version == 15.0.2000.1565"
44+
message: The SQLServer must be version 15.0.2000.1565
45+
- pass:
46+
message: The SQLServer connection checks out
47+
- mssql:
48+
checkName: Must not be SQLServer 15.0.2000.1565
49+
collectorName: mssql
50+
outcomes:
51+
- fail:
52+
when: "connected == false"
53+
message: Cannot connect to SQLServer
54+
- fail:
55+
when: "version != 15.0.2000.1565"
56+
message: The SQLServer must not be version 15.0.2000.1565
57+
- pass:
58+
message: The SQLServer connection checks out
59+
- mssql:
60+
checkName: I don't want to connect to your SQL Server
61+
collectorName: mssql
62+
outcomes:
63+
- fail:
64+
when: "connected == true"
65+
message: Can connect to your SQL Server
66+
- fail:
67+
when: "version != 15.0.2000.1565"
68+
message: The SQLServer must be version 15.0.2000.1565
69+
- pass:
70+
message: The SQLServer connection checks out

0 commit comments

Comments
 (0)