Skip to content

Commit

Permalink
feat(charts): Add helm charts for monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
kmala committed Oct 12, 2016
1 parent e0954b6 commit d00c64a
Show file tree
Hide file tree
Showing 12 changed files with 308 additions and 0 deletions.
7 changes: 7 additions & 0 deletions charts/monitor/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: monitor
home: https://github.com/deis/monitor
version: <Will be populated by the ci before publishing the chart>
description: Monitoring for Deis Workflow.
maintainers:
- name: Deis Team
email: engineering@deis.com
7 changes: 7 additions & 0 deletions charts/monitor/charts/grafana/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: grafana
home: https://github.com/deis/monitor/tree/master/grafana
version: <Will be populated by the ci before publishing the chart>
description: Monitoring for Deis Workflow.
maintainers:
- name: Deis Team
email: engineering@deis.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-monitor-grafana
labels:
heritage: deis
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
selector:
matchLabels:
app: deis-monitor-grafana
template:
metadata:
labels:
app: deis-monitor-grafana
spec:
containers:
- name: deis-monitor-grafana
image: quay.io/{{.Values.org}}/grafana:{{.Values.docker_tag}}
imagePullPolicy: {{.Values.pull_policy}}
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end}}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end}}
{{- end}}
env:
- name: "INFLUXDB_URLS"
value: http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)
- name: "BIND_PORT"
value: "3500"
- name: "DEFAULT_USER"
value: {{.Values.user}}
- name: "DEFAULT_USER_PASSWORD"
value: {{.Values.password}}
ports:
- containerPort: 3500
name: ui
19 changes: 19 additions & 0 deletions charts/monitor/charts/grafana/templates/monitor-grafana-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: deis-monitor-grafana
labels:
heritage: deis
app: deis-monitor-grafana
router.deis.io/routable: "true"
annotations:
router.deis.io/domains: grafana
router.deis.io/connectTimeout: "10"
router.deis.io/tcpTimeout: "1200"
spec:
ports:
- port: 80
name: ui
targetPort: ui
selector:
app: deis-monitor-grafana
7 changes: 7 additions & 0 deletions charts/monitor/charts/influxdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: influxdb
home: https://github.com/deis/monitor/tree/master/influxdb
version: <Will be populated by the ci before publishing the chart>
description: Monitoring for Deis Workflow.
maintainers:
- name: Deis Team
email: engineering@deis.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: deis-monitor-influxapi
labels:
heritage: deis
app: deis-monitor-influxapi
router.deis.io/routable: "true"
annotations:
router.deis.io/domains: influxapi
router.deis.io/connectTimeout: "10"
router.deis.io/tcpTimeout: "1200"
spec:
ports:
- port: 80
name: transport
targetPort: transport
selector:
app: deis-monitor-influxdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deis-monitor-influxdb
labels:
heritage: deis
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app: deis-monitor-influxdb
template:
metadata:
labels:
app: deis-monitor-influxdb
spec:
containers:
- name: deis-monitor-influxdb
image: quay.io/{{.Values.org}}/influxdb:{{.Values.docker_tag}}
imagePullPolicy: {{.Values.pull_policy}}
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end}}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end}}
{{- end}}
ports:
- containerPort: 8083
name: admin
- containerPort: 8086
name: transport
protocol: TCP
- containerPort: 8084
name: ssltransport
protocol: TCP
livenessProbe:
httpGet:
path: /ping
port: 8086
initialDelaySeconds: 1
timeoutSeconds: 1
readinessProbe:
httpGet:
path: /ping
port: 8086
initialDelaySeconds: 1
timeoutSeconds: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: deis-monitor-influxui
labels:
heritage: deis
app: deis-monitor-influxui
router.deis.io/routable: "true"
annotations:
router.deis.io/domains: influx
router.deis.io/connectTimeout: "10"
router.deis.io/tcpTimeout: "1200"
spec:
ports:
- port: 80
name: admin
targetPort: admin
selector:
app: deis-monitor-influxdb
7 changes: 7 additions & 0 deletions charts/monitor/charts/telegraf/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: telegraf
home: https://github.com/deis/monitor/tree/master/telegraf
version: <Will be populated by the ci before publishing the chart>
description: Monitoring for Deis Workflow.
maintainers:
- name: Deis Team
email: engineering@deis.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: deis-monitor-telegraf
labels:
heritage: deis
annotations:
component.deis.io/version: {{ .Values.docker_tag }}
spec:
template:
metadata:
labels:
app: deis-monitor-telegraf
spec:
serviceAccount: deis-monitor-telegraf
containers:
- name: deis-monitor-telegraf
image: quay.io/{{.Values.org}}/telegraf:{{.Values.docker_tag}}
imagePullPolicy: {{.Values.pull_policy}}
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end}}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end}}
{{- end}}
env:
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: "INFLUXDB_URLS"
value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)\""
- name: "INFLUXDB_INPUT_URLS"
value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)/debug/vars\""
- name: "HOST_PROC"
value: "/rootfs/proc"
- name: "HOST_SYS"
value: "/rootfs/sys"
- name: "AGENT_QUIET"
value: "true"
- name: "AGENT_BUFFER_LIMIT"
value: "100000"
- name: "ENABLE_INFLUXDB_INPUT"
value: "true"
- name: "ENABLE_PROMETHEUS"
value: "true"
- name: "NSQ_CONSUMER_SERVER"
value: "$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_TRANSPORT)"
- name: "NSQ_CONSUMER_TOPIC"
value: "metrics"
- name: "NSQ_ENDPOINTS"
value: "\"http://$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_HTTP)\""
{{- if ne .Values.global.logger_redis_location "off-cluster" }}
- name: DEIS_LOGGER_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: logger-redis-creds
key: password
- name: "REDIS_SERVERS"
value: "\"tcp://:$(DEIS_LOGGER_REDIS_PASSWORD)@$(DEIS_LOGGER_REDIS_SERVICE_HOST):$(DEIS_LOGGER_REDIS_SERVICE_PORT)\""
{{- end }}
volumeMounts:
- mountPath: /var/run/docker.sock
name: docker-socket
- name: sysro
mountPath: /rootfs/sys
readOnly: true
- name: procro
mountPath: /rootfs/proc
readOnly: true
- name: varrunutmpro
mountPath: /var/run/utmp
readOnly: true
- name: logger-redis-creds
mountPath: /var/run/secrets/deis/redis/creds
volumes:
- name: docker-socket
hostPath:
path: /var/run/docker.sock
- name: sysro
hostPath:
path: /sys
- name: procro
hostPath:
path: /proc
- name: varrunutmpro
hostPath:
path: /var/run/utmp
- name: logger-redis-creds
secret:
secretName: logger-redis-creds
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: deis-monitor-telegraf
labels:
heritage: deis
18 changes: 18 additions & 0 deletions charts/monitor/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
grafana:
org: "deisci"
pull_policy: "Always"
docker_tag: canary
# limits_cpu: "100m"
# limits_memory: "50Mi"
influxdb:
org: "deisci"
pull_policy: "Always"
docker_tag: canary
# limits_cpu: "100m"
# limits_memory: "50Mi"
telegraf:
org: "deisci"
pull_policy: "Always"
docker_tag: canary
# limits_cpu: "100m"
# limits_memory: "50Mi"

0 comments on commit d00c64a

Please sign in to comment.