Verify VM disk size and relax kubelet disk reqs

Stop running airship-in-a-bottle.sh if minimum disk size requirements are not
met. Relax kubelet's default disk thresholds.

Change-Id: Id4cd251c585233b1b8e741b8c4f56a77ffd4e0c0
This commit is contained in:
Roman Gorshunov 2019-01-17 14:29:32 +01:00
parent b30c0d6ab4
commit e44d0f7fdd
3 changed files with 8 additions and 2 deletions

View File

@ -26,8 +26,10 @@ data:
- --cni-bin-dir=/opt/cni/bin
- --cni-conf-dir=/etc/cni/net.d
- --eviction-max-pod-grace-period=-1
- --eviction-hard="nodefs.available<1Gi,imagefs.available<1Gi"
- --eviction-minimum-reclaim="nodefs.available=1Gi,imagefs.available=1Gi"
- --network-plugin=cni
- --node-status-update-frequency=5s
- --seccomp-profile-root=SECCOMP_PROFILE_ROOT
- --serialize-image-pulls=false
- --v=5
- --seccomp-profile-root=SECCOMP_PROFILE_ROOT

View File

@ -19,6 +19,8 @@ data:
- --cni-bin-dir=/opt/cni/bin
- --cni-conf-dir=/etc/cni/net.d
- --eviction-max-pod-grace-period=-1
- --eviction-hard="nodefs.available<1Gi,imagefs.available<1Gi"
- --eviction-minimum-reclaim="nodefs.available=1Gi,imagefs.available=1Gi"
- --network-plugin=cni
- --node-status-update-frequency=5s
- --serialize-image-pulls=false

View File

@ -66,8 +66,10 @@ echo ""
echo "The minimum recommended size of the Ubuntu 16.04 VM is 4 vCPUs, 20GB of RAM with 32GB disk space."
CPU_COUNT=$(grep -c processor /proc/cpuinfo)
RAM_TOTAL=$(awk '/MemTotal/ {print $2}' /proc/meminfo)
# Blindly assume that all storage on this VM is under root FS
DISK_SIZE=$(df --output=source,size / | awk '/dev/ {print $2}')
source /etc/os-release
if [[ $CPU_COUNT -lt 4 || $RAM_TOTAL -lt 20000000 || $NAME != "Ubuntu" || $VERSION_ID != "16.04" ]]; then
if [[ $CPU_COUNT -lt 4 || $RAM_TOTAL -lt 20000000 || $DISK_SIZE -lt 30000000 || $NAME != "Ubuntu" || $VERSION_ID != "16.04" ]]; then
echo "Error: minimum VM recommendations are not met. Exiting."
exit 1
fi