-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmonitor-telegraf-daemon.yaml
More file actions
51 lines (51 loc) · 1.63 KB
/
monitor-telegraf-daemon.yaml
File metadata and controls
51 lines (51 loc) · 1.63 KB
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
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: drycc-monitor-telegraf
labels:
heritage: drycc
annotations:
component.drycc.cc/version: {{ .Values.telegraf.imageTag }}
spec:
selector:
matchLabels:
app: drycc-monitor-telegraf
{{- if ge .Capabilities.KubeVersion.Minor "6" }}
updateStrategy:
type: RollingUpdate
{{- end }}
template:
metadata:
labels: {{- include "common.labels.standard" . | nindent 8 }}
app: drycc-monitor-telegraf
spec:
securityContext:
fsGroup: 1001
runAsGroup: 1001
runAsUser: 1001
serviceAccount: drycc-monitor-telegraf
initContainers:
- name: drycc-monitor-telegraf-init
image: {{.Values.telegraf.imageRegistry}}/{{.Values.telegraf.imageOrg}}/python-dev:latest
imagePullPolicy: {{.Values.imagePullPolicy}}
args:
- netcat
- -v
- -u
- $(POSTGRESQL_CONNECTION)
{{- include "telegraf.envs" . | indent 8 }}
containers:
- name: drycc-monitor-telegraf
image: {{.Values.telegraf.imageRegistry}}/{{.Values.telegraf.imageOrg}}/telegraf:{{.Values.telegraf.imageTag}}
imagePullPolicy: {{.Values.telegraf.imagePullPolicy}}
{{- if or (.Values.telegraf.limitsCpu) (.Values.telegraf.limitsMemory)}}
resources:
limits:
{{- if (.Values.telegraf.limitsCpu) }}
cpu: {{.Values.telegraf.limitsCpu}}
{{- end}}
{{- if (.Values.telegraf.limitsMemory) }}
memory: {{.Values.telegraf.limitsMemory}}
{{- end}}
{{- end}}
{{- include "telegraf.envs" . | indent 8 }}