Update sslmode for postgres-exporter
Summary
A customer is seeing level=info msg="Error opening connection to database (user=gitlab-psql%20host=0.0.0.0%20database=postgres%20sslmode=allow): pq: unsupported sslmode \"allow\"; only \"require\" (default), \"verify-full\", \"verify-ca\", and \"disable\" supported" source="postgres_exporter.go:1012"
We are currently setting sslmode=allow
by default.
It does not appear that a sslmode
of allow
is supported in the Go PostgreSQL driver.
Version 10.6.4 to 10.7.4.
Proposed fix
Change sslmode=allow
to sslmode=require
. The driver defaults sslmode
to require
.
Link
Customer ticket -> https://gitlab.zendesk.com/agent/tickets/97417 (internal)
Workaround
See comment #3570 (comment 189998863)
Edited by Anton Smith