mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-04-15 07:16:34 +00:00
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
23 lines
660 B
YAML
23 lines
660 B
YAML
apiVersion: troubleshoot.sh/v1beta2
|
|
kind: Preflight
|
|
metadata:
|
|
name: sample
|
|
spec:
|
|
collectors:
|
|
- postgres:
|
|
collectorName: pg
|
|
uri: postgresql://user:password@hostname:5432/defaultdb?sslmode=require
|
|
analyzers:
|
|
- postgres:
|
|
checkName: Must be postgres 10.x or later
|
|
collectorName: pg
|
|
outcomes:
|
|
- fail:
|
|
when: "connected == false"
|
|
message: Cannot connect to postgres server
|
|
- fail:
|
|
when: "version < 10.x"
|
|
message: The postgres server must be at least version 10
|
|
- pass:
|
|
message: The postgres connection checks out
|