Skip to content

Commit

Permalink
Merge pull request openshift#3299 from kenneth-dsouza/round-off-patch
Browse files Browse the repository at this point in the history
Round off SYSTEM_RESERVED_MEMORY if value is in decimal
  • Loading branch information
openshift-merge-robot authored Aug 22, 2022
2 parents 62b1e70 + f14eff0 commit bfb5d9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions templates/common/_base/files/kubelet-auto-sizing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ contents:
if (($total_memory >= 0)); then # 2% of any memory above 128GB
recommended_systemreserved_memory=$(echo $recommended_systemreserved_memory $(echo $total_memory 0.02 | awk '{print $1 * $2}') | awk '{print $1 + $2}')
fi
recommended_systemreserved_memory=$(echo $recommended_systemreserved_memory | awk '{printf("%d\n",$1 + 0.5)}') # Round off so we avoid float conversions
echo "SYSTEM_RESERVED_MEMORY=${recommended_systemreserved_memory}Gi">> ${NODE_SIZES_ENV}
}
function dynamic_cpu_sizing {
Expand Down

0 comments on commit bfb5d9f

Please sign in to comment.