Secret from AWS Secret Manager not available through ArgoCD

We use argo for deployment of our software. We downloaded the official kong charts for K8, and added the required custom values.

It was all working, until we found the need to retrieve a secret from AWS Secret Manager. In other apps within the same cluster it is achieved by adding a block labeled secretESOSM in the overrides value for the app’s chart, and then the deployment makes sure the secret is injected as an environment variable.

For kong gateway, I followed the same pattern, but the env variable is not visible to my custom plugin. When I read it using os.getenv I get a null value. I also tried setting it through the plugin config as {vault://env/my-secret-key} but that also returns the key empty.

I can’t reproduce it locally, because locally I use docker-compose, and my environment variables are available through the vault.

Any idea why my secret is not available to kong, but it is available to other systems running Node, when we use the same overrides values?

Finally found that the template for Kong didn’t have the AWS Secret Manager enabled. So the problem was with my repo.