Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit bd8d9ef

Browse files
feat: add enabled flags for sqlExporter and postgresExporter
1 parent b6909e3 commit bd8d9ef

File tree

7 files changed

+15
-5
lines changed

7 files changed

+15
-5
lines changed

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ values which are defined [here](https://github.com/grafana/helm-charts/tree/main
326326
| global.dashboards.timerange | string | `"12h"` | how far back dashboards should look |
327327
| global.externalScheme | string | `"http"` | |
328328
| global.externalZone | string | `"svc.cluster.local"` | |
329-
| global.postgres | object | `{"alerts":{"groups":{"Basic":{"delay":"1m","enabled":true},"Connections":{"delay":"5m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}},"Notifications":{"delay":"15m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}}}},"database":"coder","exporter":{"image":"quay.io/prometheuscommunity/postgres-exporter"},"hostname":"localhost","mountSecret":"secret-postgres","password":null,"port":5432,"sslmode":"disable","sslrootcert":null,"username":"coder","volumeMounts":[],"volumes":[]}` | postgres connection information NOTE: these settings are global so we can parameterise some values which get rendered by subcharts |
329+
| global.postgres | object | `{"alerts":{"groups":{"Basic":{"delay":"1m","enabled":true},"Connections":{"delay":"5m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}},"Notifications":{"delay":"15m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}}}},"database":"coder","exporter":{"enabled":true,"image":"quay.io/prometheuscommunity/postgres-exporter"},"hostname":"localhost","mountSecret":"secret-postgres","password":null,"port":5432,"sslmode":"disable","sslrootcert":null,"username":"coder","volumeMounts":[],"volumes":[]}` | postgres connection information NOTE: these settings are global so we can parameterise some values which get rendered by subcharts |
330330
| global.postgres.alerts | object | `{"groups":{"Basic":{"delay":"1m","enabled":true},"Connections":{"delay":"5m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}},"Notifications":{"delay":"15m","enabled":true,"thresholds":{"critical":0.9,"notify":0.5,"warning":0.8}}}}` | alerts for postgres |
331331
| global.telemetry | object | `{"metrics":{"native_histograms":false,"scrape_interval":"15s","scrape_timeout":"12s"},"profiling":{"scrape_interval":"60s","scrape_timeout":"70s"}}` | control telemetry collection |
332332
| global.telemetry.metrics | object | `{"native_histograms":false,"scrape_interval":"15s","scrape_timeout":"12s"}` | control metric collection |
@@ -576,5 +576,6 @@ values which are defined [here](https://github.com/grafana/helm-charts/tree/main
576576
| pyroscope.pyroscope.service.port | int | `4040` | |
577577
| pyroscope.pyroscope.service.type | string | `"ClusterIP"` | |
578578
| runbookViewer.image | string | `"dannyben/madness"` | |
579+
| sqlExporter.enabled | bool | `true` | |
579580
| sqlExporter.image | string | `"burningalchemist/sql_exporter"` | |
580581

‎coder-observability/templates/configmap-sql-exporter.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.sqlExporter.enabled }}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
@@ -24,4 +25,5 @@ data:
2425
database: {{ .Values.global.postgres.database }}
2526
values: [ usage ]
2627
query: |
27-
SELECT pg_notification_queue_usage() AS usage;
28+
SELECT pg_notification_queue_usage() AS usage;
29+
{{- end }}

‎coder-observability/templates/statefulset-postgres-exporter.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.global.postgres.exporter.enabled }}
12
---
23
apiVersion: apps/v1
34
kind: StatefulSet
@@ -37,4 +38,5 @@ spec:
3738
{{- if .Values.global.postgres.volumes }}
3839
volumes:
3940
{{ toYaml .Values.global.postgres.volumes | nindent 8 }}
40-
{{- end }}
41+
{{- end }}
42+
{{- end }}

‎coder-observability/templates/statefulset-sql-exporter.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.sqlExporter.enabled }}
12
---
23
apiVersion: apps/v1
34
kind: StatefulSet
@@ -35,3 +36,4 @@ spec:
3536
- name: config
3637
configMap:
3738
name: sql-exporter-config
39+
{{- end }}

‎coder-observability/values.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ global:
136136
# ensure that your secret has a field named `PGPASSWORD`
137137
mountSecret: "secret-postgres"
138138
exporter:
139+
enabled: true
139140
image: "quay.io/prometheuscommunity/postgres-exporter"
140141

141142
# volumes and volumeMounts for SSL certificates
@@ -176,6 +177,7 @@ runbookViewer:
176177
image: "dannyben/madness"
177178

178179
sqlExporter:
180+
enabled: true
179181
image: "burningalchemist/sql_exporter"
180182

181183
grafana-agent:

‎compiled/resources.yaml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,7 @@ metadata:
507507
app.kubernetes.io/managed-by: Helm
508508
data:
509509
config.yaml: |2
510+
510511
auth_enabled: false
511512
chunk_store_config:
512513
chunk_cache_config:
@@ -12307,7 +12308,7 @@ spec:
1230712308
metadata:
1230812309
annotations:
1230912310
prometheus.io/scrape: 'true'
12310-
checksum/config: 71bb9e7579b6e138ae28c623aa29d72025be00387da6c1b8dd5aa168c96ca1e0
12311+
checksum/config: 80b50946b9b587df2a3833a4b60b549f37531da381f03f5dc0b69534c7d5044f
1231112312
labels:
1231212313
app: sql-exporter
1231312314
app.kubernetes.io/name: "database-stats"

‎scripts/compile.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ helm template --namespace coder-observability -f coder-observability/values.yaml
2222
yq e 'del(.spec.template.spec.containers[].image, .metadata.labels."helm.sh/chart", .metadata.labels."app.kubernetes.io/version")' - \
2323
> compiled/resources.yaml
2424

25-
check_unstaged "compiled"
25+
check_unstaged "compiled"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /