I am able to get a secrets file pulled from AWS Secrets Manager and mounted in the container. The format of the secrets file is as follows:
{"testkey":"datepie"}
How do I reformat the file to be like this:
testkey=datepie
Here is my manifest file:
apiVersion: apps/v1
kind: Deployment
metadata:
name: test-app
labels:
app: test-app
spec:
replicas: 2
selector:
matchLabels:
app: test-app
template:
metadata:
labels:
app: test-app
spec:
serviceAccountName: test-service-account
containers:
- name: test-app
image: 111122223333.dkr.ecr.us-west-2.amazonaws.com/test.example:test-service-1.0.0-main
volumeMounts:
- name: test-secrets
mountPath: /mnt/
readOnly: true
. . .
volumes:
- name: test-secrets
csi:
driver: secrets-store.csi.k8s.io
readOnly: true
volumeAttributes:
secretProviderClass: test-secrets
What you see is what you get. The volume mount form will only ever be the value with the key as a filename.