Skip to content

Commit d00c64a

Browse files
committed
feat(charts): Add helm charts for monitor
1 parent e0954b6 commit d00c64a

12 files changed

Lines changed: 308 additions & 0 deletions

charts/monitor/Chart.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: monitor
2+
home: https://github.com/deis/monitor
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: Monitoring for Deis Workflow.
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: grafana
2+
home: https://github.com/deis/monitor/tree/master/grafana
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: Monitoring for Deis Workflow.
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: deis-monitor-grafana
5+
labels:
6+
heritage: deis
7+
annotations:
8+
component.deis.io/version: {{ .Values.docker_tag }}
9+
spec:
10+
replicas: 1
11+
strategy:
12+
rollingUpdate:
13+
maxSurge: 1
14+
maxUnavailable: 0
15+
type: RollingUpdate
16+
selector:
17+
matchLabels:
18+
app: deis-monitor-grafana
19+
template:
20+
metadata:
21+
labels:
22+
app: deis-monitor-grafana
23+
spec:
24+
containers:
25+
- name: deis-monitor-grafana
26+
image: quay.io/{{.Values.org}}/grafana:{{.Values.docker_tag}}
27+
imagePullPolicy: {{.Values.pull_policy}}
28+
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
29+
resources:
30+
limits:
31+
{{- if (.Values.limits_cpu) }}
32+
cpu: {{.Values.limits_cpu}}
33+
{{- end}}
34+
{{- if (.Values.limits_memory) }}
35+
memory: {{.Values.limits_memory}}
36+
{{- end}}
37+
{{- end}}
38+
env:
39+
- name: "INFLUXDB_URLS"
40+
value: http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)
41+
- name: "BIND_PORT"
42+
value: "3500"
43+
- name: "DEFAULT_USER"
44+
value: {{.Values.user}}
45+
- name: "DEFAULT_USER_PASSWORD"
46+
value: {{.Values.password}}
47+
ports:
48+
- containerPort: 3500
49+
name: ui
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: deis-monitor-grafana
5+
labels:
6+
heritage: deis
7+
app: deis-monitor-grafana
8+
router.deis.io/routable: "true"
9+
annotations:
10+
router.deis.io/domains: grafana
11+
router.deis.io/connectTimeout: "10"
12+
router.deis.io/tcpTimeout: "1200"
13+
spec:
14+
ports:
15+
- port: 80
16+
name: ui
17+
targetPort: ui
18+
selector:
19+
app: deis-monitor-grafana
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: influxdb
2+
home: https://github.com/deis/monitor/tree/master/influxdb
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: Monitoring for Deis Workflow.
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: deis-monitor-influxapi
5+
labels:
6+
heritage: deis
7+
app: deis-monitor-influxapi
8+
router.deis.io/routable: "true"
9+
annotations:
10+
router.deis.io/domains: influxapi
11+
router.deis.io/connectTimeout: "10"
12+
router.deis.io/tcpTimeout: "1200"
13+
spec:
14+
ports:
15+
- port: 80
16+
name: transport
17+
targetPort: transport
18+
selector:
19+
app: deis-monitor-influxdb
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apiVersion: extensions/v1beta1
2+
kind: Deployment
3+
metadata:
4+
name: deis-monitor-influxdb
5+
labels:
6+
heritage: deis
7+
annotations:
8+
component.deis.io/version: {{ .Values.docker_tag }}
9+
spec:
10+
replicas: 1
11+
strategy:
12+
type: Recreate
13+
selector:
14+
matchLabels:
15+
app: deis-monitor-influxdb
16+
template:
17+
metadata:
18+
labels:
19+
app: deis-monitor-influxdb
20+
spec:
21+
containers:
22+
- name: deis-monitor-influxdb
23+
image: quay.io/{{.Values.org}}/influxdb:{{.Values.docker_tag}}
24+
imagePullPolicy: {{.Values.pull_policy}}
25+
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
26+
resources:
27+
limits:
28+
{{- if (.Values.limits_cpu) }}
29+
cpu: {{.Values.limits_cpu}}
30+
{{- end}}
31+
{{- if (.Values.limits_memory) }}
32+
memory: {{.Values.limits_memory}}
33+
{{- end}}
34+
{{- end}}
35+
ports:
36+
- containerPort: 8083
37+
name: admin
38+
- containerPort: 8086
39+
name: transport
40+
protocol: TCP
41+
- containerPort: 8084
42+
name: ssltransport
43+
protocol: TCP
44+
livenessProbe:
45+
httpGet:
46+
path: /ping
47+
port: 8086
48+
initialDelaySeconds: 1
49+
timeoutSeconds: 1
50+
readinessProbe:
51+
httpGet:
52+
path: /ping
53+
port: 8086
54+
initialDelaySeconds: 1
55+
timeoutSeconds: 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: v1
2+
kind: Service
3+
metadata:
4+
name: deis-monitor-influxui
5+
labels:
6+
heritage: deis
7+
app: deis-monitor-influxui
8+
router.deis.io/routable: "true"
9+
annotations:
10+
router.deis.io/domains: influx
11+
router.deis.io/connectTimeout: "10"
12+
router.deis.io/tcpTimeout: "1200"
13+
spec:
14+
ports:
15+
- port: 80
16+
name: admin
17+
targetPort: admin
18+
selector:
19+
app: deis-monitor-influxdb
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: telegraf
2+
home: https://github.com/deis/monitor/tree/master/telegraf
3+
version: <Will be populated by the ci before publishing the chart>
4+
description: Monitoring for Deis Workflow.
5+
maintainers:
6+
- name: Deis Team
7+
email: engineering@deis.com
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
apiVersion: extensions/v1beta1
2+
kind: DaemonSet
3+
metadata:
4+
name: deis-monitor-telegraf
5+
labels:
6+
heritage: deis
7+
annotations:
8+
component.deis.io/version: {{ .Values.docker_tag }}
9+
spec:
10+
template:
11+
metadata:
12+
labels:
13+
app: deis-monitor-telegraf
14+
spec:
15+
serviceAccount: deis-monitor-telegraf
16+
containers:
17+
- name: deis-monitor-telegraf
18+
image: quay.io/{{.Values.org}}/telegraf:{{.Values.docker_tag}}
19+
imagePullPolicy: {{.Values.pull_policy}}
20+
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
21+
resources:
22+
limits:
23+
{{- if (.Values.limits_cpu) }}
24+
cpu: {{.Values.limits_cpu}}
25+
{{- end}}
26+
{{- if (.Values.limits_memory) }}
27+
memory: {{.Values.limits_memory}}
28+
{{- end}}
29+
{{- end}}
30+
env:
31+
- name: POD_NAMESPACE
32+
valueFrom:
33+
fieldRef:
34+
fieldPath: metadata.namespace
35+
- name: "INFLUXDB_URLS"
36+
value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)\""
37+
- name: "INFLUXDB_INPUT_URLS"
38+
value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)/debug/vars\""
39+
- name: "HOST_PROC"
40+
value: "/rootfs/proc"
41+
- name: "HOST_SYS"
42+
value: "/rootfs/sys"
43+
- name: "AGENT_QUIET"
44+
value: "true"
45+
- name: "AGENT_BUFFER_LIMIT"
46+
value: "100000"
47+
- name: "ENABLE_INFLUXDB_INPUT"
48+
value: "true"
49+
- name: "ENABLE_PROMETHEUS"
50+
value: "true"
51+
- name: "NSQ_CONSUMER_SERVER"
52+
value: "$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_TRANSPORT)"
53+
- name: "NSQ_CONSUMER_TOPIC"
54+
value: "metrics"
55+
- name: "NSQ_ENDPOINTS"
56+
value: "\"http://$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_HTTP)\""
57+
{{- if ne .Values.global.logger_redis_location "off-cluster" }}
58+
- name: DEIS_LOGGER_REDIS_PASSWORD
59+
valueFrom:
60+
secretKeyRef:
61+
name: logger-redis-creds
62+
key: password
63+
- name: "REDIS_SERVERS"
64+
value: "\"tcp://:$(DEIS_LOGGER_REDIS_PASSWORD)@$(DEIS_LOGGER_REDIS_SERVICE_HOST):$(DEIS_LOGGER_REDIS_SERVICE_PORT)\""
65+
{{- end }}
66+
volumeMounts:
67+
- mountPath: /var/run/docker.sock
68+
name: docker-socket
69+
- name: sysro
70+
mountPath: /rootfs/sys
71+
readOnly: true
72+
- name: procro
73+
mountPath: /rootfs/proc
74+
readOnly: true
75+
- name: varrunutmpro
76+
mountPath: /var/run/utmp
77+
readOnly: true
78+
- name: logger-redis-creds
79+
mountPath: /var/run/secrets/deis/redis/creds
80+
volumes:
81+
- name: docker-socket
82+
hostPath:
83+
path: /var/run/docker.sock
84+
- name: sysro
85+
hostPath:
86+
path: /sys
87+
- name: procro
88+
hostPath:
89+
path: /proc
90+
- name: varrunutmpro
91+
hostPath:
92+
path: /var/run/utmp
93+
- name: logger-redis-creds
94+
secret:
95+
secretName: logger-redis-creds

0 commit comments

Comments
 (0)