https://github.com/loft-sh/vcluster-hostpath-mapper
https://github.com/loft-sh/vcluster-hostpath-mapper
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/loft-sh/vcluster-hostpath-mapper
- Owner: loft-sh
- License: apache-2.0
- Created: 2023-07-25T08:28:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-15T00:19:10.000Z (9 months ago)
- Last Synced: 2025-04-15T01:14:16.713Z (9 months ago)
- Language: Go
- Size: 19.9 MB
- Stars: 5
- Watchers: 7
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Usage and installation
Vcluster internal logging relies on separate component called the [Hostpath Mapper](https://github.com/loft-sh/vcluster-hostpath-mapper). This will make sure to resolve the correct virtual pod and container names to their physical counterparts.
To deploy this component, its basically a 2 step process
### Update the vcluster
You would want to create the vcluster with the following `values.yaml`:
```
syncer:
extraArgs:
- --mount-physical-host-paths=true
```
* For new vcluster run `vcluster create -f values.yaml`
* For existing vcluster run `vcluster create --upgrade -f values.yaml`
### Deploy the Hostpath Mapper Daemonset
Now that the vcluster itself is ready, we can deploy the hostpath mapper component. We need the following 2 pieces of information for this:
* The Hostpath Mapper has to be deployed in the same namespace and the target vcluster
* We need to set the `.Values.VclusterReleaseName` value when deploying this helm chart equal to the name of the target vcluster
To sum up, if your vcluster is named `my-vcluster` and is deployed in namespace `my-namespace` then you should run
```shell
helm install vcluster-hpm vcluster-hpm \
--devel \ # since we currently only have a beta release
--repo https://charts.loft.sh \ # once we publish a GA chart this would not be needed
-n my-namespace \
--set VclusterReleaseName=my-vcluster
```
Once deployed successfully a new Daemonset component of vcluster would start running on every node used by the vcluster workloads.
We can now install our desired logging stack and start collecting the logs.
## Versioning
| vcluster | hostpath-mapper |
|-----------------|-----------------|
| v0.21 and above | 0.2.x and above |
| v0.20 and below | 0.1.x |