DevMesh
You can enable Sandbox routing using DevMesh by opting each service into Signadot DevMesh injection. This is the preferred solution for users who do not have a service mesh and for those using Linkerd.
The DevMesh is a system of envoy-based sidecars that are built into the Signadot Operator and offer lightweight request routing functionality. This can be done by adding an annotation to each pod. If for example, the pods are created by a deployment, the annotation can be added to the deployment template as shown below.
apiVersion: apps/v1
kind: Deployment
metadata:
...
spec:
template:
metadata:
annotations:
sidecar.signadot.com/inject: "true"
In order to add the inject annotation to a particular deployment, you can run
the following kubectl
command.
kubectl -n <namespace> patch deployment <deployment-name> -p '{
"spec":{
"template":{
"metadata":{
"annotations":{
"sidecar.signadot.com/inject": "true"
}
}
}
}
}'
If Signadot is already installed in the cluster, the Pods will have a DevMesh sidecar container injected, which will perform Sandbox routing based on metadata in each request.
When running Signadot Operator v0.13.2 or below, the sidecar annotation requires
specifying the protocol of the workload as one of http
or gRPC
.
sidecar.signadot.com/inject: "http"
sidecar.signadot.com/inject: "grpc"
If you are running these v0.13.2 or below of the operator, the above annotations specifying the protocol must be used. See the v0.13.3 release notes for more details.