Documentation
¶
Index ¶
- Constants
- func WithAnnotation(k, v string) oci.SpecOpts
- func WithContainerdShimCgroup(path string) containerd.NewTaskOpts
- func WithNewSnapshot(id string, i containerd.Image) containerd.NewContainerOpts
- func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConfig) oci.SpecOpts
- func WithRelativeRoot(root string) oci.SpecOpts
- func WithVolumes(volumeMounts map[string]string) containerd.NewContainerOpts
- func WithWindowsCredentialSpec(credentialSpec string) oci.SpecOpts
- func WithWindowsDefaultSandboxShares(ctx context.Context, client oci.Client, c *containers.Container, ...) error
- func WithWindowsMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*runtime.Mount) oci.SpecOpts
- func WithWindowsNetworkNamespace(path string) oci.SpecOpts
- func WithWindowsResources(resources *runtime.WindowsContainerResources) oci.SpecOpts
- func WithoutRoot(ctx context.Context, client oci.Client, c *containers.Container, ...) error
Constants ¶
DefaultSandboxCPUshares is default cpu shares for sandbox container. TODO(windows): Revisit cpu shares for windows (https://github.com/containerd/cri/issues/1297)
Variables ¶
This section is empty.
Functions ¶
func WithAnnotation ¶ added in v1.19.0
WithAnnotation sets the provided annotation
func WithContainerdShimCgroup ¶
func WithContainerdShimCgroup(path string) containerd.NewTaskOpts
WithContainerdShimCgroup returns function that sets the containerd shim cgroup path
func WithNewSnapshot ¶
func WithNewSnapshot(id string, i containerd.Image) containerd.NewContainerOpts
WithNewSnapshot wraps `containerd.WithNewSnapshot` so that if creating the snapshot fails we make sure the image is actually unpacked and and retry.
func WithProcessArgs ¶ added in v1.19.0
func WithProcessArgs(config *runtime.ContainerConfig, image *imagespec.ImageConfig) oci.SpecOpts
WithProcessArgs sets the process args on the spec based on the image and runtime config
func WithRelativeRoot ¶ added in v1.19.0
WithRelativeRoot sets the root for the container
func WithVolumes ¶
func WithVolumes(volumeMounts map[string]string) containerd.NewContainerOpts
WithVolumes copies ownership of volume in rootfs to its corresponding host path. It doesn't update runtime spec. The passed in map is a host path to container path map for all volumes.
func WithWindowsCredentialSpec ¶ added in v1.19.0
WithWindowsCredentialSpec assigns `credentialSpec` to the `runtime.Spec.Windows.CredentialSpec` field.
func WithWindowsDefaultSandboxShares ¶ added in v1.19.0
func WithWindowsDefaultSandboxShares(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error
WithWindowsDefaultSandboxShares sets the default sandbox CPU shares
func WithWindowsMounts ¶ added in v1.19.0
func WithWindowsMounts(osi osinterface.OS, config *runtime.ContainerConfig, extra []*runtime.Mount) oci.SpecOpts
WithWindowsMounts sorts and adds runtime and CRI mounts to the spec for windows container.
func WithWindowsNetworkNamespace ¶ added in v1.19.0
WithWindowsNetworkNamespace sets windows network namespace for container. TODO(windows): Move this into container/containerd.
func WithWindowsResources ¶ added in v1.19.0
func WithWindowsResources(resources *runtime.WindowsContainerResources) oci.SpecOpts
WithWindowsResources sets the provided resource restrictions for windows.
func WithoutRoot ¶ added in v1.19.0
func WithoutRoot(ctx context.Context, client oci.Client, c *containers.Container, s *runtimespec.Spec) error
WithoutRoot sets the root to nil for the container.
Types ¶
This section is empty.