Errors fetching secrets
Hi all,
I'm getting the following error in the pod logs:
2017-02-23T08:17:14.977806402Z 2017/02/23 08:17:14 json: cannot unmarshal object into Go value of type string
I'm saving my secrets as secret/staging/ENV_NAME. The value being the secret.
Are you getting this on startup? Or when trying to get a secret from vault? Could you provide a bit more context? Thanks!
Hi @stevesloka ,
My secrets are stored as following:
secret/environment/SECRET_VALUE
the value is the actual secret value. I don't know if this format is unsupported for this tool.
Some logs:
2017-03-07T08:53:05.915456449Z 2017/03/07 08:53:05 Starting Kubernetes Vault Controller...
2017-03-07T08:53:05.936216335Z 2017/03/07 08:53:05 ThirdPartyResource customsecrets.enterprises.upmc.com exists.
2017-03-07T08:53:05.936250042Z 2017/03/07 08:53:05 Kubernetes Vault Controller started successfully.
2017-03-07T08:53:05.939911363Z 2017/03/07 08:53:05 json: cannot unmarshal object into Go value of type string
2017-03-07T08:53:05.939929943Z 2017/03/07 08:53:05 Watching for custom secret events.
2017-03-07T08:53:05.939988359Z 2017/03/07 08:53:05 Starting reconciliation loop.
2017-03-07T08:53:06.042663262Z 2017/03/07 08:53:06 json: cannot unmarshal object into Go value of type string
Hey sorry for the delay getting back to you, been busy with a new baby, so time has been short recently. Let me try and simulate the same, seems like a parsing problem of sorts.
What type of data is stored in the secret?
We store strings but also certificates as base64. Maybe that could be causing problems?
We store them as secret value=something. Every secret only has one value. We name them after our env variables. Everything is either a normal passphrase string or a base64 encoded certificate.
@stevesloka any update on this?
Hey @thecodeassassin I just ran through an example and it all seemed to work for me. I put the sample here: https://github.com/upmc-enterprises/kubernetes-secret-manager/blob/master/docs/deployment-guide.md#static-secrets
Can you see maybe if your workflow is different? (Maybe I'm missing a step that you're doing).