-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathocs-disk-gatherer-sha-no-secret.yaml
57 lines (57 loc) · 1.64 KB
/
ocs-disk-gatherer-sha-no-secret.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
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: ocs-disk-gatherer
namespace: default
labels:
k8s-app: ocs-disk-gatherer
spec:
selector:
matchLabels:
name: ocs-disk-gatherer
template:
metadata:
labels:
name: ocs-disk-gatherer
spec:
nodeSelector:
cluster.ocs.openshift.io/openshift-storage: ''
tolerations:
- key: "node.ocs.openshift.io/storage"
operator: Equal
value: "true"
containers:
- name: collector
image: registry.access.redhat.com/ubi8/ubi@sha256:d9ffa81feedcea07cd842d7d3737e73808cb6d0dc57caed0bfd5569cbba3cd8f
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- |
#!/bin/bash
while true;
echo " # NODE:${MY_NODE_NAME}";
do
for disk in $(readlink -f $(ls -1 /dev/disk/by-id/* | egrep -v 'DVD|dm|ceph|luks|part|lvm') | sort|uniq); do
DISKNAME=$(basename $disk)
echo -n " # $DISKNAME : " ;
echo "$(lsblk --output NAME,SIZE --nodeps|grep "$DISKNAME" |awk '{print $NF}')" ;
echo " - $(ls -l /dev/disk/by-id/*|grep "$DISKNAME" | head -n1 | awk '{print $9}')";
done;
echo " -------------------------------------------"
sleep '600';
done;
volumeMounts:
- mountPath: /dev/disk
name: dev-disk
env:
- name: MY_NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext: {}
volumes:
- name: dev-disk
hostPath:
path: /dev/disk