mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 15:13:08 +00:00
Merge pull request #35349 from vishh/gci-cmount
Automatic merge from submit-queue Update GCI mounter script to run in a rkt container Depends on #35652
This commit is contained in:
18
cluster/gce/gci/mounter/mounter
Normal file → Executable file
18
cluster/gce/gci/mounter/mounter
Normal file → Executable file
@@ -17,4 +17,20 @@
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
sudo /bin/mount "$@"
|
||||
MOUNTER_DOCKER_IMAGE=gcr.io/google_containers/gci-mounter
|
||||
MOUNTER_DOCKER_VERSION=v1
|
||||
MOUNTER_USER=root
|
||||
RKT_BINARY=/home/kubernetes/bin/rkt
|
||||
|
||||
function gc {
|
||||
${RKT_BINARY} gc --grace-period=0s &> /dev/null
|
||||
}
|
||||
|
||||
# Garbage collect old rkt containers on exit
|
||||
trap gc EXIT
|
||||
|
||||
${RKT_BINARY} run --stage1-name="coreos.com/rkt/stage1-fly:1.17.0" \
|
||||
--insecure-options=image \
|
||||
--volume=rootfs,kind=host,source=/,readOnly=false,recursive=true \
|
||||
--mount volume=rootfs,target=/media/root \
|
||||
docker://${MOUNTER_DOCKER_IMAGE}:${MOUNTER_DOCKER_VERSION} --user=${MOUNTER_USER} --exec /bin/mount -- "$@"
|
||||
|
Reference in New Issue
Block a user