fix(prometheus): postgres_exporter config
This commit is contained in:
parent
8cb2e80c80
commit
0524f640c2
@ -60,6 +60,7 @@ configMapGenerator:
|
||||
|
||||
secretGenerator:
|
||||
- name: prometheus-credentials
|
||||
namespace: prometheus
|
||||
files:
|
||||
- secrets/exporter-password
|
||||
- name: grafana-credentials
|
||||
@ -68,6 +69,25 @@ secretGenerator:
|
||||
- admin-password=secrets/grafana-admin-password
|
||||
|
||||
patches:
|
||||
# Patch prometheus-server pod to mount the secrets volume.
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: prometheus-server
|
||||
namespace: prometheus
|
||||
patch: |-
|
||||
- op: add
|
||||
path: /spec/template/spec/volumes/-
|
||||
value:
|
||||
secret:
|
||||
secretName: prod-prometheus-credentials
|
||||
name: secrets-volume
|
||||
- op: add
|
||||
path: /spec/template/spec/containers/1/volumeMounts/-
|
||||
value:
|
||||
mountPath: /etc/secrets
|
||||
name: secrets-volume
|
||||
readOnly: true
|
||||
|
||||
# Patch Grafana deployment to inject PostgreSQL credentials:
|
||||
- target:
|
||||
kind: Deployment
|
||||
|
@ -318,7 +318,7 @@ scrape_configs:
|
||||
tls_config:
|
||||
insecure_skip_verify: true
|
||||
static_configs:
|
||||
- targets: ["prod-db:9100", "prod-db:9187"]
|
||||
- targets: ["prod-db.default:9100", "prod-db.default:9187"]
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- kubernetes_sd_configs:
|
||||
|
Loading…
x
Reference in New Issue
Block a user