Skip to content

Instantly share code, notes, and snippets.

@olegsu
Created September 7, 2020 10:11
Show Gist options
  • Save olegsu/094b7588b7ccbfb59a61e27f445d6f1d to your computer and use it in GitHub Desktop.
Save olegsu/094b7588b7ccbfb59a61e27f445d6f1d to your computer and use it in GitHub Desktop.
Create SecretProviderClass
#!/bin/bash
cat <<EOF | kubectl apply -n $NS -f -
apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
metadata:
name: azure-csi
spec:
provider: azure
parameters:
keyvaultName: "$KV_NAME"
objects: |
array:
- |
objectName: secret-name # name was set erlier
objectType: secret
resourceGroup: "$RESOURCE_GROUP_NAME"
subscriptionId: "$SUBSCRIPTION_ID"
tenantId: "$TENANT_ID"
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment