Skip to content

Commit d97561b

Browse files
authored
chore: update mariadb exporter (#40)
* chore: update mariadb exporter * fix: tests dependencies
1 parent 1612b6a commit d97561b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
cd tests
23+
cat ../jsonnetfile.lock.json > jsonnetfile.lock.json
2324
jb install
2425
- name: Run tests
2526
run: |

databases/mariadb.libsonnet

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local p = import 'github.com/jsonnet-libs/kube-prometheus-libsonnet/0.10/main.li
1111
database: self.user,
1212
image: 'registry.redhat.io/rhel9/mariadb-105:1-105',
1313
datadirAction: 'upgrade-warn', // use 'upgrade-auto' to enable auto-upgrade when going to newer MariaDB version
14-
exporterImage: 'docker.io/prom/mysqld-exporter:v0.14.0',
14+
exporterImage: 'docker.io/prom/mysqld-exporter:v0.15.1',
1515
exporter_password: std.md5(self.password),
1616
resources:: {
1717
limits: {
@@ -51,7 +51,6 @@ local p = import 'github.com/jsonnet-libs/kube-prometheus-libsonnet/0.10/main.li
5151
MYSQL_DATABASE: cfg.database,
5252
MYSQL_EXPORTER_PASSWORD: cfg.exporter_password,
5353
DATA_SOURCE_NAME: self.MYSQL_USER + ':' + self.MYSQL_PASSWORD + '@(127.0.0.1:3306)/',
54-
EXPORTER_DATA_SOURCE_NAME: 'exporter:' + self.MYSQL_EXPORTER_PASSWORD + '@(127.0.0.1:3306)/',
5554
}),
5655
initScripts: cm.new(cfg.name + '-init', data={
5756
'init.sql': |||
@@ -109,6 +108,7 @@ local p = import 'github.com/jsonnet-libs/kube-prometheus-libsonnet/0.10/main.li
109108
+ container.resources.withLimits(cfg.resources.limits),
110109
container.new(name='exporter', image=cfg.exporterImage)
111110
+ container.withArgs([
111+
'--mysqld.username=exporter',
112112
'--collect.info_schema.innodb_metrics',
113113
'--collect.info_schema.innodb_tablespaces',
114114
'--collect.info_schema.innodb_cmp',
@@ -125,8 +125,8 @@ local p = import 'github.com/jsonnet-libs/kube-prometheus-libsonnet/0.10/main.li
125125
'--collect.info_schema.tables',
126126
])
127127
+ container.withEnv([{
128-
name: 'DATA_SOURCE_NAME',
129-
valueFrom: { secretKeyRef: { name: this.secret.metadata.name, key: 'EXPORTER_DATA_SOURCE_NAME' } },
128+
name: 'MYSQLD_EXPORTER_PASSWORD',
129+
valueFrom: { secretKeyRef: { name: this.secret.metadata.name, key: 'MYSQL_EXPORTER_PASSWORD' } },
130130
}])
131131
+ container.withPorts([
132132
port.new('metrics', 9104),

0 commit comments

Comments
 (0)