mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-16 09:16:38 +00:00
With 1d00e0ab
("ServiceMonitor: Enable Prometheus to select ServMon
outside own ns") merged: To emphasize the fact, that ServiceMonitors can
be deployed alongside their targets, this patch moves the Alertmanager,
Kube-State-Metrics, Node-Exporter and Prometheus Operator
Service-Monitor into the respective target folder in the kube-prometheus
project.
48 lines
1.6 KiB
Jsonnet
48 lines
1.6 KiB
Jsonnet
{
|
|
new(namespace)::
|
|
{
|
|
"apiVersion": "monitoring.coreos.com/v1",
|
|
"kind": "ServiceMonitor",
|
|
"metadata": {
|
|
"name": "kube-state-metrics",
|
|
"namespace": namespace,
|
|
"labels": {
|
|
"k8s-app": "kube-state-metrics"
|
|
}
|
|
},
|
|
"spec": {
|
|
"jobLabel": "k8s-app",
|
|
"selector": {
|
|
"matchLabels": {
|
|
"k8s-app": "kube-state-metrics"
|
|
}
|
|
},
|
|
"namespaceSelector": {
|
|
"matchNames": [
|
|
"monitoring"
|
|
]
|
|
},
|
|
"endpoints": [
|
|
{
|
|
"port": "https-main",
|
|
"scheme": "https",
|
|
"interval": "30s",
|
|
"honorLabels": true,
|
|
"bearerTokenFile": "/var/run/secrets/kubernetes.io/serviceaccount/token",
|
|
"tlsConfig": {
|
|
"insecureSkipVerify": true
|
|
}
|
|
},
|
|
{
|
|
"port": "https-self",
|
|
"scheme": "https",
|
|
"interval": "30s",
|
|
"bearerTokenFile": "/var/run/secrets/kubernetes.io/serviceaccount/token",
|
|
"tlsConfig": {
|
|
"insecureSkipVerify": true
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|