mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Drop unnecessary intermediate variable
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
parent
333311c7ee
commit
a69d635c9b
@ -51,16 +51,15 @@ func setupContainerdConfig(ctx context.Context, cfg *config.Node) error {
|
||||
disableCgroup := isRunningInUserNS && (!controllers["cpu"] || !controllers["pids"] || !cgroupfsWritable)
|
||||
if disableCgroup {
|
||||
logrus.Warn("cgroup v2 controllers are not delegated for rootless. Disabling cgroup.")
|
||||
} else {
|
||||
cfg.AgentConfig.Systemd = controllers["cpuset"] && os.Getenv("NOTIFY_SOCKET") != ""
|
||||
}
|
||||
|
||||
systemdCgroup := controllers["cpuset"] && os.Getenv("NOTIFY_SOCKET") != ""
|
||||
cfg.AgentConfig.Systemd = systemdCgroup
|
||||
|
||||
var containerdTemplate string
|
||||
containerdConfig := templates.ContainerdConfig{
|
||||
NodeConfig: cfg,
|
||||
DisableCgroup: disableCgroup,
|
||||
SystemdCgroup: systemdCgroup,
|
||||
SystemdCgroup: cfg.AgentConfig.Systemd,
|
||||
IsRunningInUserNS: isRunningInUserNS,
|
||||
PrivateRegistryConfig: privRegistries.Registry,
|
||||
ExtraRuntimes: findNvidiaContainerRuntimes(os.DirFS(string(os.PathSeparator))),
|
||||
|
Loading…
Reference in New Issue
Block a user