Metrics defaultv2.6+
A default MeshMetric policy for the default mesh
A default MeshMetric policy for the default mesh
apiVersion: kuma.io/v1alpha1
kind: MeshMetric
metadata:
name: metrics-for-mesh-service
namespace: kuma-demo
labels:
kuma.io/mesh: default
spec:
targetRef:
kind: Dataplane
labels:
framework: example-web-framework
default:
applications:
- path: "/metrics/prometheus"
port: 8888type: MeshMetric
mesh: default
name: metrics-for-mesh-service
spec:
targetRef:
kind: Dataplane
labels:
framework: example-web-framework
default:
applications:
- path: "/metrics/prometheus"
port: 8888Adjust konnect_mesh_control_plane.my_meshcontrolplane.id and konnect_mesh.my_mesh.name according to your current configuration.
resource "konnect_mesh_metric" "metrics_for_mesh_service" {
provider = konnect-beta
type = "MeshMetric"
name = "metrics-for-mesh-service"
spec = {
target_ref = {
kind = "Dataplane"
labels = {
framework = "example-web-framework"
}
}
default = {
applications = [
{
path = "/metrics/prometheus"
port = "8888"
}
]
}
}
labels = {
"kuma.io/mesh" = konnect_mesh.my_mesh.name
}
cp_id = konnect_mesh_control_plane.my_meshcontrolplane.id
mesh = konnect_mesh.my_mesh.name
}