@@ -2,7 +2,7 @@ apiVersion: v1
22kind : ConfigMap
33metadata :
44 namespace : mssql
5- name : mssql-exporter -config
5+ name : mssql-metrics -config
66 labels :
77 app : mssql-exporter
88data :
@@ -324,6 +324,14 @@ data:
324324 memory_utilization_percentage,
325325 page_fault_count
326326 FROM sys.dm_os_process_memory
327+ ---
328+ apiVersion : v1
329+ kind : Secret
330+ metadata :
331+ name : mssql-exporter-config
332+ namespace : mssql
333+ type : Opaque
334+ stringData :
327335 sql_exporter.yml : |
328336 # Global defaults.
329337 global:
@@ -343,13 +351,13 @@ data:
343351 # Data source name always has a URI schema that matches the driver name. In some cases (e.g. MySQL)
344352 # the schema gets dropped or replaced to match the driver expected DSN format.
345353 data_source_name: 'sqlserver://USER:PASSWORD@mssql:1433'
346-
354+
347355 # Collectors (referenced by name) to execute on the target.
348356 collectors: [mssql_standard]
349357
350358 # Collector files specifies a list of globs. One collector definition is read from each matching file.
351359 collector_files:
352- - "/mssql-exporter -config/*.collector.yml"
360+ - "/mssql-metrics -config/*.collector.yml"
353361 ---
354362apiVersion : apps/v1
355363kind : Deployment
@@ -373,9 +381,15 @@ spec:
373381 args : ["-config.file","/mssql-exporter-config/sql_exporter.yml"]
374382 volumeMounts :
375383 - name : mssql-exporter-config
376- mountPath : /mssql-exporter-config
384+ mountPath : /mssql-exporter-config/sql_exporter.yml
385+ subPath : sql_exporter.yml
386+ - name : mssql-metrics-config
387+ mountPath : /mssql-metrics-config
377388 volumes :
378389 - configMap :
379390 defaultMode : 420
380- name : mssql-exporter-config
381- name : mssql-exporter-config
391+ name : mssql-metrics-config
392+ name : mssql-metrics-config
393+ - name : mssql-exporter-config
394+ secret :
395+ secretName : mssql-exporter-config
0 commit comments