Files
Jianbo Sun fa58501a97 remove 3rd party dependency from default installation (#946)
* remove 3rd party dependency from default installation

* fix CI
2021-01-27 18:29:42 -08:00

47 lines
1.4 KiB
YAML

# Code generated by KubeVela templates. DO NOT EDIT.
apiVersion: core.oam.dev/v1alpha2
kind: TraitDefinition
metadata:
name: metrics
annotations:
definition.oam.dev/description: "Configures monitoring metrics for your service."
spec:
appliesToWorkloads:
- webservice
- backend
- task
definitionRef:
name: metricstraits.standard.oam.dev
workloadRefPath: spec.workloadRef
extension:
install:
helm:
repo: prometheus-community
name: kube-prometheus-stack
namespace: monitoring
url: https://prometheus-community.github.io/helm-charts
version: 9.4.4
template: |-
output: {
apiVersion: "standard.oam.dev/v1alpha1"
kind: "MetricsTrait"
spec: {
scrapeService: parameter
}
}
parameter: {
// +usage=Format of the metrics, default as prometheus
// +short=f
format: *"prometheus" | string
// +usage=The metrics path of the service
path: *"/metrics" | string
// +usage=The way to retrieve data which can take the values `http` or `https`
scheme: *"http" | string
enabled: *true | bool
// +usage=The port for metrics, will discovery automatically by default
port: *0 | >=1024 & <=65535 & int
// +usage=The label selector for the pods, will discovery automatically by default
selector?: [string]: string
}