Patching kubernetes secrets via circleci

Hello,
I want to patch my K8s secrets via circleci.
I am storing my base64 encrypted secret in CircleCI environment variable.

But I am not able to patch it in a existing kubernetes secret.
I am trying to patch it in following way:-

kubectl patch secret mysecret --type='json' -p '[{"data": { "login_url" : ${LOGIN_URL} }}]' 

Can someone help me with the correct syntax ?
Thanks.

Hey There @engineerakki, welcome to CircleCI Discuss!

In bash, single quotes interpret everything inside of them as a string literal, not allowing for parameter expansion.

You can work around this by wrapping your parameter in single quotes. See the below example.

kubectl patch secret mysecret --type='json' -p '[{"data": { "login_url" : '${LOGIN_URL}' }}]'