For Odigos agents to run inside instrumented pod containers, certain files must be mounted into the container. In Kubernetes, these files are mounted under /var/odigos
directory, with subdirectories for each agent. There are few mechanisms to achieve this, which are explained in this document.
This section is for advanced users and odigos administrators.
It is recommended to use the default settings, unless you have specific requirements or run into an issue.
Odigos supports 2 mount methods, which can be used depending on the user preference, cluster policies, integration with existing tools, etc.
This is the default mount method
For agents and languages that requires filesystem mounts, odigos webhook will add the following:
spec.containers[].resources
field:This method is an opt-in configuration option which can be used if the virtual device method is not suitable for your cluster.
If it is supported in the cluster, it is preferred to use over the VirtualDevice method which requires odiglet component to run.
Enabling HostPath
Profile: odigos profile add mount-method-k8s-host-path
Odigos CLI: odigos config set mount-method k8s-host-path
Helm Chart: in your values file, set instrumentor.mountMethod
to k8s-host-path
, or use helm cli --set instrumentor.mountMethod=k8s-host-path
flag with helm upgrade.
Kubernetes Manifest: under the odigos-config
ConfigMap in odigos namespace, set the value in the mountMethod
field of config.yaml
to k8s-host-path
.
Pod Manifest Additions
For agents and languages that requires filesystem mounts, odigos webhook will add the following:
spec.volumes
field:spec.containers[].volumeMounts
field:Caveats
The “HostPath” option should be enabled in the cluster. Some policy tools may block this, like:
If your cluster enforces such policies, you have the following options: