mirror of
https://github.com/containers/podman.git
synced 2025-12-03 19:59:39 +08:00
As it stands, createconfig is a huge struct. This works fine when the only caller is when we create a container with a fully created config. However, if we wish to share code for security and namespace configuration, a single large struct becomes unweildy, as well as difficult to configure with the single createConfigToOCISpec function. This PR breaks up namespace and security configuration into their own structs, with the eventual goal of allowing the namespace/security fields to be configured by the pod create cli, and allow the infra container to share this with the pod's containers. Signed-off-by: Peter Hunt <pehunt@redhat.com>
33 lines
988 B
Go
33 lines
988 B
Go
// +build !linux
|
|
|
|
package createconfig
|
|
|
|
import (
|
|
spec "github.com/opencontainers/runtime-spec/specs-go"
|
|
"github.com/opencontainers/runtime-tools/generate"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func getSeccompConfig(config *SecurityConfig, configSpec *spec.Spec) (*spec.LinuxSeccomp, error) {
|
|
return nil, errors.New("function not supported on non-linux OS's")
|
|
}
|
|
func addDevice(g *generate.Generator, device string) error {
|
|
return errors.New("function not implemented")
|
|
}
|
|
|
|
func (c *CreateConfig) addPrivilegedDevices(g *generate.Generator) error {
|
|
return errors.New("function not implemented")
|
|
}
|
|
|
|
func (c *CreateConfig) createBlockIO() (*spec.LinuxBlockIO, error) {
|
|
return nil, errors.New("function not implemented")
|
|
}
|
|
|
|
func makeThrottleArray(throttleInput []string, rateType int) ([]spec.LinuxThrottleDevice, error) {
|
|
return nil, errors.New("function not implemented")
|
|
}
|
|
|
|
func devicesFromPath(g *generate.Generator, devicePath string) error {
|
|
return errors.New("function not implemented")
|
|
}
|