Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/production/kubernetes/agent-loki.yaml
4094 views
1
apiVersion: v1
2
kind: ServiceAccount
3
metadata:
4
name: grafana-agent-logs
5
namespace: ${NAMESPACE}
6
---
7
apiVersion: rbac.authorization.k8s.io/v1
8
kind: ClusterRole
9
metadata:
10
name: grafana-agent-logs
11
rules:
12
- apiGroups:
13
- ""
14
resources:
15
- nodes
16
- nodes/proxy
17
- services
18
- endpoints
19
- pods
20
- events
21
verbs:
22
- get
23
- list
24
- watch
25
- nonResourceURLs:
26
- /metrics
27
verbs:
28
- get
29
---
30
apiVersion: rbac.authorization.k8s.io/v1
31
kind: ClusterRoleBinding
32
metadata:
33
name: grafana-agent-logs
34
roleRef:
35
apiGroup: rbac.authorization.k8s.io
36
kind: ClusterRole
37
name: grafana-agent-logs
38
subjects:
39
- kind: ServiceAccount
40
name: grafana-agent-logs
41
namespace: ${NAMESPACE}
42
---
43
apiVersion: apps/v1
44
kind: DaemonSet
45
metadata:
46
name: grafana-agent-logs
47
namespace: ${NAMESPACE}
48
spec:
49
minReadySeconds: 10
50
selector:
51
matchLabels:
52
name: grafana-agent-logs
53
template:
54
metadata:
55
labels:
56
name: grafana-agent-logs
57
spec:
58
containers:
59
- args:
60
- -config.expand-env=true
61
- -config.file=/etc/agent/agent.yaml
62
- -server.http.address=0.0.0.0:80
63
env:
64
- name: HOSTNAME
65
valueFrom:
66
fieldRef:
67
fieldPath: spec.nodeName
68
image: grafana/agent:v0.33.2
69
imagePullPolicy: IfNotPresent
70
name: grafana-agent-logs
71
ports:
72
- containerPort: 80
73
name: http-metrics
74
securityContext:
75
privileged: true
76
runAsUser: 0
77
volumeMounts:
78
- mountPath: /etc/agent
79
name: grafana-agent-logs
80
- mountPath: /var/log
81
name: varlog
82
- mountPath: /var/lib/docker/containers
83
name: varlibdockercontainers
84
readOnly: true
85
serviceAccountName: grafana-agent-logs
86
tolerations:
87
- effect: NoSchedule
88
operator: Exists
89
volumes:
90
- configMap:
91
name: grafana-agent-logs
92
name: grafana-agent-logs
93
- hostPath:
94
path: /var/log
95
name: varlog
96
- hostPath:
97
path: /var/lib/docker/containers
98
name: varlibdockercontainers
99
updateStrategy:
100
type: RollingUpdate
101
102