mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 14:54:19 +01:00
storage: make k8s emptyDir creation configurable
This change introduces the `disable_guest_empty_dir` config option, which allows the user to change whether a Kubernetes emptyDir volume is created on the guest (the default, for performance reasons), or the host (necessary if you want to pass data from the host to a guest via an emptyDir). Fixes #2053 Signed-off-by: Evan Foster <efoster@adobe.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2018-2022 Intel Corporation
|
||||
// Copyright (c) 2018 HyperHQ Inc.
|
||||
// Copyright (c) 2021 Adobe Inc.
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
@@ -154,6 +155,7 @@ type runtime struct {
|
||||
SandboxCgroupOnly bool `toml:"sandbox_cgroup_only"`
|
||||
StaticSandboxResourceMgmt bool `toml:"static_sandbox_resource_mgmt"`
|
||||
EnablePprof bool `toml:"enable_pprof"`
|
||||
DisableGuestEmptyDir bool `toml:"disable_guest_empty_dir"`
|
||||
}
|
||||
|
||||
type agent struct {
|
||||
@@ -1173,6 +1175,8 @@ func LoadConfiguration(configPath string, ignoreLogging bool) (resolvedConfigPat
|
||||
}
|
||||
config.SandboxBindMounts = tomlConf.Runtime.SandboxBindMounts
|
||||
|
||||
config.DisableGuestEmptyDir = tomlConf.Runtime.DisableGuestEmptyDir
|
||||
|
||||
if err := checkConfig(config); err != nil {
|
||||
return "", config, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user