Documentation ¶
Index ¶
- Constants
- Variables
- func AsHostProcessContainer() ctrdoci.SpecOpts
- func CreateLinuxSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
- func CreateSpecWithPlatform(ctx context.Context, tb testing.TB, plat, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
- func CreateWindowsSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
- func DefaultLinuxSpec(ctx context.Context, tb testing.TB, nns string) *specs.Spec
- func DefaultLinuxSpecOpts(nns string, extra ...ctrdoci.SpecOpts) []ctrdoci.SpecOpts
- func DefaultWindowsSpecOpts(nns string, extra ...ctrdoci.SpecOpts) []ctrdoci.SpecOpts
- func HostProcessInheritUser() ctrdoci.SpecOpts
- func LinuxImageConfig(entry, cmd []string, wd string) *imagespec.ImageConfig
- func LinuxSandboxImageConfig(pause bool) *imagespec.ImageConfig
- func LinuxSandboxRuntimeConfig(name string) *runtime.PodSandboxConfig
- func LinuxWorkloadImageConfig() *imagespec.ImageConfig
- func LinuxWorkloadRuntimeConfig(name string, cmd, args []string, wd string) *runtime.ContainerConfig
- func WithWindowsLayerFolders(layers []string) ctrdoci.SpecOpts
Constants ¶
const ( TailNullArgs = "tail -f /dev/null" PingSelfCmd = "cmd.exe /c ping -t 127.0.0.1" DefaultNamespace = namespaces.Default CRINamespace = criconstants.K8sContainerdNamespace HostnameEnv = "HOSTNAME" )
Variables ¶
var DefaultUnixEnv = []string{
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
}
Functions ¶
func AsHostProcessContainer ¶
AsHostProcessContainer updates the spec to create a HostProcess container.
func CreateLinuxSpec ¶
func CreateLinuxSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
CreateLinuxSpec returns the OCI spec for a Linux container.
See CreateSpecWithPlatform for more details.
func CreateSpecWithPlatform ¶
func CreateSpecWithPlatform(ctx context.Context, tb testing.TB, plat, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
CreateSpecWithPlatform returns the OCI spec for the specified platform. The context must contain a containerd namespace added by github.com/containerd/containerd/namespaces.WithNamespace.
func CreateWindowsSpec ¶
func CreateWindowsSpec(ctx context.Context, tb testing.TB, id string, opts ...ctrdoci.SpecOpts) *specs.Spec
CreateWindowsSpec returns the OCI spec for a Windows container.
See CreateSpecWithPlatform for more details.
func DefaultLinuxSpec ¶
DefaultLinuxSpec returns a default OCI spec for a Linux container.
See CreateSpecWithPlatform for more details.
func DefaultLinuxSpecOpts ¶
func DefaultWindowsSpecOpts ¶
func HostProcessInheritUser ¶
HostProcessInheritUser updates the spec to allow the HostProcess container to inherit the current user's token.
func LinuxImageConfig ¶
func LinuxImageConfig(entry, cmd []string, wd string) *imagespec.ImageConfig
func LinuxSandboxImageConfig ¶
func LinuxSandboxImageConfig(pause bool) *imagespec.ImageConfig
func LinuxSandboxRuntimeConfig ¶
func LinuxSandboxRuntimeConfig(name string) *runtime.PodSandboxConfig
func LinuxWorkloadImageConfig ¶
func LinuxWorkloadImageConfig() *imagespec.ImageConfig
func LinuxWorkloadRuntimeConfig ¶
func LinuxWorkloadRuntimeConfig(name string, cmd, args []string, wd string) *runtime.ContainerConfig
func WithWindowsLayerFolders ¶
Types ¶
This section is empty.