helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[prometheus-mysql-exporter] Exporter does not handle some special char in secret as password for mysql config

Open singhsneetendra opened this issue 1 year ago • 1 comments

Describe the bug a clear and concise description of what the bug is.

When we use special character $ in password from secret it do not read it correctly and give access denied.

mysql: existingConfigSecret: name: cloudsql-db-credentials-mysql-exporter key: my.cnf

from above the secret is cloudsql-db-credentials-mysql-exporter

Example secret yaml file looks that can be used to create secret

apiVersion: v1 stringData: my.cnf: | [client] database=database port=3306 user= user password='Password$12' kind: Secret metadata: name: cloudsql-db-credentials-mysql-exporter namespace: monitoring type: Opaque

So the password that contains $ in it do not work, for all other simple passwords it works.

What's your helm version?

v3.10.2+g50f003e

What's your kubectl version?

v1.27.3

Which chart?

prometheus-mysql-exporter-2.2.0

What's the chart version?

2.2.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

The command is not failing it the exporter failed to connect when password has $

Anything else we need to know?

No response

singhsneetendra avatar Jan 07 '24 16:01 singhsneetendra

I have checked further most of complex password do not work another example - 3-]$p_pI+S58:3An

singhsneetendra avatar Jan 07 '24 16:01 singhsneetendra