An open API service indexing awesome lists of open source software.

https://github.com/loft-sh/vcluster-hostpath-mapper


https://github.com/loft-sh/vcluster-hostpath-mapper

Last synced: 9 months ago
JSON representation

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 |