forked from adinhodovic/argo-cd-mixin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.libsonnet
66 lines (55 loc) · 2.16 KB
/
config.libsonnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet';
local annotation = g.dashboard.annotation;
{
_config+:: {
// Bypasses grafana.com/dashboards validator
bypassDashboardValidation: {
__inputs: [],
__requires: [],
},
argoCdSelector: 'job=~".*"',
grafanaUrl: 'https://grafana.com',
argoCdUrl: 'https://argocd.com',
operationalOverviewDashboardUid: 'argo-cd-operational-overview-kask',
applicationOverviewDashboardUid: 'argo-cd-application-overview-kask',
notificationsOverviewDashboardUid: 'argo-cd-notifications-overview-kask',
applicationOverviewDashboardUrl: '%s/d/%s/argocd-application-overview' % [self.grafanaUrl, self.applicationOverviewDashboardUid],
notificationsOverviewDashboardUrl: '%s/d/%s/argocd-notifications-overview' % [self.grafanaUrl, self.notificationsOverviewDashboardUid],
tags: ['ci/cd', 'argo-cd'],
argoCdAppOutOfSyncFor: '15m',
argoCdAppUnhealthyFor: '15m',
argoCdAppAutoSyncDisabledFor: '2h',
argoCdAppSyncInterval: '10m',
argoCdNotificationDeliveryInterval: '10m',
// List of applications to ignore in the auto sync disabled alert
argoAutoSyncDisabledIgnoredApps: '',
// Custom annotations to display in graphs
annotation: {
enabled: false,
name: 'Custom Annotation',
datasource: '-- Grafana --',
iconColor: 'green',
tags: [],
},
// Render ArgoCD badges in the dashboards
// []struct{}
// [
// {
// name: 'ArgoCD',
// applicationName: 'ArgoCD', // or self.name
// environment: 'Production',
// argoCdUrl: "https://argo-cd.example.com" // or $._config.argoCdUrl
// }
// ]
applications: [],
customAnnotation:: if $._config.annotation.enabled then
annotation.withName($._config.annotation.name) +
annotation.withIconColor($._config.annotation.iconColor) +
annotation.withHide(false) +
annotation.datasource.withUid($._config.annotation.datasource) +
annotation.target.withMatchAny(true) +
annotation.target.withTags($._config.annotation.tags) +
annotation.target.withType('tags')
else {},
},
}