Description:
I have recently upgraded our kubernetes mongodb deployment to use PMM 3.8.1. I have 4 deployments in our NP environment that all talk back to the same PMM install. The PMM migration went well. When I went to upgrade the PMM client for the first mongodb deployment, the pmm-client kept crashing.
Upon further investigation I found that the operator appears to be injecting the wrong values into the stateful sets. Specifically PMM_AGENT_CONFIG_FILE is being pushed as /usr/local/percona/pmm2/config/pmm-agent.yaml instead of /usr/local/percona/pmm/config/pmm-agent.yaml.
The helm values for the mongodb deployment inject PMM_API_KEY, PMM_ADMIN_USER and PMM_ADMIN_PASSWORD as part of the terragrunt build. I have read that because of support for pmm2 and pmm3 together this may be what is causing the issue. Looking through the operator code there is this piece.
secret.Data[api.PMMServerToken]
However, I do not see that as an option in the helm value examples for mongo at percona-helm-charts/charts/psmdb-db/values.yaml at main · percona/percona-helm-charts · GitHub .
If I edit the stateful set and change the PMM_AGENT_CONFIG_FILE to /usr/local/percona/pmm/config/pmm-agent.yaml and scale up the set, it connects correctly.
I am sure I am missing something simple but can’t seem to find docs around how exactly to get the new pmm-agents to use API tokens instead of Keys which I am assuming is why the operator is thinking PMM2 when I really want PMM3 and is then injecting the pmm2 path into the stateful sets PMM_AGENT_CONFIG_FILE variable.
Operator
Chart: psmdb-operator-1.21.3
APP VERSION: 1.21.2
PSMDB
crVersion: 1.21.2
Chart: 1.21.2
pmm-agent: 3.5 but tried a few
PMM
Chart 1.8.1
Any thoughts or advice would be greatly appreciated.
Thank you,