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
38d13e03
Unverified
Commit
38d13e03
authored
Oct 07, 2024
by
Ludo Stellingwerff
Committed by
GitHub
Oct 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow additional Rootless CopyUpDirs through K3S_ROOTLESS_COPYUPDIRS env variable (#10386)
Signed-off-by:
Ludo Stellingwerff
<
ludo.stellingwerff@gmail.com
>
parent
0942e6a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
rootless.go
pkg/rootless/rootless.go
+4
-0
No files found.
pkg/rootless/rootless.go
View file @
38d13e03
...
@@ -32,6 +32,7 @@ var (
...
@@ -32,6 +32,7 @@ var (
enableIPv6Env
=
"K3S_ROOTLESS_ENABLE_IPV6"
enableIPv6Env
=
"K3S_ROOTLESS_ENABLE_IPV6"
portDriverEnv
=
"K3S_ROOTLESS_PORT_DRIVER"
portDriverEnv
=
"K3S_ROOTLESS_PORT_DRIVER"
disableLoopbackEnv
=
"K3S_ROOTLESS_DISABLE_HOST_LOOPBACK"
disableLoopbackEnv
=
"K3S_ROOTLESS_DISABLE_HOST_LOOPBACK"
copyUpDirsEnv
=
"K3S_ROOTLESS_COPYUPDIRS"
)
)
func
Rootless
(
stateDir
string
,
enableIPv6
bool
)
error
{
func
Rootless
(
stateDir
string
,
enableIPv6
bool
)
error
{
...
@@ -218,6 +219,9 @@ func createChildOpt(driver portDriver) (*child.Opt, error) {
...
@@ -218,6 +219,9 @@ func createChildOpt(driver portDriver) (*child.Opt, error) {
opt
.
NetworkDriver
=
slirp4netns
.
NewChildDriver
()
opt
.
NetworkDriver
=
slirp4netns
.
NewChildDriver
()
opt
.
PortDriver
=
driver
.
NewChildDriver
()
opt
.
PortDriver
=
driver
.
NewChildDriver
()
opt
.
CopyUpDirs
=
[]
string
{
"/etc"
,
"/var/run"
,
"/run"
,
"/var/lib"
}
opt
.
CopyUpDirs
=
[]
string
{
"/etc"
,
"/var/run"
,
"/run"
,
"/var/lib"
}
if
copyUpDirs
:=
os
.
Getenv
(
copyUpDirsEnv
);
copyUpDirs
!=
""
{
opt
.
CopyUpDirs
=
append
(
opt
.
CopyUpDirs
,
strings
.
Split
(
copyUpDirs
,
","
)
...
)
}
opt
.
CopyUpDriver
=
tmpfssymlink
.
NewChildDriver
()
opt
.
CopyUpDriver
=
tmpfssymlink
.
NewChildDriver
()
opt
.
MountProcfs
=
true
opt
.
MountProcfs
=
true
opt
.
Reaper
=
true
opt
.
Reaper
=
true
...
...
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