Adding pgsql datasource for Grafana #187
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For PS-83: Create pgsql datasource in Grafana
Checklist
Test plan
Tested on test instance for upgrades and new installs, with and without the env vars configured
Alternatives Considered
I tried to change the existing ConfigMap just mounted as a single file inside the directory, so then I could just add Postgres via a separate ConfigMap via subDir mount, but that threw Grafana for a loop because the datasources.yml file is not declarative (ex. Terraform), but just an input ingestion method to Grafana's config state (maintained in a MongoDB inside the Grafana container?), and when the datasources.yml file gets a new inode on an existing instance, Grafana fails to start up, because we have default:true on Prometheus, so Grafana seeing the same Prometheus data source in a new file at a new inode, so it errors out like we're trying to declare a second Prometheus datasource as also default, without first deleting the first one... we'd have to also migrate the Grafana config on existing instances by declaring a delete datasources block to delete the existing default Prometheus before creating a "new" one, and if we're going through all that, I'd say we should also set prune:true to cover us for the next time someone needs to change something, but that feature's not available in v7.5 🤦