Recommended way to inject secrets into pod from multiple path with annotations?

Hello All,
Currently i am using the following way to inject secrets into the pod. "true" "internal-role" "internal/data/keys1" "debug" |
          {{- with secret "internal/data/keys1" -}}
          export USERNAME_DEV="{{ }}"
          {{- end -}} "internal/data/keys2" |
          {{- with secret "internal/data/keys2" -}}
          export PASSWORD="{{ }}"
          {{- end -}}

I am sourcing the above as env variables in the pod.

command: ["/bin/sh", "-ec"]
 args: [
              "for f in `ls -a /vault/secrets/keys*`; do source $f; done; env > /tmp/env.txt; sleep 1000000",

My question is there a way the above method could be improved or some others ways, where i want multiple secret paths to be injected. Thanks

Check out consul-templates.

Not sure i can use consul templates as the setup is HA mode with raft.

You can. Consul-template has out grown it’s name. Think of it as a templating-language that has logic and loops.