Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/production/kubernetes/agent-bare.yaml
4095 views
1
apiVersion: v1
2
kind: ServiceAccount
3
metadata:
4
name: grafana-agent
5
namespace: ${NAMESPACE}
6
---
7
apiVersion: rbac.authorization.k8s.io/v1
8
kind: ClusterRole
9
metadata:
10
name: grafana-agent
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
34
roleRef:
35
apiGroup: rbac.authorization.k8s.io
36
kind: ClusterRole
37
name: grafana-agent
38
subjects:
39
- kind: ServiceAccount
40
name: grafana-agent
41
namespace: ${NAMESPACE}
42
---
43
apiVersion: v1
44
kind: Service
45
metadata:
46
labels:
47
name: grafana-agent
48
name: grafana-agent
49
namespace: ${NAMESPACE}
50
spec:
51
clusterIP: None
52
ports:
53
- name: grafana-agent-http-metrics
54
port: 80
55
targetPort: 80
56
selector:
57
name: grafana-agent
58
---
59
apiVersion: apps/v1
60
kind: StatefulSet
61
metadata:
62
name: grafana-agent
63
namespace: ${NAMESPACE}
64
spec:
65
replicas: 1
66
selector:
67
matchLabels:
68
name: grafana-agent
69
serviceName: grafana-agent
70
template:
71
metadata:
72
labels:
73
name: grafana-agent
74
spec:
75
containers:
76
- args:
77
- -config.expand-env=true
78
- -config.file=/etc/agent/agent.yaml
79
- -enable-features=integrations-next
80
- -server.http.address=0.0.0.0:80
81
env:
82
- name: HOSTNAME
83
valueFrom:
84
fieldRef:
85
fieldPath: spec.nodeName
86
image: grafana/agent:v0.33.2
87
imagePullPolicy: IfNotPresent
88
name: grafana-agent
89
ports:
90
- containerPort: 80
91
name: http-metrics
92
volumeMounts:
93
- mountPath: /var/lib/agent
94
name: agent-wal
95
- mountPath: /etc/agent
96
name: grafana-agent
97
serviceAccountName: grafana-agent
98
volumes:
99
- configMap:
100
name: grafana-agent
101
name: grafana-agent
102
updateStrategy:
103
type: RollingUpdate
104
volumeClaimTemplates:
105
- apiVersion: v1
106
kind: PersistentVolumeClaim
107
metadata:
108
name: agent-wal
109
namespace: ${NAMESPACE}
110
spec:
111
accessModes:
112
- ReadWriteOnce
113
resources:
114
requests:
115
storage: 5Gi
116
117