Merge pull request #2252 from jouve/grafana

add service monitor for grafana
This commit is contained in:
Frederic Branczyk
2019-01-08 22:05:46 +01:00
committed by GitHub
4 changed files with 40 additions and 1 deletions

View File

@@ -15,7 +15,32 @@ local configMapList = k.core.v1.configMapList;
namespace: k.core.v1.namespace.new($._config.namespace),
},
grafana+:: {
local serviceLabels = {
app: 'grafana',
},
dashboardDefinitions: configMapList.new(super.dashboardDefinitions),
service+: {
labels+: serviceLabels,
},
serviceMonitor: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'ServiceMonitor',
metadata: {
name: 'grafana',
namespace: $._config.namespace,
},
spec: {
selector: {
matchLabels: serviceLabels,
},
endpoints: [
{
port: 'http',
interval: '15s',
},
],
},
},
},
} + {
_config+:: {