Files
troubleshoot/examples/preflight/postgres.yaml
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
2022-11-30 15:52:08 +13:00

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