How do I select Dataplane resources?
The example policy in this guide selects only Dataplane resources that contain the label app=demo-app. You can select data planes in multiple ways.
Select all data planes:
targetRef:
kind: Dataplane
Select a data plane by name and namespace:
targetRef:
kind: Dataplane
name: demo-app
namespace: kong-mesh-demo
Select a data plane by labels:
targetRef:
kind: Dataplane
labels:
app: demo-app
When your application exposes multiple named inbounds, select a single inbound from your data plane using the sectionName field:
targetRef:
kind: Dataplane
name: demo-app
sectionName: http-port
How does the rules API apply to incoming traffic?
Use the rules field to configure all incoming traffic to your data plane:
rules:
- default:
http:
requestTimeout: 1s
The example above applies a request timeout of 1 second to incoming requests. The rules API applies configuration to all incoming traffic and doesn’t support filtering by a subset of traffic, so it doesn’t yet support MeshTrafficPermission or MeshFaultInjection.