package server

import "github.com/containerd/containerd/pkg/cri/server"

Index

Constants

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"
)

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.

func WithNRISandboxDelete

func WithNRISandboxDelete(sandboxID string) containerd.ProcessDeleteOpts

WithNRISandboxDelete calls delete for a sandbox'd task

Types

type CRIService

type CRIService interface {
	Run(ready func()) error
	// io.Closer is used by containerd to gracefully stop cri service.
	io.Closer
	Register(*grpc.Server) error
	// contains filtered or unexported methods
}

CRIService is the interface implement CRI remote service server.

func NewCRIService

func NewCRIService(config criconfig.Config, client *containerd.Client, 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

Source Files

cni_conf_syncer.go container_attach.go container_checkpoint.go container_create.go container_create_linux.go container_events.go container_exec.go container_execsync.go container_list.go container_log_reopen.go container_remove.go container_start.go container_stats.go container_stats_list.go container_stats_list_linux.go container_status.go container_stop.go container_update_resources.go container_update_resources_linux.go events.go helpers.go helpers_linux.go image_list.go image_pull.go image_remove.go image_status.go imagefs_info.go instrumented_service.go metrics.go opts.go rdt_linux.go restart.go sandbox_list.go sandbox_portforward.go sandbox_portforward_linux.go sandbox_remove.go sandbox_run.go sandbox_run_linux.go sandbox_stats.go sandbox_stats_linux.go sandbox_stats_list.go sandbox_status.go sandbox_stop.go service.go service_linux.go snapshots.go status.go streaming.go update_runtime_config.go version.go

Directories

PathSynopsis
pkg/cri/server/bandwidthPackage bandwidth provides utilities for bandwidth shaping
pkg/cri/server/testing
Version
v1.6.33
Published
Jun 5, 2024
Platform
linux/amd64
Imports
124 packages
Last checked
5 seconds ago

Tools for package owners.