Documentation ¶
Overview ¶
Package generate implements functions generating container config files.
Index ¶
- Variables
- type ExportOptions
- type Generator
- func (g *Generator) AddAnnotation(key, value string)
- func (g *Generator) AddDevice(device rspec.LinuxDevice)
- func (g *Generator) AddLinuxGIDMapping(hid, cid, size uint32)
- func (g *Generator) AddLinuxMaskedPaths(path string)
- func (g *Generator) AddLinuxReadonlyPaths(path string)
- func (g *Generator) AddLinuxResourcesBlockIOLeafWeightDevice(major int64, minor int64, weight uint16)
- func (g *Generator) AddLinuxResourcesBlockIOThrottleReadBpsDevice(major int64, minor int64, rate uint64)
- func (g *Generator) AddLinuxResourcesBlockIOThrottleReadIOPSDevice(major int64, minor int64, rate uint64)
- func (g *Generator) AddLinuxResourcesBlockIOThrottleWriteBpsDevice(major int64, minor int64, rate uint64)
- func (g *Generator) AddLinuxResourcesBlockIOThrottleWriteIOPSDevice(major int64, minor int64, rate uint64)
- func (g *Generator) AddLinuxResourcesBlockIOWeightDevice(major int64, minor int64, weight uint16)
- func (g *Generator) AddLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
- func (g *Generator) AddLinuxResourcesHugepageLimit(pageSize string, limit uint64)
- func (g *Generator) AddLinuxResourcesNetworkPriorities(name string, prio uint32)
- func (g *Generator) AddLinuxSysctl(key, value string)
- func (g *Generator) AddLinuxUIDMapping(hid, cid, size uint32)
- func (g *Generator) AddMount(mnt rspec.Mount)
- func (g *Generator) AddOrReplaceLinuxNamespace(ns string, path string) error
- func (g *Generator) AddPostStartHook(postStartHook rspec.Hook) error
- func (g *Generator) AddPostStopHook(postStopHook rspec.Hook) error
- func (g *Generator) AddPreStartHook(preStartHook rspec.Hook) error
- func (g *Generator) AddProcessAdditionalGid(gid uint32)
- func (g *Generator) AddProcessCapability(c string) error
- func (g *Generator) AddProcessCapabilityAmbient(c string) error
- func (g *Generator) AddProcessCapabilityBounding(c string) error
- func (g *Generator) AddProcessCapabilityEffective(c string) error
- func (g *Generator) AddProcessCapabilityInheritable(c string) error
- func (g *Generator) AddProcessCapabilityPermitted(c string) error
- func (g *Generator) AddProcessEnv(name, value string)
- func (g *Generator) AddProcessRlimits(rType string, rHard uint64, rSoft uint64)
- func (g *Generator) AddSolarisAnet(anet rspec.SolarisAnet)
- func (g *Generator) AddWindowsDevices(id, idType string) error
- func (g *Generator) AddWindowsLayerFolders(folder string)
- func (g *Generator) ClearAnnotations()
- func (g *Generator) ClearLinuxDevices()
- func (g *Generator) ClearLinuxGIDMappings()
- func (g *Generator) ClearLinuxNamespaces()
- func (g *Generator) ClearLinuxSysctl()
- func (g *Generator) ClearLinuxUIDMappings()
- func (g *Generator) ClearMounts()
- func (g *Generator) ClearPostStartHooks()
- func (g *Generator) ClearPostStopHooks()
- func (g *Generator) ClearPreStartHooks()
- func (g *Generator) ClearProcessAdditionalGids()
- func (g *Generator) ClearProcessCapabilities()
- func (g *Generator) ClearProcessEnv()
- func (g *Generator) ClearProcessRlimits()
- func (g *Generator) DropLinuxResourcesBlockIOLeafWeightDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesBlockIOThrottleReadBpsDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesBlockIOThrottleReadIOPSDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesBlockIOThrottleWriteBpsDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesBlockIOThrottleWriteIOPSDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesBlockIOWeightDevice(major int64, minor int64)
- func (g *Generator) DropLinuxResourcesHugepageLimit(pageSize string)
- func (g *Generator) DropLinuxResourcesNetworkPriorities(name string)
- func (g *Generator) DropProcessCapability(c string) error
- func (g *Generator) DropProcessCapabilityAmbient(c string) error
- func (g *Generator) DropProcessCapabilityBounding(c string) error
- func (g *Generator) DropProcessCapabilityEffective(c string) error
- func (g *Generator) DropProcessCapabilityInheritable(c string) error
- func (g *Generator) DropProcessCapabilityPermitted(c string) error
- func (g *Generator) InitConfigLinuxResourcesCPU()
- func (g *Generator) Mounts() []rspec.Mount
- func (g *Generator) RemoveAllSeccompRules() error
- func (g *Generator) RemoveAnnotation(key string)
- func (g *Generator) RemoveDevice(path string)
- func (g *Generator) RemoveHostname()
- func (g *Generator) RemoveLinuxNamespace(ns string) error
- func (g *Generator) RemoveLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
- func (g *Generator) RemoveLinuxSysctl(key string)
- func (g *Generator) RemoveMount(dest string)
- func (g *Generator) RemoveProcessRlimits(rType string)
- func (g *Generator) RemoveSeccompRule(arguments string) error
- func (g *Generator) Save(w io.Writer, exportOpts ExportOptions) (err error)
- func (g *Generator) SaveToFile(path string, exportOpts ExportOptions) error
- func (g *Generator) SetDefaultSeccompAction(action string) error
- func (g *Generator) SetDefaultSeccompActionForce(action string) error
- func (g *Generator) SetHostname(s string)
- func (g *Generator) SetLinuxCgroupsPath(path string)
- func (g *Generator) SetLinuxIntelRdtL3CacheSchema(schema string)
- func (g *Generator) SetLinuxMountLabel(label string)
- func (g *Generator) SetLinuxResourcesBlockIOLeafWeight(weight uint16)
- func (g *Generator) SetLinuxResourcesBlockIOWeight(weight uint16)
- func (g *Generator) SetLinuxResourcesCPUCpus(cpus string)
- func (g *Generator) SetLinuxResourcesCPUMems(mems string)
- func (g *Generator) SetLinuxResourcesCPUPeriod(period uint64)
- func (g *Generator) SetLinuxResourcesCPUQuota(quota int64)
- func (g *Generator) SetLinuxResourcesCPURealtimePeriod(period uint64)
- func (g *Generator) SetLinuxResourcesCPURealtimeRuntime(time int64)
- func (g *Generator) SetLinuxResourcesCPUShares(shares uint64)
- func (g *Generator) SetLinuxResourcesMemoryDisableOOMKiller(disable bool)
- func (g *Generator) SetLinuxResourcesMemoryKernel(kernel int64)
- func (g *Generator) SetLinuxResourcesMemoryKernelTCP(kernelTCP int64)
- func (g *Generator) SetLinuxResourcesMemoryLimit(limit int64)
- func (g *Generator) SetLinuxResourcesMemoryReservation(reservation int64)
- func (g *Generator) SetLinuxResourcesMemorySwap(swap int64)
- func (g *Generator) SetLinuxResourcesMemorySwappiness(swappiness uint64)
- func (g *Generator) SetLinuxResourcesNetworkClassID(classid uint32)
- func (g *Generator) SetLinuxResourcesPidsLimit(limit int64)
- func (g *Generator) SetLinuxRootPropagation(rp string) error
- func (g *Generator) SetOCIVersion(s string)
- func (g *Generator) SetProcessApparmorProfile(prof string)
- func (g *Generator) SetProcessArgs(args []string)
- func (g *Generator) SetProcessConsoleSize(width, height uint)
- func (g *Generator) SetProcessCwd(cwd string)
- func (g *Generator) SetProcessGID(gid uint32)
- func (g *Generator) SetProcessNoNewPrivileges(b bool)
- func (g *Generator) SetProcessOOMScoreAdj(adj int)
- func (g *Generator) SetProcessSelinuxLabel(label string)
- func (g *Generator) SetProcessTerminal(b bool)
- func (g *Generator) SetProcessUID(uid uint32)
- func (g *Generator) SetProcessUsername(username string)
- func (g *Generator) SetRootPath(path string)
- func (g *Generator) SetRootReadonly(b bool)
- func (g *Generator) SetSeccompArchitecture(architecture string) error
- func (g *Generator) SetSolarisCappedCPUNcpus(ncpus string)
- func (g *Generator) SetSolarisCappedMemoryPhysical(physical string)
- func (g *Generator) SetSolarisCappedMemorySwap(swap string)
- func (g *Generator) SetSolarisLimitPriv(limitPriv string)
- func (g *Generator) SetSolarisMaxShmMemory(memory string)
- func (g *Generator) SetSolarisMilestone(milestone string)
- func (g *Generator) SetSpec(config *rspec.Spec)deprecated
- func (g *Generator) SetSyscallAction(arguments seccomp.SyscallOpts) error
- func (g *Generator) SetVMHypervisorParameters(parameters []string)
- func (g *Generator) SetVMHypervisorPath(path string) error
- func (g *Generator) SetVMImageFormat(format string) error
- func (g *Generator) SetVMImagePath(path string) error
- func (g *Generator) SetVMKernelInitRD(initrd string) error
- func (g *Generator) SetVMKernelParameters(parameters []string)
- func (g *Generator) SetVMKernelPath(path string) error
- func (g *Generator) SetVersion(version string)
- func (g *Generator) SetWindowsHypervUntilityVMPath(path string)
- func (g *Generator) SetWindowsIgnoreFlushesDuringBoot(ignore bool)
- func (g *Generator) SetWindowsNetwork(network rspec.WindowsNetwork)
- func (g *Generator) SetWindowsNetworkAllowUnqualifiedDNSQuery(setting bool)
- func (g *Generator) SetWindowsNetworkNamespace(path string)
- func (g *Generator) SetWindowsResourcesCPU(cpu rspec.WindowsCPUResources)
- func (g *Generator) SetWindowsResourcesMemoryLimit(limit uint64)
- func (g *Generator) SetWindowsResourcesStorage(storage rspec.WindowsStorageResources)
- func (g *Generator) SetWindowsServicing(servicing bool)
- func (g *Generator) SetupPrivileged(privileged bool)
- func (g *Generator) Spec() *rspec.Specdeprecated
Constants ¶
This section is empty.
Variables ¶
var ( // Namespaces include the names of supported namespaces. Namespaces = []string{"network", "pid", "mount", "ipc", "uts", "user", "cgroup"} )
Functions ¶
This section is empty.
Types ¶
type ExportOptions ¶
type ExportOptions struct {
Seccomp bool // seccomp toggles if only seccomp should be exported
}
ExportOptions have toggles for exporting only certain parts of the specification
type Generator ¶
Generator represents a generator for a container config.
func New ¶
New creates a configuration Generator with the default configuration for the target operating system.
func NewFromFile ¶
NewFromFile loads the template specified in a file into a configuration Generator.
func NewFromSpec
deprecated
func NewFromTemplate ¶
NewFromTemplate loads the template from io.Reader into a configuration Generator.
func (*Generator) AddAnnotation ¶
AddAnnotation adds an annotation into g.Config.Annotations.
func (*Generator) AddDevice ¶
func (g *Generator) AddDevice(device rspec.LinuxDevice)
AddDevice - add a device into g.Config.Linux.Devices
func (*Generator) AddLinuxGIDMapping ¶
AddLinuxGIDMapping adds gidMap into g.Config.Linux.GIDMappings.
func (*Generator) AddLinuxMaskedPaths ¶
AddLinuxMaskedPaths adds masked paths into g.Config.Linux.MaskedPaths.
func (*Generator) AddLinuxReadonlyPaths ¶
AddLinuxReadonlyPaths adds readonly paths into g.Config.Linux.MaskedPaths.
func (*Generator) AddLinuxResourcesBlockIOLeafWeightDevice ¶ added in v0.4.0
func (g *Generator) AddLinuxResourcesBlockIOLeafWeightDevice(major int64, minor int64, weight uint16)
AddLinuxResourcesBlockIOLeafWeightDevice adds or sets g.Config.Linux.Resources.BlockIO.WeightDevice.LeafWeight.
func (*Generator) AddLinuxResourcesBlockIOThrottleReadBpsDevice ¶ added in v0.4.0
func (g *Generator) AddLinuxResourcesBlockIOThrottleReadBpsDevice(major int64, minor int64, rate uint64)
AddLinuxResourcesBlockIOThrottleReadBpsDevice adds or sets g.Config.Linux.Resources.BlockIO.ThrottleReadBpsDevice.
func (*Generator) AddLinuxResourcesBlockIOThrottleReadIOPSDevice ¶ added in v0.4.0
func (g *Generator) AddLinuxResourcesBlockIOThrottleReadIOPSDevice(major int64, minor int64, rate uint64)
AddLinuxResourcesBlockIOThrottleReadIOPSDevice adds or sets g.Config.Linux.Resources.BlockIO.ThrottleReadIOPSDevice.
func (*Generator) AddLinuxResourcesBlockIOThrottleWriteBpsDevice ¶ added in v0.4.0
func (g *Generator) AddLinuxResourcesBlockIOThrottleWriteBpsDevice(major int64, minor int64, rate uint64)
AddLinuxResourcesBlockIOThrottleWriteBpsDevice adds or sets g.Config.Linux.Resources.BlockIO.ThrottleWriteBpsDevice.
func (*Generator) AddLinuxResourcesBlockIOThrottleWriteIOPSDevice ¶ added in v0.4.0
func (g *Generator) AddLinuxResourcesBlockIOThrottleWriteIOPSDevice(major int64, minor int64, rate uint64)
AddLinuxResourcesBlockIOThrottleWriteIOPSDevice adds or sets g.Config.Linux.Resources.BlockIO.ThrottleWriteIOPSDevice.
func (*Generator) AddLinuxResourcesBlockIOWeightDevice ¶ added in v0.4.0
AddLinuxResourcesBlockIOWeightDevice adds or sets g.Config.Linux.Resources.BlockIO.WeightDevice.Weight.
func (*Generator) AddLinuxResourcesDevice ¶ added in v0.3.0
func (g *Generator) AddLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
AddLinuxResourcesDevice - add a device into g.Config.Linux.Resources.Devices
func (*Generator) AddLinuxResourcesHugepageLimit ¶
AddLinuxResourcesHugepageLimit adds or sets g.Config.Linux.Resources.HugepageLimits.
func (*Generator) AddLinuxResourcesNetworkPriorities ¶
AddLinuxResourcesNetworkPriorities adds or sets g.Config.Linux.Resources.Network.Priorities.
func (*Generator) AddLinuxSysctl ¶
AddLinuxSysctl adds a new sysctl config into g.Config.Linux.Sysctl.
func (*Generator) AddLinuxUIDMapping ¶
AddLinuxUIDMapping adds uidMap into g.Config.Linux.UIDMappings.
func (*Generator) AddOrReplaceLinuxNamespace ¶
AddOrReplaceLinuxNamespace adds or replaces a namespace inside g.Config.Linux.Namespaces.
func (*Generator) AddPostStartHook ¶
AddPostStartHook adds a poststart hook into g.Config.Hooks.Poststart.
func (*Generator) AddPostStopHook ¶
AddPostStopHook adds a poststop hook into g.Config.Hooks.Poststop.
func (*Generator) AddPreStartHook ¶
AddPreStartHook add a prestart hook into g.Config.Hooks.Prestart.
func (*Generator) AddProcessAdditionalGid ¶
AddProcessAdditionalGid adds an additional gid into g.Config.Process.AdditionalGids.
func (*Generator) AddProcessCapability ¶
AddProcessCapability adds a process capability into all 5 capability sets.
func (*Generator) AddProcessCapabilityAmbient ¶ added in v0.2.0
AddProcessCapabilityAmbient adds a process capability into g.Config.Process.Capabilities.Ambient.
func (*Generator) AddProcessCapabilityBounding ¶ added in v0.2.0
AddProcessCapabilityBounding adds a process capability into g.Config.Process.Capabilities.Bounding.
func (*Generator) AddProcessCapabilityEffective ¶ added in v0.2.0
AddProcessCapabilityEffective adds a process capability into g.Config.Process.Capabilities.Effective.
func (*Generator) AddProcessCapabilityInheritable ¶ added in v0.2.0
AddProcessCapabilityInheritable adds a process capability into g.Config.Process.Capabilities.Inheritable.
func (*Generator) AddProcessCapabilityPermitted ¶ added in v0.2.0
AddProcessCapabilityPermitted adds a process capability into g.Config.Process.Capabilities.Permitted.
func (*Generator) AddProcessEnv ¶
AddProcessEnv adds name=value into g.Config.Process.Env, or replaces an existing entry with the given name.
func (*Generator) AddProcessRlimits ¶
AddProcessRlimits adds rlimit into g.Config.Process.Rlimits.
func (*Generator) AddSolarisAnet ¶ added in v0.4.0
func (g *Generator) AddSolarisAnet(anet rspec.SolarisAnet)
AddSolarisAnet adds network into g.Config.Solaris.Anet
func (*Generator) AddWindowsDevices ¶ added in v0.9.0
AddWindowsDevices adds or sets g.Config.Windwos.Devices
func (*Generator) AddWindowsLayerFolders ¶ added in v0.4.0
AddWindowsLayerFolders adds layer folders into g.Config.Windows.LayerFolders.
func (*Generator) ClearAnnotations ¶
func (g *Generator) ClearAnnotations()
ClearAnnotations clears g.Config.Annotations.
func (*Generator) ClearLinuxDevices ¶
func (g *Generator) ClearLinuxDevices()
ClearLinuxDevices clears g.Config.Linux.Devices
func (*Generator) ClearLinuxGIDMappings ¶
func (g *Generator) ClearLinuxGIDMappings()
ClearLinuxGIDMappings clear g.Config.Linux.GIDMappings.
func (*Generator) ClearLinuxNamespaces ¶
func (g *Generator) ClearLinuxNamespaces()
ClearLinuxNamespaces clear g.Config.Linux.Namespaces.
func (*Generator) ClearLinuxSysctl ¶
func (g *Generator) ClearLinuxSysctl()
ClearLinuxSysctl clears g.Config.Linux.Sysctl.
func (*Generator) ClearLinuxUIDMappings ¶
func (g *Generator) ClearLinuxUIDMappings()
ClearLinuxUIDMappings clear g.Config.Linux.UIDMappings.
func (*Generator) ClearMounts ¶ added in v0.4.0
func (g *Generator) ClearMounts()
ClearMounts clear g.Config.Mounts
func (*Generator) ClearPostStartHooks ¶
func (g *Generator) ClearPostStartHooks()
ClearPostStartHooks clear g.Config.Hooks.Poststart.
func (*Generator) ClearPostStopHooks ¶
func (g *Generator) ClearPostStopHooks()
ClearPostStopHooks clear g.Config.Hooks.Poststop.
func (*Generator) ClearPreStartHooks ¶
func (g *Generator) ClearPreStartHooks()
ClearPreStartHooks clear g.Config.Hooks.Prestart.
func (*Generator) ClearProcessAdditionalGids ¶
func (g *Generator) ClearProcessAdditionalGids()
ClearProcessAdditionalGids clear g.Config.Process.AdditionalGids.
func (*Generator) ClearProcessCapabilities ¶
func (g *Generator) ClearProcessCapabilities()
ClearProcessCapabilities clear g.Config.Process.Capabilities.
func (*Generator) ClearProcessEnv ¶
func (g *Generator) ClearProcessEnv()
ClearProcessEnv clears g.Config.Process.Env.
func (*Generator) ClearProcessRlimits ¶
func (g *Generator) ClearProcessRlimits()
ClearProcessRlimits clear g.Config.Process.Rlimits.
func (*Generator) DropLinuxResourcesBlockIOLeafWeightDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOLeafWeightDevice drops a item form g.Config.Linux.Resources.BlockIO.WeightDevice.LeafWeight
func (*Generator) DropLinuxResourcesBlockIOThrottleReadBpsDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOThrottleReadBpsDevice drops a item from g.Config.Linux.Resources.BlockIO.ThrottleReadBpsDevice.
func (*Generator) DropLinuxResourcesBlockIOThrottleReadIOPSDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOThrottleReadIOPSDevice drops a item from g.Config.Linux.Resources.BlockIO.ThrottleReadIOPSDevice.
func (*Generator) DropLinuxResourcesBlockIOThrottleWriteBpsDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOThrottleWriteBpsDevice drops a item from g.Config.Linux.Resources.BlockIO.ThrottleWriteBpsDevice.
func (*Generator) DropLinuxResourcesBlockIOThrottleWriteIOPSDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOThrottleWriteIOPSDevice drops a item from g.Config.Linux.Resources.BlockIO.ThrottleWriteIOPSDevice.
func (*Generator) DropLinuxResourcesBlockIOWeightDevice ¶ added in v0.4.0
DropLinuxResourcesBlockIOWeightDevice drops a item form g.Config.Linux.Resources.BlockIO.WeightDevice.Weight
func (*Generator) DropLinuxResourcesHugepageLimit ¶
DropLinuxResourcesHugepageLimit drops a hugepage limit from g.Config.Linux.Resources.HugepageLimits.
func (*Generator) DropLinuxResourcesNetworkPriorities ¶
DropLinuxResourcesNetworkPriorities drops one item from g.Config.Linux.Resources.Network.Priorities.
func (*Generator) DropProcessCapability ¶
DropProcessCapability drops a process capability from all 5 capability sets.
func (*Generator) DropProcessCapabilityAmbient ¶ added in v0.2.0
DropProcessCapabilityAmbient drops a process capability from g.Config.Process.Capabilities.Ambient.
func (*Generator) DropProcessCapabilityBounding ¶ added in v0.2.0
DropProcessCapabilityBounding drops a process capability from g.Config.Process.Capabilities.Bounding.
func (*Generator) DropProcessCapabilityEffective ¶ added in v0.2.0
DropProcessCapabilityEffective drops a process capability from g.Config.Process.Capabilities.Effective.
func (*Generator) DropProcessCapabilityInheritable ¶ added in v0.2.0
DropProcessCapabilityInheritable drops a process capability from g.Config.Process.Capabilities.Inheritable.
func (*Generator) DropProcessCapabilityPermitted ¶ added in v0.2.0
DropProcessCapabilityPermitted drops a process capability from g.Config.Process.Capabilities.Permitted.
func (*Generator) InitConfigLinuxResourcesCPU ¶ added in v0.7.0
func (g *Generator) InitConfigLinuxResourcesCPU()
InitConfigLinuxResourcesCPU initializes CPU of Linux resources
func (*Generator) RemoveAllSeccompRules ¶
RemoveAllSeccompRules removes all syscall rules
func (*Generator) RemoveAnnotation ¶
RemoveAnnotation remove an annotation from g.Config.Annotations.
func (*Generator) RemoveDevice ¶
RemoveDevice remove a device from g.Config.Linux.Devices
func (*Generator) RemoveHostname ¶ added in v0.6.0
func (g *Generator) RemoveHostname()
RemoveHostname removes g.Config.Hostname, setting it to an empty string.
func (*Generator) RemoveLinuxNamespace ¶
RemoveLinuxNamespace removes a namespace from g.Config.Linux.Namespaces.
func (*Generator) RemoveLinuxResourcesDevice ¶ added in v0.3.0
func (g *Generator) RemoveLinuxResourcesDevice(allow bool, devType string, major, minor *int64, access string)
RemoveLinuxResourcesDevice - remove a device from g.Config.Linux.Resources.Devices
func (*Generator) RemoveLinuxSysctl ¶
RemoveLinuxSysctl removes a sysctl config from g.Config.Linux.Sysctl.
func (*Generator) RemoveMount ¶ added in v0.4.0
RemoveMount removes a mount point on the dest directory
func (*Generator) RemoveProcessRlimits ¶
RemoveProcessRlimits removes a rlimit from g.Config.Process.Rlimits.
func (*Generator) RemoveSeccompRule ¶
RemoveSeccompRule removes rules for any specified syscalls
func (*Generator) Save ¶
func (g *Generator) Save(w io.Writer, exportOpts ExportOptions) (err error)
Save writes the configuration into w.
func (*Generator) SaveToFile ¶
func (g *Generator) SaveToFile(path string, exportOpts ExportOptions) error
SaveToFile writes the configuration into a file.
func (*Generator) SetDefaultSeccompAction ¶
SetDefaultSeccompAction sets the default action for all syscalls not defined and then removes any syscall rules with this action already specified.
func (*Generator) SetDefaultSeccompActionForce ¶
SetDefaultSeccompActionForce only sets the default action for all syscalls not defined
func (*Generator) SetHostname ¶
SetHostname sets g.Config.Hostname.
func (*Generator) SetLinuxCgroupsPath ¶
SetLinuxCgroupsPath sets g.Config.Linux.CgroupsPath.
func (*Generator) SetLinuxIntelRdtL3CacheSchema ¶ added in v0.4.0
SetLinuxIntelRdtL3CacheSchema sets g.Config.Linux.IntelRdt.L3CacheSchema
func (*Generator) SetLinuxMountLabel ¶
SetLinuxMountLabel sets g.Config.Linux.MountLabel.
func (*Generator) SetLinuxResourcesBlockIOLeafWeight ¶ added in v0.4.0
SetLinuxResourcesBlockIOLeafWeight sets g.Config.Linux.Resources.BlockIO.LeafWeight.
func (*Generator) SetLinuxResourcesBlockIOWeight ¶ added in v0.4.0
SetLinuxResourcesBlockIOWeight sets g.Config.Linux.Resources.BlockIO.Weight.
func (*Generator) SetLinuxResourcesCPUCpus ¶
SetLinuxResourcesCPUCpus sets g.Config.Linux.Resources.CPU.Cpus.
func (*Generator) SetLinuxResourcesCPUMems ¶
SetLinuxResourcesCPUMems sets g.Config.Linux.Resources.CPU.Mems.
func (*Generator) SetLinuxResourcesCPUPeriod ¶
SetLinuxResourcesCPUPeriod sets g.Config.Linux.Resources.CPU.Period.
func (*Generator) SetLinuxResourcesCPUQuota ¶
SetLinuxResourcesCPUQuota sets g.Config.Linux.Resources.CPU.Quota.
func (*Generator) SetLinuxResourcesCPURealtimePeriod ¶
SetLinuxResourcesCPURealtimePeriod sets g.Config.Linux.Resources.CPU.RealtimePeriod.
func (*Generator) SetLinuxResourcesCPURealtimeRuntime ¶
SetLinuxResourcesCPURealtimeRuntime sets g.Config.Linux.Resources.CPU.RealtimeRuntime.
func (*Generator) SetLinuxResourcesCPUShares ¶
SetLinuxResourcesCPUShares sets g.Config.Linux.Resources.CPU.Shares.
func (*Generator) SetLinuxResourcesMemoryDisableOOMKiller ¶
SetLinuxResourcesMemoryDisableOOMKiller sets g.Config.Linux.Resources.Memory.DisableOOMKiller.
func (*Generator) SetLinuxResourcesMemoryKernel ¶
SetLinuxResourcesMemoryKernel sets g.Config.Linux.Resources.Memory.Kernel.
func (*Generator) SetLinuxResourcesMemoryKernelTCP ¶
SetLinuxResourcesMemoryKernelTCP sets g.Config.Linux.Resources.Memory.KernelTCP.
func (*Generator) SetLinuxResourcesMemoryLimit ¶
SetLinuxResourcesMemoryLimit sets g.Config.Linux.Resources.Memory.Limit.
func (*Generator) SetLinuxResourcesMemoryReservation ¶
SetLinuxResourcesMemoryReservation sets g.Config.Linux.Resources.Memory.Reservation.
func (*Generator) SetLinuxResourcesMemorySwap ¶
SetLinuxResourcesMemorySwap sets g.Config.Linux.Resources.Memory.Swap.
func (*Generator) SetLinuxResourcesMemorySwappiness ¶
SetLinuxResourcesMemorySwappiness sets g.Config.Linux.Resources.Memory.Swappiness.
func (*Generator) SetLinuxResourcesNetworkClassID ¶
SetLinuxResourcesNetworkClassID sets g.Config.Linux.Resources.Network.ClassID.
func (*Generator) SetLinuxResourcesPidsLimit ¶
SetLinuxResourcesPidsLimit sets g.Config.Linux.Resources.Pids.Limit.
func (*Generator) SetLinuxRootPropagation ¶
SetLinuxRootPropagation sets g.Config.Linux.RootfsPropagation.
func (*Generator) SetOCIVersion ¶ added in v0.9.0
SetOCIVersion sets g.Config.Version.
func (*Generator) SetProcessApparmorProfile ¶
SetProcessApparmorProfile sets g.Config.Process.ApparmorProfile.
func (*Generator) SetProcessArgs ¶
SetProcessArgs sets g.Config.Process.Args.
func (*Generator) SetProcessConsoleSize ¶
SetProcessConsoleSize sets g.Config.Process.ConsoleSize.
func (*Generator) SetProcessCwd ¶
SetProcessCwd sets g.Config.Process.Cwd.
func (*Generator) SetProcessGID ¶
SetProcessGID sets g.Config.Process.User.GID.
func (*Generator) SetProcessNoNewPrivileges ¶
SetProcessNoNewPrivileges sets g.Config.Process.NoNewPrivileges.
func (*Generator) SetProcessOOMScoreAdj ¶
SetProcessOOMScoreAdj sets g.Config.Process.OOMScoreAdj.
func (*Generator) SetProcessSelinuxLabel ¶
SetProcessSelinuxLabel sets g.Config.Process.SelinuxLabel.
func (*Generator) SetProcessTerminal ¶
SetProcessTerminal sets g.Config.Process.Terminal.
func (*Generator) SetProcessUID ¶
SetProcessUID sets g.Config.Process.User.UID.
func (*Generator) SetProcessUsername ¶ added in v0.6.0
SetProcessUsername sets g.Config.Process.User.Username.
func (*Generator) SetRootPath ¶
SetRootPath sets g.Config.Root.Path.
func (*Generator) SetRootReadonly ¶
SetRootReadonly sets g.Config.Root.Readonly.
func (*Generator) SetSeccompArchitecture ¶
SetSeccompArchitecture sets the supported seccomp architectures
func (*Generator) SetSolarisCappedCPUNcpus ¶ added in v0.4.0
SetSolarisCappedCPUNcpus sets g.Config.Solaris.CappedCPU.Ncpus
func (*Generator) SetSolarisCappedMemoryPhysical ¶ added in v0.4.0
SetSolarisCappedMemoryPhysical sets g.Config.Solaris.CappedMemory.Physical
func (*Generator) SetSolarisCappedMemorySwap ¶ added in v0.4.0
SetSolarisCappedMemorySwap sets g.Config.Solaris.CappedMemory.Swap
func (*Generator) SetSolarisLimitPriv ¶ added in v0.4.0
SetSolarisLimitPriv sets g.Config.Solaris.LimitPriv
func (*Generator) SetSolarisMaxShmMemory ¶ added in v0.4.0
SetSolarisMaxShmMemory sets g.Config.Solaris.MaxShmMemory
func (*Generator) SetSolarisMilestone ¶ added in v0.4.0
SetSolarisMilestone sets g.Config.Solaris.Milestone
func (*Generator) SetSyscallAction ¶
func (g *Generator) SetSyscallAction(arguments seccomp.SyscallOpts) error
SetSyscallAction adds rules for syscalls with the specified action
func (*Generator) SetVMHypervisorParameters ¶ added in v0.9.0
SetVMHypervisorParameters sets g.Config.VM.Hypervisor.Parameters
func (*Generator) SetVMHypervisorPath ¶ added in v0.9.0
SetVMHypervisorPath sets g.Config.VM.Hypervisor.Path
func (*Generator) SetVMImageFormat ¶ added in v0.9.0
SetVMImageFormat sets g.Config.VM.Image.Format
func (*Generator) SetVMImagePath ¶ added in v0.9.0
SetVMImagePath sets g.Config.VM.Image.Path
func (*Generator) SetVMKernelInitRD ¶ added in v0.9.0
SetVMKernelInitRD sets g.Config.VM.Kernel.InitRD
func (*Generator) SetVMKernelParameters ¶ added in v0.9.0
SetVMKernelParameters sets g.Config.VM.Kernel.Parameters
func (*Generator) SetVMKernelPath ¶ added in v0.9.0
SetVMKernelPath sets g.Config.VM.Kernel.Path
func (*Generator) SetVersion ¶
SetVersion sets g.Config.Version.
func (*Generator) SetWindowsHypervUntilityVMPath ¶ added in v0.4.0
SetWindowsHypervUntilityVMPath sets g.Config.Windows.HyperV.UtilityVMPath.
func (*Generator) SetWindowsIgnoreFlushesDuringBoot ¶ added in v0.9.0
SetWindowsIgnoreFlushesDuringBoot sets g.Config.Windows.IgnoreFlushesDuringBoot.
func (*Generator) SetWindowsNetwork ¶ added in v0.4.0
func (g *Generator) SetWindowsNetwork(network rspec.WindowsNetwork)
SetWindowsNetwork sets g.Config.Windows.Network.
func (*Generator) SetWindowsNetworkAllowUnqualifiedDNSQuery ¶ added in v0.9.0
SetWindowsNetworkAllowUnqualifiedDNSQuery sets g.Config.Windows.Network.AllowUnqualifiedDNSQuery
func (*Generator) SetWindowsNetworkNamespace ¶ added in v0.9.0
SetWindowsNetworkNamespace sets g.Config.Windows.Network.NetworkNamespace
func (*Generator) SetWindowsResourcesCPU ¶ added in v0.4.0
func (g *Generator) SetWindowsResourcesCPU(cpu rspec.WindowsCPUResources)
SetWindowsResourcesCPU sets g.Config.Windows.Resources.CPU.
func (*Generator) SetWindowsResourcesMemoryLimit ¶ added in v0.4.0
SetWindowsResourcesMemoryLimit sets g.Config.Windows.Resources.Memory.Limit.
func (*Generator) SetWindowsResourcesStorage ¶ added in v0.4.0
func (g *Generator) SetWindowsResourcesStorage(storage rspec.WindowsStorageResources)
SetWindowsResourcesStorage sets g.Config.Windows.Resources.Storage.
func (*Generator) SetWindowsServicing ¶ added in v0.9.0
SetWindowsServicing sets g.Config.Windows.Servicing.
func (*Generator) SetupPrivileged ¶
SetupPrivileged sets up the privilege-related fields inside g.Config.