bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
9.02k stars 9.22k forks source link

[bitnami/mogodb] svc binding picks up metrics password for defined user #22479

Closed jcpunk closed 9 months ago

jcpunk commented 10 months ago

Name and Version

bitnami/mongodb 14.5.1

What architecture are you using?

arm64

What steps will reproduce the bug?

Install the chart Review svcbinding 0 secret

Are you using any custom parameters or values?

---
architecture: standalone

directoryPerDB: true

useStatefulSet: true

auth: {"databases": ["daqconfigdb"], "passwords": ["userpassword"], "rootPassword": "adminpassword", "rootUser": "root", "usernames": ["daqconfig"]}

serviceBindings:
  enabled: true

persistence:
  enabled: true
  storageClass: local-path

affinity:
 nodeAffinity:
   requiredDuringSchedulingIgnoredDuringExecution:
     nodeSelectorTerms:
     - matchExpressions:
       - key: node-role.kubernetes.io/worker
         operator: Exists

metrics: # TODO https://github.com/percona/grafana-dashboards/tree/main/dashboards/MongoDB
  enabled: true
  compatibleMode: false # skip old metrics
  username: metrics
  collector:
    all: true
  resources:
    requests:
      cpu: 50m
      memory: 32Mi
    limits:
      cpu: 300m
      memory: 512Mi
  serviceMonitor:
    enabled: true
    labels:
      "prometheus.io/servicemonitor": "mongodb-metrics"
  prometheusRule: # setup alerting rules here and then enable it
    enabled: false
    rules: []
    additionalLabels:
      "prometheus.io/rule": "mongodb-metrics"

What is the expected behavior?

username daqconfig should have the password correct in the svcbinding secret

What do you see instead?

The password for the metrics user is placed into the secret for the daqconfig user.

Additional information

No response

migruiz4 commented 9 months ago

Thank you for reporting this issue @jcpunk! I have submitted this PR fixing this issue: https://github.com/bitnami/charts/pull/22521