Sources are a Custom Resource that define which Kubernetes workloads should be auto-instrumented by Odigos.
Source
objects and their fields.
spec.workload.kind: Namespace
along with spec.workload.name
and spec.workload.namespace
equal to the name of the
namespace to control.
Use Namespace Sources to control instrumentation for multiple Deployments, StatefulSets, and DaemonSets from a
single spot.
Example:
foo
, but want to exclude deployment
bar
. In this case, you can create a Workload Source for deployment bar
with disableInstrumentation: true
:
foo
with a Namespace Source but
choose to explicitly enable deployment bar
via a Workload Source that sets disableInstrumentation: false
(the default).
This is because Workload Sources take priority over Namespace Sources, and any settings in a Workload
Source will override those in a parent Namespace Source.
spec.workload.name
, spec.workload.namespace
, and spec.workload.kind
to match the workload (or namespace).sources.yaml
, separate from your workload manifests. This separation of concerns allows you
to declaratively control your application’s observability without tying it to your application manifests.
You should also define RBAC policies that restrict access to only what is needed to work with Source objects.
In other words, your observability team may not require the ability to view deployments in a namespace to manage
the instrumentation for those deployments.
For example, the following Role grants full editor permissions for Sources:
spec.workload
to matching labels. It is
encouraged to use these labels to manage Sources in a cluster:
odigos.io/workload-name
odigos.io/workload-namespace
odigos.io/workload-kind
spec.workload
. They can be used to group and list Sources, for example:
Sources
for Deployments
.
odigos-instrumentation
label on a workload or namespace, Odigos will automatically create a Source to migrate from the legacy label to Sources. Note that deleting the label will not remove the Source once it is automatically created.odigos-instrumentation
label. Odigos will continue to create a Source from the legacy label if one does not already exist. This functionality will be removed in a future release.