Scenarios/AKS-Secure-Baseline-PrivateCluster/Old-Apps/RatingsApp/api-secret-provider-class.yaml (24 lines of code) (raw):
apiVersion: secrets-store.csi.x-k8s.io/v1
kind: SecretProviderClass
metadata:
name: mongo-secret-csi
spec:
provider: azure
secretObjects:
- secretName: mongodburi
type: Opaque
data:
- objectName: MONGODBURI
key: MONGODBURI
parameters:
keyvaultName: <keyvault>
useVMManagedIdentity: "true"
userAssignedIdentityID: <client id> # the client ID of the MSI
cloudName: "" #if deploying to Azure Government, specify "AzureUSGovernment" here, otherwise, it will default to "AzurePublicCloud"
objects: |
array:
- |
objectName: MONGODBURI
objectType: secret
objectVersion: ""
tenantId: <tenant id>