Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0655e65b
Commit
0655e65b
authored
Dec 01, 2015
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fall back to old behavior when deciding mem availablity during build
parent
643cb7a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
golang.sh
hack/lib/golang.sh
+7
-1
No files found.
hack/lib/golang.sh
View file @
0655e65b
...
@@ -421,12 +421,18 @@ kube::golang::build_binaries_for_platform() {
...
@@ -421,12 +421,18 @@ kube::golang::build_binaries_for_platform() {
kube::golang::get_physmem
()
{
kube::golang::get_physmem
()
{
local
mem
local
mem
# Linux, in kb
# Linux
kernel version >=3.14
, in kb
if
mem
=
$(
grep
MemAvailable /proc/meminfo |
awk
'{ print $2 }'
)
;
then
if
mem
=
$(
grep
MemAvailable /proc/meminfo |
awk
'{ print $2 }'
)
;
then
echo
$((
${
mem
}
/
1048576
))
echo
$((
${
mem
}
/
1048576
))
return
return
fi
fi
# Linux, in kb
if
mem
=
$(
grep
MemTotal /proc/meminfo |
awk
'{ print $2 }'
)
;
then
echo
$((
${
mem
}
/
1048576
))
return
fi
# OS X, in bytes. Note that get_physmem, as used, should only ever
# OS X, in bytes. Note that get_physmem, as used, should only ever
# run in a Linux container (because it's only used in the multiple
# run in a Linux container (because it's only used in the multiple
# platform case, which is a Dockerized build), but this is provided
# platform case, which is a Dockerized build), but this is provided
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment