apiVersion: apps/v1
kind: Deployment
metadata:
  name: userprofile
  labels:
    app: userprofile
spec:
  replicas: 1
  selector:
    matchLabels:
      app: userprofile
  template:
    metadata:
      labels:
        app: userprofile
    spec:
      containers:
      - name: userprofile
        image: registrywjl7126.azurecr.io/userprofile:0.0.1
        ports:
        - containerPort: 80
        env:
        - name: NAME
          value: TODOR
        volumeMounts:
          - name: secrets-store-inline
            mountPath: "/secret"
            readOnly: true
      volumes:
      - name: secrets-store-inline
        csi:
          driver: secrets-store.csi.k8s.io
          readOnly: true
          volumeAttributes:
            secretProviderClass: "azure-kvname"
          nodePublishSecretRef:                       # Only required when using service principal mode
            name: secrets-store-creds  


