microsoft / mindaro

Bridge to Kubernetes - for Visual Studio and Visual Studio Code
MIT License
307 stars 106 forks source link

Volume does not download from server #204

Open dk-do opened 3 years ago

dk-do commented 3 years ago

Describe the bug I configured KubernetesLocalProcessConfig.yaml as follows:

version: 0.1
volumeMounts:
  - name: daily-checker-expected-services
    localPath: /cm
  - name: log*
    localPath: /logs
  - name: backup
    localPath: /data
  - name: debug-token-*
    localPath: /var/run/secrets/kubernetes.io/serviceaccount
env:
  - name: EXPECTED_SERVICES
    value: $(volumeMounts:daily-checker-expected-services)
  - name: KUBERNETES_IN_CLUSTER_CONFIG_OVERRIDE
    value: $(volumeMounts:debug-token-*)
  - name: BACKUP_FOLDER
    value: /data/backup
  - name: LOGS
    value: $(volumeMounts:log*)
  - name: DATA
    value: $(volumeMounts:backup*)
  - name: CRON_EXPRESSION
    value: 0 * * ? * *
  - name: CLUSTER_STAGE
    value: DEBUG
  - name: USER
    value: user
  - name: PASSWORD
    value: password

But the volumes won't get downloaded. For example: daily-checker-expected-services is a ConfigMap which is mounted in /cm within the Pod. It should contain one file expectedServices.json. The volume name in the Pod definition is daily-checker-expected-services. Now I want, that the file of the ConfigMap to be downloaded to my local development computer to /cm. Unfortunately the directory does not exist. After creating it manual, it was empty. The log reports a 404 - not found error. But what is exactly not found? The volume name daily-checker-expected-services? Or the mountPath cm?

When I execute on my K8S Cluster in the Pod, everything is fine and mounted in /cm.

Logs Logs attached - sorry. Some parts are in german...

Environment Details Visual Studio version ==> Client's version: Microsoft Visual Studio Professional 2019 / Version 16.10.0 Operating System: Windows 10 20H2

bridge-library-2021-07-15-06-57-21-25240.txt bridge-mindarocli-2021-07-15-06-57-20-25240.txt 2021-07-15T06-57-16.9938949.log

lolodi commented 3 years ago

@dk-do, Thanks for reporting this issue, we'll take a better look and get back to you once we have more information.