-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathcollector-daemonset.yaml
97 lines (97 loc) · 3.21 KB
/
collector-daemonset.yaml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
{{- if and .Values.collector.enabled .Values.collector.useDaemonset }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app.kubernetes.io/name : {{ template "wavefront.fullname" . }}
helm.sh/chart: {{ template "wavefront.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io.instance: {{ .Release.Name | quote }}
app.kubernetes.io/component: collector
name: {{ template "wavefront.collector.fullname" . }}
spec:
selector:
matchLabels:
app.kubernetes.io/name : {{ template "wavefront.fullname" .}}
app.kubernetes.io/component: collector
{{ if .Values.collector.updateStrategy }}
updateStrategy:
{{ toYaml .Values.collector.updateStrategy | indent 4 }}
{{ end }}
template:
metadata:
labels:
app.kubernetes.io/name : {{ template "wavefront.fullname" .}}
app.kubernetes.io/component: collector
annotations:
installation-method: {{ .Values.installationMethod }}
spec:
tolerations:
- effect: NoSchedule
key: node.alpha.kubernetes.io/role
operator: Exists
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
{{ if .Values.collector.tolerations }}
{{- toYaml .Values.collector.tolerations | indent 6 }}
{{ end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets: {{ toYaml .Values.imagePullSecrets | nindent 6 }}
{{- end }}
serviceAccountName: {{ template "wavefront.collector.serviceAccountName" . }}
containers:
- name: wavefront-collector
image: {{ .Values.collector.image.repository }}:{{ .Values.collector.image.tag }}
imagePullPolicy: {{ .Values.collector.image.pullPolicy }}
command:
- /wavefront-collector
- --daemon=true
- --config-file=/etc/collector/config.yaml
{{- if .Values.collector.maxProcs }}
- --max-procs={{ .Values.collector.maxProcs }}
{{- end }}
{{- if .Values.collector.logLevel }}
- --log-level={{ .Values.collector.logLevel }}
{{- end }}
env:
- name: HOST_PROC
value: /host/proc
- name: POD_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
- name: POD_NAMESPACE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: INSTALLATION_METHOD
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.annotations['installation-method']
ports:
- containerPort: 8088
protocol: TCP
resources:
{{ toYaml .Values.collector.resources | indent 10 }}
volumeMounts:
- name: procfs
mountPath: /host/proc
readOnly: true
- name: config
mountPath: /etc/collector/
readOnly: true
{{- if .Values.collector.priorityClassName }}
priorityClassName: {{ .Values.collector.priorityClassName }}
{{- end }}
volumes:
- name: procfs
hostPath:
path: /proc
- name: config
configMap:
name: {{ template "wavefront.collector.fullname" . }}-config
{{- end }}