Allow traffic to a service
Use MeshTrafficPermission to allow traffic to a specific MeshService.
Use MeshTrafficPermission to allow traffic to a specific MeshService.
apiVersion: kuma.io/v1alpha1
kind: MeshTrafficPermission
metadata:
name: mtp
namespace: kong-mesh-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: MeshService
name: service_name
from:
- targetRef:
kind: Mesh
default:
action: Allowtype: MeshTrafficPermission
name: mtp
mesh: default
spec:
targetRef:
kind: MeshService
name: service_name
from:
- targetRef:
kind: Mesh
default:
action: AllowAdjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_traffic_permission" "mtp" {
provider = konnect-beta
type = "MeshTrafficPermission"
name = "mtp"
spec = {
target_ref = {
kind = "MeshService"
name = "service_name"
}
from = [
{
target_ref = {
kind = "Mesh"
}
default = {
action = "Allow"
}
}
]
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}