mirror of
https://github.com/containers/podman.git
synced 2025-06-27 13:38:49 +08:00
Add support for selecting kvm and systemd labels
In order to better support kata containers and systemd containers container-selinux has added new types. Podman should execute the container with an SELinux process label to match the container type. Traditional Container process : container_t KVM Container Process: containre_kvm_t PID 1 Init process: container_init_t Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
3
vendor/github.com/containers/common/pkg/config/config.go
generated
vendored
@ -87,6 +87,9 @@ type ContainersConfig struct {
|
||||
// Default way to create a cgroup namespace for the container
|
||||
CgroupNS string `toml:"cgroupns"`
|
||||
|
||||
// Default cgroup configuration
|
||||
Cgroups string `toml:"cgroups"`
|
||||
|
||||
// Capabilities to add to all containers.
|
||||
DefaultCapabilities []string `toml:"default_capabilities"`
|
||||
|
||||
|
9
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
9
vendor/github.com/containers/common/pkg/config/containers.conf
generated
vendored
@ -47,6 +47,15 @@
|
||||
#
|
||||
# cgroupns = "private"
|
||||
|
||||
# Control container cgroup configuration
|
||||
# Determines whether the container will create CGroups.
|
||||
# Options are:
|
||||
# `enabled` Enable cgroup support within container
|
||||
# `disabled` Disable cgroup support, will inherit cgroups from parent
|
||||
# `no-conmon` Container engine runs run without conmon
|
||||
#
|
||||
# cgroups = "enabled"
|
||||
|
||||
# List of default capabilities for containers. If it is empty or commented out,
|
||||
# the default capabilities defined in the container engine will be added.
|
||||
#
|
||||
|
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
6
vendor/github.com/containers/common/pkg/config/default.go
generated
vendored
@ -148,6 +148,7 @@ func DefaultConfig() (*Config, error) {
|
||||
Annotations: []string{},
|
||||
ApparmorProfile: DefaultApparmorProfile,
|
||||
CgroupNS: "private",
|
||||
Cgroups: "enabled",
|
||||
DefaultCapabilities: DefaultCapabilities,
|
||||
DefaultSysctls: []string{},
|
||||
DefaultUlimits: getDefaultProcessLimits(),
|
||||
@ -439,6 +440,11 @@ func (c *Config) CgroupNS() string {
|
||||
return c.Containers.CgroupNS
|
||||
}
|
||||
|
||||
// Cgroups returns whether to containers with cgroup confinement
|
||||
func (c *Config) Cgroups() string {
|
||||
return c.Containers.Cgroups
|
||||
}
|
||||
|
||||
// UTSNS returns the default UTS Namespace configuration to run containers with
|
||||
func (c *Config) UTSNS() string {
|
||||
return c.Containers.UTSNS
|
||||
|
Reference in New Issue
Block a user