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
e5c61922
Commit
e5c61922
authored
Oct 28, 2016
by
Vishnu Kannan
Committed by
Vishnu kannan
Nov 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In gci mounter script, expose /var/lib/kubelet only and add more debugging logs.
Added a retry for rkt gc just to be safe. Signed-off-by:
Vishnu Kannan
<
vishnuk@google.com
>
parent
1ecc12f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
mounter
cluster/gce/gci/mounter/mounter
+15
-3
No files found.
cluster/gce/gci/mounter/mounter
View file @
e5c61922
...
@@ -23,14 +23,25 @@ MOUNTER_USER=root
...
@@ -23,14 +23,25 @@ MOUNTER_USER=root
RKT_BINARY
=
/home/kubernetes/bin/rkt
RKT_BINARY
=
/home/kubernetes/bin/rkt
function
gc
{
function
gc
{
${
RKT_BINARY
}
gc
--grace-period
=
0s &> /dev/null
# Attempt to garbage collect rkt pods with 5 retries.
# Rkt pods end up creating new copies of mounts on the host. Hence it is ideal to clean them up right away.
attempt
=
0
until
[
$attempt
-ge
5
]
;
do
${
RKT_BINARY
}
gc
--grace-period
=
0s
&&
break
attempt
=
$[$attempt
+1]
sleep
1
done
}
}
# Garbage collect old rkt containers on exit
# Garbage collect old rkt containers on exit
trap
gc EXIT
trap
gc EXIT
echo
"Running mount using a rkt fly container"
${
RKT_BINARY
}
run
--stage1-name
=
"coreos.com/rkt/stage1-fly:1.18.0"
\
${
RKT_BINARY
}
run
--stage1-name
=
"coreos.com/rkt/stage1-fly:1.18.0"
\
--insecure-options
=
image
\
--insecure-options
=
image
\
--volume
=
rootfs,kind
=
host,source
=
/
,readOnly
=
false
,recursive
=
true
\
--volume
=
kubelet,kind
=
host,source
=
/var/lib/kubelet
,readOnly
=
false
,recursive
=
true
\
--mount
volume
=
rootfs,target
=
/media/roo
t
\
--mount
volume
=
kubelet,target
=
/var/lib/kubele
t
\
docker://
${
MOUNTER_DOCKER_IMAGE
}
:
${
MOUNTER_DOCKER_VERSION
}
--user
=
${
MOUNTER_USER
}
--exec
/bin/mount
--
"
$@
"
docker://
${
MOUNTER_DOCKER_IMAGE
}
:
${
MOUNTER_DOCKER_VERSION
}
--user
=
${
MOUNTER_USER
}
--exec
/bin/mount
--
"
$@
"
echo
"Successfully ran mount using a rkt fly container"
\ No newline at end of file
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