apiVersion: v1
kind: Pod
metadata:
  name: keyvault-demo
spec:
  initContainers:
  - name: keyvault-init
    image: bjd145/mounttest:1.0
    volumeMounts:
    - name: secret-1
      mountPath: /tmp/data
    command: ["/bin/sh","-c"]
    args: ["cp /home/site/wwwroot/* /tmp/data/."]
  containers:
  - name: keyvault-demo
    image: bjd145/mounttest:1.0
    volumeMounts:
    - name: secret-1
      mountPath: /home/site/wwwroot
      readOnly: true 
  volumes:
  - name: secret-1
    flexVolume:
      driver: "azure/kv"
      options:
        usevmmanagedidentity: "true" 
        resourcegroup: "devsub01_cqrs_rg"
        keyvaultname: "vaulttzzvamju001"
        keyvaultobjectname: "localSettings"
        keyvaultobjectaliases: "local.settings.json"
        keyvaultobjecttype: secret
        subscriptionid: ""
        tenantid: ""