apiVersion: v1
kind: Pod
metadata:
  name: nginx-keyvault
spec:
  containers:
  - name: nginx-flex-kv
    image: nginx
    volumeMounts:
    - name: keyvault
      mountPath: /kvmnt
      readOnly: true
  volumes:
  - name: keyvault
    flexVolume:
      driver: "azure/kv"
      secretRef:
        name: kvcreds                  # [OPTIONAL] not required if using Pod Identity
      options:
        usepodidentity: "false"        # [OPTIONAL] if not provided, will default to "false"
        keyvaultname: "kubernetesSecrets"               # the name of the KeyVault
        keyvaultobjectnames: testsecret    # list of KeyVault object names (semi-colon separated)
        keyvaultobjecttypes: secret  # list of KeyVault object types: secret, key or cert (semi-colon separated)
        keyvaultobjectversions: ""     # [OPTIONAL] list of KeyVault object versions (semi-colon separated), will get latest if empty
        resourcegroup: "KubernetesWorkshop"              # [REQUIRED FOR < v0.0.14] the resource group of the KeyVault
        subscriptionid: "323cc0d5-0fc5-482d-9369-42e5c947ce0f"             # [REQUIRED FOR < v0.0.14] the subscription ID of the KeyVault
        tenantid: "72f988bf-86f1-41af-91ab-2d7cd011db47"                   # the tenant ID of the KeyVault
