Allow additional arguments to be passed into hooks
If a packager wants to be able to support addititional arguments on his hook this will allow them to setup the configuration with these arguments. For example this would allow a hook developer to add support for a --debug flag to change the level of debugging in his hook. In order to complete this task, I had to vendor in the latest github.com://opencontainers/runtime-tools, which caused me to have to fix a Mount and Capability interface calls Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
41aaf4e3d8
commit
23d20c9db5
45 changed files with 7145 additions and 672 deletions
63
vendor/github.com/opencontainers/runtime-tools/generate/spec.go
generated
vendored
63
vendor/github.com/opencontainers/runtime-tools/generate/spec.go
generated
vendored
|
@ -59,6 +59,13 @@ func (g *Generator) initSpecLinux() {
|
|||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecLinuxIntelRdt() {
|
||||
g.initSpecLinux()
|
||||
if g.spec.Linux.IntelRdt == nil {
|
||||
g.spec.Linux.IntelRdt = &rspec.LinuxIntelRdt{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecLinuxSysctl() {
|
||||
g.initSpecLinux()
|
||||
if g.spec.Linux.Sysctl == nil {
|
||||
|
@ -80,6 +87,13 @@ func (g *Generator) initSpecLinuxResources() {
|
|||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecLinuxResourcesBlockIO() {
|
||||
g.initSpecLinuxResources()
|
||||
if g.spec.Linux.Resources.BlockIO == nil {
|
||||
g.spec.Linux.Resources.BlockIO = &rspec.LinuxBlockIO{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecLinuxResourcesCPU() {
|
||||
g.initSpecLinuxResources()
|
||||
if g.spec.Linux.Resources.CPU == nil {
|
||||
|
@ -107,3 +121,52 @@ func (g *Generator) initSpecLinuxResourcesPids() {
|
|||
g.spec.Linux.Resources.Pids = &rspec.LinuxPids{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecSolaris() {
|
||||
g.initSpec()
|
||||
if g.spec.Solaris == nil {
|
||||
g.spec.Solaris = &rspec.Solaris{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecSolarisCappedCPU() {
|
||||
g.initSpecSolaris()
|
||||
if g.spec.Solaris.CappedCPU == nil {
|
||||
g.spec.Solaris.CappedCPU = &rspec.SolarisCappedCPU{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecSolarisCappedMemory() {
|
||||
g.initSpecSolaris()
|
||||
if g.spec.Solaris.CappedMemory == nil {
|
||||
g.spec.Solaris.CappedMemory = &rspec.SolarisCappedMemory{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecWindows() {
|
||||
g.initSpec()
|
||||
if g.spec.Windows == nil {
|
||||
g.spec.Windows = &rspec.Windows{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecWindowsHyperV() {
|
||||
g.initSpecWindows()
|
||||
if g.spec.Windows.HyperV == nil {
|
||||
g.spec.Windows.HyperV = &rspec.WindowsHyperV{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecWindowsResources() {
|
||||
g.initSpecWindows()
|
||||
if g.spec.Windows.Resources == nil {
|
||||
g.spec.Windows.Resources = &rspec.WindowsResources{}
|
||||
}
|
||||
}
|
||||
|
||||
func (g *Generator) initSpecWindowsResourcesMemory() {
|
||||
g.initSpecWindowsResources()
|
||||
if g.spec.Windows.Resources.Memory == nil {
|
||||
g.spec.Windows.Resources.Memory = &rspec.WindowsMemoryResources{}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue