kubeshop / vscode-monokle

An extension for Visual Studio Code to validate your Kubernetes configuration
https://marketplace.visualstudio.com/items?itemName=kubeshop.monokle
MIT License
6 stars 0 forks source link

Support for directories with multiple repos inside #65

Open f1ames opened 9 months ago

f1ames commented 9 months ago

There is a certain assumption on which extension works with git repos and how it integrates those with the Cloud / Enterprise. The assumption is folder opened in VSC or each workspace root is a git repo to make it sync with cloud. For example:

  1. I can open single folder in VSCode like ~/monokle-cli. This is a git repo and extension will use git repo metadata to try to fetch remote policy.
  2. I can have a workspace with one or more folders which are git repos. For example:
    monokle-workspace
    - monokle-cli/
    - monokle-core/

Each of workspace root is a git repo. So again extension will use git repo metadata to try to fetch remote policy.

  1. While VSCode workspace is a virtual space, linking to multiple directories, one can achieve the same by putting git repos in a single parent directory and opening it, like:
~/monokle/
  - monokle-cli/
  - monokle-core/

And then when opening such directory, extension won't sync any policy because the root is not a git repo. The result is very similar to using a workspace (ofc, underlying mechanism is different). We should also support such cases similar to workspaces so it's possible to have policies synchronized for each git repo in root directory.