-
Notifications
You must be signed in to change notification settings - Fork 2
/
honeycomb-agent.yaml
142 lines (139 loc) · 3.23 KB
/
honeycomb-agent.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Service account for the agent
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: honeycomb-serviceaccount
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: honeycomb-serviceaccount
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: honeycomb-serviceaccount
subjects:
- kind: ServiceAccount
name: honeycomb-serviceaccount
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: honeycomb-serviceaccount
namespace: kube-system
rules:
- apiGroups:
- "*"
resources:
- pods
- nodes/stats
- nodes/proxy
verbs:
- list
- watch
- get
# ConfigMap specifying which logs the agent should watch
---
apiVersion: v1
kind: ConfigMap
metadata:
name: honeycomb-agent-config
namespace: kube-system
data:
config.yaml: |
apiHost: https://api.honeycomb.io/
watchers:
- dataset: kubernetes-logs
labelSelector: component=kube-controller-manager
namespace: kube-system
parser: glog
- dataset: kubernetes-logs
labelSelector: component=kube-scheduler
namespace: kube-system
parser: glog
verbosity: info
splitLogging: false
metrics:
clusterName: platform-services-cluster
dataset: kubernetes-metrics
enabled: true
metricGroups:
- node
- pod
# Daemonset
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: honeycomb-agent
kubernetes.io/cluster-service: 'true'
version: v2.1.0
name: honeycomb-agent-v2.1.0
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: honeycomb-agent
updateStrategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
template:
metadata:
labels:
k8s-app: honeycomb-agent
kubernetes.io/cluster-service: 'true'
version: v2.1.0
spec:
tolerations:
- operator: Exists
effect: NoSchedule
containers:
- env:
- name: HONEYCOMB_APIKEY
valueFrom:
secretKeyRef:
key: api-key
name: honeycomb
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
image: honeycombio/honeycomb-kubernetes-agent:2.1.0
imagePullPolicy: IfNotPresent
name: honeycomb-agent
resources:
limits:
memory: 200Mi
requests:
cpu: 100m
memory: 200Mi
volumeMounts:
- mountPath: "/etc/honeycomb"
name: config
readOnly: false
- mountPath: "/var/log"
name: varlog
readOnly: false
- mountPath: "/var/lib/docker/containers"
name: varlibdockercontainers
readOnly: true
serviceAccountName: honeycomb-serviceaccount
terminationGracePeriodSeconds: 30
volumes:
- configMap:
items:
- key: config.yaml
path: config.yaml
name: honeycomb-agent-config
name: config
- hostPath:
path: "/var/log"
name: varlog
- hostPath:
path: "/var/lib/docker/containers"
name: varlibdockercontainers