Documentation
¶
Index ¶
- Constants
- func AbbotMatchLabels() map[string]string
- func CollectErrors(errCh <-chan error) error
- func ContainerLabels(options *runtimepb.PodEnsureCmd, container string) map[string]string
- func GenerateImageName(defaultDomain, defaultNamespace, name string) string
- func GetContainerName(namespace, name, container string) string
- func GetEnv(env []string) map[string]string
- func IsAbbotPod(labels map[string]string) bool
- func IsHostNetwork(labels map[string]string) bool
- func IsPauseContainer(labels map[string]string) bool
- func SharedNamespaces(pauseCtrID string, options *runtimepb.PodEnsureCmd) map[string]string
- type BaseRuntime
- func (r *BaseRuntime) ActionContext(ctx context.Context) (context.Context, context.CancelFunc)
- func (r *BaseRuntime) Arch() string
- func (r *BaseRuntime) ImageActionContext(ctx context.Context) (context.Context, context.CancelFunc)
- func (r *BaseRuntime) KernelVersion() string
- func (r *BaseRuntime) Name() string
- func (r *BaseRuntime) OS() string
- func (r *BaseRuntime) OSImage() string
- func (r *BaseRuntime) PodActionContext(ctx context.Context) (context.Context, context.CancelFunc)
- func (r *BaseRuntime) PodBindVolumeDir(podUID, volumeName string) string
- func (r *BaseRuntime) PodDir(podUID string) string
- func (r *BaseRuntime) PodRemoteVolumeDir(podUID, volumeName string) string
- func (r *BaseRuntime) PodResolvConfFile(podUID string) string
- func (r *BaseRuntime) PodTmpfsVolumeDir(podUID, volumeName string) string
- func (r *BaseRuntime) Version() string
Constants ¶
View Source
const ( LabelRole = "arhat.dev/role" LabelRoleValueAbbot = "Abbot" )
View Source
const ( ContainerLabelPodNamespace = "ctr.arhat.dev/pod-namespace" ContainerLabelPodName = "ctr.arhat.dev/pod-name" ContainerLabelPodUID = "ctr.arhat.dev/pod-uid" ContainerLabelHostNetwork = "config.ctr.arhat.dev/host-network" ContainerLabelPodContainer = "ctr.arhat.dev/pod-container" ContainerLabelPodContainerRole = "ctr.arhat.dev/pod-container-role" ContainerRoleInfra = "infra" ContainerRoleWork = "work" )
labels used by container runtime
View Source
const ( ContainerNamePause = "_pause" ContainerNameAbbot = "abbot" )
View Source
const ( DefaultDockerImageDomain = "docker.io" DefaultDockerImageNamespace = "library" )
Variables ¶
This section is empty.
Functions ¶
func AbbotMatchLabels ¶
func CollectErrors ¶
func ContainerLabels ¶
func ContainerLabels(options *runtimepb.PodEnsureCmd, container string) map[string]string
func GenerateImageName ¶
GenerateImageName create a image name with defaults according to provided name defaultDomain MUST NOT be empty
func GetContainerName ¶
func IsAbbotPod ¶
func IsHostNetwork ¶
func IsPauseContainer ¶
func SharedNamespaces ¶
func SharedNamespaces(pauseCtrID string, options *runtimepb.PodEnsureCmd) map[string]string
nolint:goconst
Types ¶
type BaseRuntime ¶
type BaseRuntime struct {
// contains filtered or unexported fields
}
func NewBaseRuntime ¶
func (*BaseRuntime) ActionContext ¶
func (r *BaseRuntime) ActionContext(ctx context.Context) (context.Context, context.CancelFunc)
func (*BaseRuntime) Arch ¶
func (r *BaseRuntime) Arch() string
func (*BaseRuntime) ImageActionContext ¶
func (r *BaseRuntime) ImageActionContext(ctx context.Context) (context.Context, context.CancelFunc)
func (*BaseRuntime) KernelVersion ¶
func (r *BaseRuntime) KernelVersion() string
func (*BaseRuntime) Name ¶
func (r *BaseRuntime) Name() string
func (*BaseRuntime) OS ¶
func (r *BaseRuntime) OS() string
func (*BaseRuntime) OSImage ¶
func (r *BaseRuntime) OSImage() string
func (*BaseRuntime) PodActionContext ¶
func (r *BaseRuntime) PodActionContext(ctx context.Context) (context.Context, context.CancelFunc)
func (*BaseRuntime) PodBindVolumeDir ¶
func (r *BaseRuntime) PodBindVolumeDir(podUID, volumeName string) string
func (*BaseRuntime) PodDir ¶
func (r *BaseRuntime) PodDir(podUID string) string
func (*BaseRuntime) PodRemoteVolumeDir ¶
func (r *BaseRuntime) PodRemoteVolumeDir(podUID, volumeName string) string
func (*BaseRuntime) PodResolvConfFile ¶
func (r *BaseRuntime) PodResolvConfFile(podUID string) string
func (*BaseRuntime) PodTmpfsVolumeDir ¶
func (r *BaseRuntime) PodTmpfsVolumeDir(podUID, volumeName string) string
func (*BaseRuntime) Version ¶
func (r *BaseRuntime) Version() string
Click to show internal directories.
Click to hide internal directories.