Merge pull request #2252 from jouve/grafana
add service monitor for grafana
This commit is contained in:
@@ -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+:: {
|
||||
|
Reference in New Issue
Block a user