github.com/oam-dev/kubevela@v1.9.11/vela-templates/definitions/registry/metrics.cue (about) 1 metrics: { 2 type: "trait" 3 annotations: {} 4 labels: {} 5 description: "Configures monitoring metrics for your service." 6 attributes: { 7 appliesToWorkloads: ["deployments.apps", "jobs.batch"] 8 definitionRef: name: "metricstraits.standard.oam.dev" 9 workloadRefPath: "spec.workloadRef" 10 extension: install: helm: { 11 repo: "prometheus-community" 12 name: "kube-prometheus-stack" 13 namespace: "monitoring" 14 url: "https://prometheus-community.github.io/helm-charts" 15 version: "9.4.4" 16 } 17 } 18 } 19 template: { 20 outputs: metrics: { 21 apiVersion: "standard.oam.dev/v1alpha1" 22 kind: "MetricsTrait" 23 spec: scrapeService: parameter 24 } 25 parameter: { 26 // +usage=Format of the metrics, default as prometheus 27 // +short=f 28 format: *"prometheus" | string 29 // +usage=The metrics path of the service 30 path: *"/metrics" | string 31 // +usage=The way to retrieve data which can take the values `http` or `https` 32 scheme: *"http" | string 33 enabled: *true | bool 34 // +usage=The port for metrics, will discovery automatically by default 35 port: *0 | >=1024 & <=65535 & int 36 // +usage=The label selector for the pods, will discovery automatically by default 37 selector?: [string]: string 38 } 39 }