Browse Source

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
Roman Gorshunov 3 months ago
parent
commit
e44d0f7fdd

+ 3
- 1
deployment_files/global/v1.0demo/software/config/Kubelet.yaml View File

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

+ 2
- 0
deployment_files/global/v1.0dev/software/config/Kubelet.yaml View File

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

+ 3
- 1
manifests/dev_single_node/airship-in-a-bottle.sh View File

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

Loading…
Cancel
Save