Hi
I understand that if i deploy a percona mongodb server with a name “psmdb-default-internal”. It would appear that the pod name and secret name created would be psmdb-default-interna
where the l
is cut off.
psmdb-default-interna-rs0-0
psmdb-default-interna-secrets
If i set the name to be psmdb-default
. The pod name and secret will have extra chars appended to them “psmdb-d”.
psmdb-default-psmdb-d-rs0-0
psmdb-default-psmdb-d-secrets
It sugguests that there is a minimum and maximum number of characters that it is looking for. do we know what this is?
This is frustrating because when i try modularize the deployment of psmdb allowing others to define a “name” i need to be able to deterministically reference the secret that is created.
sidecars:
- image: percona/mongodb_exporter:0.40
name: metrics
env:
- name: EXPORTER_USER
valueFrom:
secretKeyRef:
name: ${local.db_name}-secrets
key: MONGODB_CLUSTER_MONITOR_USER
- name: EXPORTER_PASS
valueFrom:
secretKeyRef:
name: ${local.db_name}-secrets
key: MONGODB_CLUSTER_MONITOR_PASSWORD
${local.db_name}-secrets // This will never be correct in both cases.
Error: secret "psmdb-default-secrets" not found
Now i can see in the helm chart there is a nameOverride and a fullnameOverride
I’ve not tired these yet as ive not been able to find the documentation on what they do. Could they help with this situation?