Debian Codegraph @

testdata/collectorforkubernetes.yaml.golden/collectorforkubernetes-daemonset.yaml

raw
1 apiVersion: apps/v1
2 kind: DaemonSet
3 metadata:
4 name: collectorforkubernetes
5 namespace: collectorforkubernetes
6 labels:
7 app: collectorforkubernetes
8 spec:
9 # Default updateStrategy is OnDelete. For collector RollingUpdate is suitable
10 # When you update configuration
11 updateStrategy:
12 type: RollingUpdate
13
14 selector:
15 matchLabels:
16 daemon: collectorforkubernetes
17
18 template:
19 metadata:
20 name: collectorforkubernetes
21 labels:
22 daemon: collectorforkubernetes
23
24 spec:
25
26 priorityClassName: collectorforkubernetes-critical
27
28 dnsPolicy: ClusterFirstWithHostNet
29 hostNetwork: true
30 serviceAccountName: collectorforkubernetes
31 # We run this DaemonSet only for Non-Masters
32 affinity:
33 nodeAffinity:
34 requiredDuringSchedulingIgnoredDuringExecution:
35 nodeSelectorTerms:
36 - matchExpressions:
37 - key: node-role.kubernetes.io/master
38 operator: DoesNotExist
39 tolerations:
40 - operator: "Exists"
41 effect: "NoSchedule"
42 - operator: "Exists"
43 effect: "NoExecute"
44 containers:
45 - name: collectorforkubernetes
46 # Collector version
47 image: docker.io/outcoldsolutions/collectorforkubernetes:5.14.284
48 imagePullPolicy: Always
49 securityContext:
50 runAsUser: 0
51 privileged: true
52 # Define your resources if you need. Defaults should be fine for most.
53 # You can lower or increase based on your hosts.
54 resources:
55 limits:
56 cpu: 2
57 memory: 512Mi
58 requests:
59 cpu: 200m
60 memory: 192Mi
61 env:
62 - name: KUBERNETES_NODENAME
63 valueFrom:
64 fieldRef:
65 fieldPath: spec.nodeName
66 - name: POD_NAME
67 valueFrom:
68 fieldRef:
69 fieldPath: metadata.name
70 volumeMounts:
71 # We store state in /data folder (file positions)
72 - name: collectorforkubernetes-state
73 mountPath: /data
74 # Configuration file deployed with ConfigMap
75 - name: collectorforkubernetes-config
76 mountPath: /config/
77 readOnly: true
78 # Cgroup filesystem to get metrics
79 - name: cgroup
80 mountPath: /rootfs/sys/fs/cgroup
81 readOnly: true
82 # Proc filesystem to get metrics
83 - name: proc
84 mountPath: /rootfs/proc
85 readOnly: true
86 # Location of docker root (for container logs and metadata)
87 - name: docker-root
88 mountPath: /rootfs/var/lib/docker/
89 readOnly: true
90 mountPropagation: HostToContainer
91 # Docker socket
92 - name: docker-unix-socket
93 mountPath: /rootfs/var/run/docker.sock
94 readOnly: true
95 # CRI-O socket (if using CRI-O runtime)
96 - name: crio-unix-socket
97 mountPath: /rootfs/var/run/crio/
98 readOnly: true
99 # Containerd socket (if using containerd runtime)
100 - name: containerd-unix-socket
101 mountPath: /rootfs/var/run/containerd/
102 readOnly: true
103 # Host logs location (including CRI-O logs)
104 - name: logs
105 mountPath: /rootfs/var/log/
106 readOnly: true
107 - name: run-logs
108 mountPath: /rootfs/run/log/
109 readOnly: true
110 # Application logs
111 - name: volumes-root
112 mountPath: /rootfs/var/lib/kubelet/
113 readOnly: true
114 mountPropagation: HostToContainer
115 # correct timezone
116 - name: localtime
117 mountPath: /etc/localtime
118 readOnly: true
119 volumes:
120 # We store state directly on host, change this location, if
121 # your persistent volume is somewhere else
122 - name: collectorforkubernetes-state
123 hostPath:
124 path: /var/lib/collectorforkubernetes/data/
125 # Location of docker root (for container logs and metadata)
126 - name: docker-root
127 hostPath:
128 path: /var/lib/docker/
129 # Location of cgroups file system
130 - name: cgroup
131 hostPath:
132 path: /sys/fs/cgroup
133 # Location of proc file system
134 - name: proc
135 hostPath:
136 path: /proc
137 # Host logs location (including CRI-O logs)
138 - name: logs
139 hostPath:
140 path: /var/log
141 - name: run-logs
142 hostPath:
143 path: /run/log
144 # Docker socket
145 - name: docker-unix-socket
146 hostPath:
147 path: /var/run/docker.sock
148 # CRI-O socket (if using CRI-O runtime)
149 - name: crio-unix-socket
150 hostPath:
151 path: /var/run/crio/
152 # containerd socket (if using containerd runtime)
153 - name: containerd-unix-socket
154 hostPath:
155 path: /var/run/containerd/
156 # Location for kubelet mounts, to autodiscover application logs
157 - name: volumes-root
158 hostPath:
159 path: /var/lib/kubelet/
160 # correct timezone
161 - name: localtime
162 hostPath:
163 path: /etc/localtime
164 # configuration from ConfigMap
165 - name: collectorforkubernetes-config
166 configMap:
167 name: collectorforkubernetes
168 items:
169 - key: 001-general.conf
170 path: 001-general.conf
171 - key: 002-daemonset.conf
172 path: 002-daemonset.conf