server

package
v1.7.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 133 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// ContainerdHasNoDeprecationWarnings is a string for [runtime.RuntimeCondition.Type].
	ContainerdHasNoDeprecationWarnings = "ContainerdHasNoDeprecationWarnings"

	// ContainerdHasDeprecationWarnings is a string for [runtime.RuntimeCondition.Reason].
	// CamelCase is demanded by the spec.
	// https://github.com/kubernetes/cri-api/blob/v0.29.1/pkg/apis/runtime/v1/api.proto#L1514
	ContainerdHasDeprecationWarnings = "ContainerdHasDeprecationWarnings"
)

Variables

This section is empty.

Functions

func ParseAuth

func ParseAuth(auth *runtime.AuthConfig, host string) (string, string, error)

ParseAuth parses AuthConfig and returns username and password/secret required by containerd.

Types

type CRIService

type CRIService interface {
	runtime.RuntimeServiceServer
	runtime.ImageServiceServer
	// Closer is used by containerd to gracefully stop cri service.
	io.Closer

	Run(ready func()) error

	Register(*grpc.Server) error
}

CRIService is the interface implement CRI remote service server.

func NewCRIService

func NewCRIService(config criconfig.Config, client *containerd.Client, nriservice nriservice.API, warn warning.Service) (CRIService, error)

NewCRIService returns a new instance of CRIService

type ContainerInfo

type ContainerInfo struct {
	// TODO(random-liu): Add sandboxID in CRI container status.
	SandboxID      string                   `json:"sandboxID"`
	Pid            uint32                   `json:"pid"`
	Removing       bool                     `json:"removing"`
	SnapshotKey    string                   `json:"snapshotKey"`
	Snapshotter    string                   `json:"snapshotter"`
	RuntimeType    string                   `json:"runtimeType"`
	RuntimeOptions interface{}              `json:"runtimeOptions"`
	Config         *runtime.ContainerConfig `json:"config"`
	RuntimeSpec    *runtimespec.Spec        `json:"runtimeSpec"`
}

ContainerInfo is extra information for a container.

type SandboxInfo

type SandboxInfo struct {
	Pid         uint32 `json:"pid"`
	Status      string `json:"processStatus"`
	NetNSClosed bool   `json:"netNamespaceClosed"`
	Image       string `json:"image"`
	SnapshotKey string `json:"snapshotKey"`
	Snapshotter string `json:"snapshotter"`
	// Note: a new field `RuntimeHandler` has been added into the CRI PodSandboxStatus struct, and
	// should be set. This `RuntimeHandler` field will be deprecated after containerd 1.3 (tracked
	// in https://github.com/containerd/cri/issues/1064).
	RuntimeHandler string                    `json:"runtimeHandler"` // see the Note above
	RuntimeType    string                    `json:"runtimeType"`
	RuntimeOptions interface{}               `json:"runtimeOptions"`
	Config         *runtime.PodSandboxConfig `json:"config"`
	RuntimeSpec    *runtimespec.Spec         `json:"runtimeSpec"`
	CNIResult      *cni.Result               `json:"cniResult"`
}

SandboxInfo is extra information for sandbox. TODO (mikebrow): discuss predefining constants structures for some or all of these field names in CRI

Directories

Path Synopsis
Package bandwidth provides utilities for bandwidth shaping
Package bandwidth provides utilities for bandwidth shaping

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL