I have application.properties with a list like so:
api.users[0].name=dsaass@fakeacc.com
api.users[0].password=123QWEasd
api.users[1].name=dsadsasa@fakeacc.com
api.users[1].password=123qweASD
Now I need a Kubernetes env var for production/dev/demo etc. My other variables are declared like this:
ftp.port=${FTP_PORT:22}
But how do I do it with a list?
Of course having users like this is not good practice and is temporary, just a proof of concept app.
Use configMap and secrets (--from-file ) and mount it to volume to be read or read it as an environment variable.
https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/