136
templates/Daemonset-GrafanaAgent.yaml
Normal file
136
templates/Daemonset-GrafanaAgent.yaml
Normal file
@ -0,0 +1,136 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/component: exporter
|
||||
app.kubernetes.io/name: grafana-agent
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
metricsJob: node-exporter
|
||||
cadvisormetricsJob: cadvisor
|
||||
nodeExportermetricsJob: node
|
||||
name: grafana-agent
|
||||
namespace: "{{ .Values.nfc_monitoring.grafana_agent.namespace }}"
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/component: exporter
|
||||
app.kubernetes.io/name: grafana-agent
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
metricsJob: node-exporter
|
||||
cadvisormetricsJob: cadvisor
|
||||
nodeExportermetricsJob: node
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/instance: k8s
|
||||
app.kubernetes.io/component: exporter
|
||||
app.kubernetes.io/name: grafana-agent
|
||||
app.kubernetes.io/managed-by: {{ $.Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ $.Chart.Name }}
|
||||
app.kubernetes.io/version: {{ $.Chart.Version }}
|
||||
metricsJob: node-exporter
|
||||
cadvisormetricsJob: cadvisor
|
||||
nodeExportermetricsJob: node
|
||||
spec:
|
||||
automountServiceAccountToken: true
|
||||
containers:
|
||||
- args:
|
||||
- --server.http.address=0.0.0.0:12345
|
||||
- --config.file=/etc/agent/agent.yaml
|
||||
name: grafana-agent
|
||||
image: "{{ .Values.nfc_monitoring.grafana_agent.image.name }}:{{ .Values.nfc_monitoring.grafana_agent.image.tag }}"
|
||||
#imagePullPolicy: Never
|
||||
ports:
|
||||
- containerPort: 12345
|
||||
name: grafana-metrics
|
||||
protocol: TCP
|
||||
resources:
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 180Mi
|
||||
requests:
|
||||
cpu: 40m
|
||||
memory: 180Mi
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_TIME
|
||||
# drop:
|
||||
# - ALL
|
||||
readOnlyRootFilesystem: false
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- mountPath: /host/sys
|
||||
mountPropagation: HostToContainer
|
||||
name: sys
|
||||
readOnly: true
|
||||
- mountPath: /host/proc
|
||||
mountPropagation: HostToContainer
|
||||
name: proc
|
||||
readOnly: true
|
||||
- mountPath: /host/root
|
||||
mountPropagation: HostToContainer
|
||||
name: rootfs
|
||||
readOnly: true
|
||||
- mountPath: /var/log
|
||||
mountPropagation: HostToContainer
|
||||
name: logs
|
||||
readOnly: true
|
||||
- name: config
|
||||
mountPath: "/etc/agent"
|
||||
readOnly: false
|
||||
- name: temp
|
||||
mountPath: "/tmp"
|
||||
readOnly: false
|
||||
- name: agent-data
|
||||
mountPath: "/etc/agent/data"
|
||||
readOnly: false
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /sys
|
||||
name: sys
|
||||
- hostPath:
|
||||
path: /proc
|
||||
name: proc
|
||||
- hostPath:
|
||||
path: /
|
||||
name: rootfs
|
||||
- hostPath:
|
||||
path: /var/log
|
||||
name: logs
|
||||
- name: config
|
||||
configMap:
|
||||
name: grafana-agent
|
||||
items:
|
||||
- key: "agent.yaml"
|
||||
path: "agent.yaml"
|
||||
- name: temp
|
||||
emptyDir: {}
|
||||
- name: agent-data
|
||||
emptyDir: {}
|
||||
|
||||
- name: var-run
|
||||
hostPath:
|
||||
path: /var/run
|
||||
- name: containerd
|
||||
hostPath:
|
||||
path: /var/lib/contairnerd
|
||||
- name: disk
|
||||
hostPath:
|
||||
path: /dev/disk
|
||||
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
hostNetwork: true
|
||||
hostPID: true
|
||||
priorityClassName: system-cluster-critical
|
||||
serviceAccountName: grafana-agent
|
||||
tolerations:
|
||||
- operator: Exists
|
||||
Reference in New Issue
Block a user