Sources are persistent and decoupled from the workloads they instrument.
If a workload is deleted without deleting the Source, the Source will resume its effects if the workload is re-created later.

With Odigos UI

The easiest way to remove a source from Odigos is to use the Odigos UI.
After installing Odigos CLI, run the following command to start the Odigos UI:

odigos ui

And then, in the sources page, unselect the workloads / namespace for which you want telemetry collection to be disabled.

Kubernetes Manifests

If you prefer to use kubectl or GitOps to manage your Kubernetes workloads, you can remove a source from Odigos by deleting the Source object, for example:

1

Run:

kubectl get sources -n default

Output:

NAME           WORKLOAD     KIND         NAMESPACE
source-7sxsb   frontend     Deployment   default
source-b42rn   inventory    Deployment   default
source-b7zn9   coupon       Deployment   default
source-v6sxs   membership   Deployment   default
source-v9jjw   pricing      Deployment   default
2

Run:

kubectl delete source source-7sxsb -n default

Output:

source.odigos.io "source-7sxsb" deleted