package oci
import "github.com/Microsoft/hcsshim/internal/oci"
Index ¶
- Variables
- func IsIsolated(s *specs.Spec) bool
- func IsJobContainer(s *specs.Spec) bool
- func IsLCOW(s *specs.Spec) bool
- func IsWCOW(s *specs.Spec) bool
- func ParseAnnotationCommaSeparated(annotation string, annotations map[string]string) []string
- func ParseAnnotationsBool(ctx context.Context, a map[string]string, key string, def bool) bool
- func ParseAnnotationsDisableGMSA(ctx context.Context, s *specs.Spec) bool
- func ParseAnnotationsSaveAsTemplate(ctx context.Context, s *specs.Spec) bool
- func ParseAnnotationsTemplateID(ctx context.Context, s *specs.Spec) string
- func ProcessAnnotations(ctx context.Context, s *specs.Spec) (err error)
- type KubernetesContainerType
Variables ¶
Functions ¶
func IsIsolated ¶
func IsIsolated(s *specs.Spec) bool
IsIsolated checks if `s` is hypervisor isolated.
func IsJobContainer ¶
func IsJobContainer(s *specs.Spec) bool
IsJobContainer checks if `s` is asking for a Windows job container.
func IsLCOW ¶
func IsLCOW(s *specs.Spec) bool
IsLCOW checks if `s` is a LCOW config.
func IsWCOW ¶
func IsWCOW(s *specs.Spec) bool
IsWCOW checks if `s` is a WCOW config (argon OR isolated).
func ParseAnnotationCommaSeparated ¶
ParseAnnotationCommaSeparated searches `annotations` for `annotation` corresponding to a list of comma separated strings
func ParseAnnotationsBool ¶
ParseAnnotationsBool searches `a` for `key` and if found verifies that the value is `true` or `false` in any case. If `key` is not found returns `def`.
func ParseAnnotationsDisableGMSA ¶
ParseAnnotationsDisableGMSA searches for the boolean value which specifies if providing a gMSA credential should be disallowed. Returns the value found, if parsable, otherwise returns false otherwise.
func ParseAnnotationsSaveAsTemplate ¶
ParseAnnotationsSaveAsTemplate searches for the boolean value which specifies if this create request should be considered as a template creation request. If value is found the returns the actual value, returns false otherwise.
func ParseAnnotationsTemplateID ¶
ParseAnnotationsTemplateID searches for the templateID in the create request. If the value is found then returns the value otherwise returns the empty string.
func ProcessAnnotations ¶
ProcessAnnotations expands annotations into their corresponding annotation groups
Types ¶
type KubernetesContainerType ¶
type KubernetesContainerType string
KubernetesContainerType defines the valid types of the `annotations.KubernetesContainerType` annotation.
const ( // KubernetesContainerTypeNone is only valid when // `annotations.KubernetesContainerType` is not set. KubernetesContainerTypeNone KubernetesContainerType = "" // KubernetesContainerTypeContainer is valid when // `annotations.KubernetesContainerType == "container"`. KubernetesContainerTypeContainer KubernetesContainerType = "container" // KubernetesContainerTypeSandbox is valid when // `annotations.KubernetesContainerType == "sandbox"`. KubernetesContainerTypeSandbox KubernetesContainerType = "sandbox" )
func GetSandboxTypeAndID ¶
func GetSandboxTypeAndID(specAnnotations map[string]string) (KubernetesContainerType, string, error)
GetSandboxTypeAndID parses `specAnnotations` searching for the `KubernetesContainerTypeAnnotation` and `KubernetesSandboxIDAnnotation` annotations and if found validates the set before returning.
Source Files ¶
annotations.go sandbox.go util.go
- Version
- v0.10.0-rc.0
- Published
- Jul 18, 2022
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 1 minute ago –
Tools for package owners.