crate / crate/crate-operator

sql_exporter ssl issue

Open
#819 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
27
Forks
9
Avg merge
3d 1h
Merged PRs (30d)
11

Description

## Problem
The sql-exporter ConfigMap is generated from a bundled `data/sql-exporter.yaml`
with a hardcoded DSN:

data_source_name: "postgres://crate@localhost:5432/?connect_timeout=5"

There is no field in the CrateDB CR spec to inject connection parameters like
`sslmode=disable`. This causes the sql-exporter sidecar to fail on CrateDB
clusters that do not have SSL enabled on the PostgreSQL interface:

pq: SSL is not enabled on the server

## Expected Behavior
The CrateDB CR should expose a field (e.g. `spec.cluster.sqlExporter.sslMode`
or `spec.cluster.sqlExporter.connectionParams`) that gets appended to the DSN
when the ConfigMap is generated in `get_sql_exporter_config()`.

## Environment
- crate-operator version:
- CrateDB version:
- SSL enabled on cluster: No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.