This PR consists of some small improvements to the existing monitor-pv bash script.
Uses findmnt --df as a way to determine PV mount points over using df. The local PV mounts do not show up in case of the latter. Findmnt has a broader reach, i.e., looks for filesystems in /etc/mtab, /etc/fstab & /proc/self/mountinfo by default. the --df flag (outputs in similar format as df) has been used to enable simpler command output parse.
The mount points for a given PV are filtered to the one in this path var/lib/kubelet/pods as this is the constant in a list of several mounts (including those depending on PV type and Cluster type. For example, /var/lib/kubelet/plugins/, /home/kubernetes/containerized_mounter/)
Fixes the command to obtain volume capacity in bytes
Determines whether the unit of PV contains "i"
cut doesn't accept multi-character delimiter, so tr is used instead
Adds a sample deployment spec that uses openebs namespace and serviceaccount.
Changes
This PR consists of some small improvements to the existing monitor-pv bash script.
Uses
findmnt --df
as a way to determine PV mount points over usingdf
. The local PV mounts do not show up in case of the latter. Findmnt has a broader reach, i.e., looks for filesystems in/etc/mtab
,/etc/fstab
&/proc/self/mountinfo
by default. the--df
flag (outputs in similar format as df) has been used to enable simpler command output parse.The mount points for a given PV are filtered to the one in this path
var/lib/kubelet/pods
as this is the constant in a list of several mounts (including those depending on PV type and Cluster type. For example,/var/lib/kubelet/plugins/
,/home/kubernetes/containerized_mounter/
)Fixes the command to obtain volume capacity in bytes
cut
doesn't accept multi-character delimiter, sotr
is used insteadAdds a sample deployment spec that uses openebs namespace and serviceaccount.
Signed-off-by: ksatchit karthik.s@mayadata.io