Documentation
¶
Index ¶
- Variables
- func RegisterRuntimeHookServiceServer(s grpc.ServiceRegistrar, srv RuntimeHookServiceServer)
- type ContainerMetadata
- func (*ContainerMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *ContainerMetadata) GetAttempt() uint32
- func (x *ContainerMetadata) GetId() string
- func (x *ContainerMetadata) GetName() string
- func (*ContainerMetadata) ProtoMessage()
- func (x *ContainerMetadata) ProtoReflect() protoreflect.Message
- func (x *ContainerMetadata) Reset()
- func (x *ContainerMetadata) String() string
- type ContainerResourceHookRequest
- func (*ContainerResourceHookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ContainerResourceHookRequest) GetContainerAnnotations() map[string]string
- func (x *ContainerResourceHookRequest) GetContainerEnvs() map[string]string
- func (x *ContainerResourceHookRequest) GetContainerMeta() *ContainerMetadata
- func (x *ContainerResourceHookRequest) GetContainerResources() *LinuxContainerResources
- func (x *ContainerResourceHookRequest) GetPodAnnotations() map[string]string
- func (x *ContainerResourceHookRequest) GetPodCgroupParent() string
- func (x *ContainerResourceHookRequest) GetPodLabels() map[string]string
- func (x *ContainerResourceHookRequest) GetPodMeta() *PodSandboxMetadata
- func (x *ContainerResourceHookRequest) GetPodResources() *LinuxContainerResources
- func (*ContainerResourceHookRequest) ProtoMessage()
- func (x *ContainerResourceHookRequest) ProtoReflect() protoreflect.Message
- func (x *ContainerResourceHookRequest) Reset()
- func (x *ContainerResourceHookRequest) String() string
- type ContainerResourceHookResponse
- func (*ContainerResourceHookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ContainerResourceHookResponse) GetContainerAnnotations() map[string]string
- func (x *ContainerResourceHookResponse) GetContainerEnvs() map[string]string
- func (x *ContainerResourceHookResponse) GetContainerResources() *LinuxContainerResources
- func (x *ContainerResourceHookResponse) GetPodCgroupParent() string
- func (*ContainerResourceHookResponse) ProtoMessage()
- func (x *ContainerResourceHookResponse) ProtoReflect() protoreflect.Message
- func (x *ContainerResourceHookResponse) Reset()
- func (x *ContainerResourceHookResponse) String() string
- type HugepageLimit
- func (*HugepageLimit) Descriptor() ([]byte, []int)deprecated
- func (x *HugepageLimit) GetLimit() uint64
- func (x *HugepageLimit) GetPageSize() string
- func (*HugepageLimit) ProtoMessage()
- func (x *HugepageLimit) ProtoReflect() protoreflect.Message
- func (x *HugepageLimit) Reset()
- func (x *HugepageLimit) String() string
- type LinuxContainerResources
- func (*LinuxContainerResources) Descriptor() ([]byte, []int)deprecated
- func (x *LinuxContainerResources) GetCpuPeriod() int64
- func (x *LinuxContainerResources) GetCpuQuota() int64
- func (x *LinuxContainerResources) GetCpuShares() int64
- func (x *LinuxContainerResources) GetCpusetCpus() string
- func (x *LinuxContainerResources) GetCpusetMems() string
- func (x *LinuxContainerResources) GetHugepageLimits() []*HugepageLimit
- func (x *LinuxContainerResources) GetMemoryLimitInBytes() int64
- func (x *LinuxContainerResources) GetMemorySwapLimitInBytes() int64
- func (x *LinuxContainerResources) GetOomScoreAdj() int64
- func (x *LinuxContainerResources) GetUnified() map[string]string
- func (*LinuxContainerResources) ProtoMessage()
- func (x *LinuxContainerResources) ProtoReflect() protoreflect.Message
- func (x *LinuxContainerResources) Reset()
- func (x *LinuxContainerResources) String() string
- type PodSandboxHookRequest
- func (*PodSandboxHookRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PodSandboxHookRequest) GetAnnotations() map[string]string
- func (x *PodSandboxHookRequest) GetCgroupParent() string
- func (x *PodSandboxHookRequest) GetLabels() map[string]string
- func (x *PodSandboxHookRequest) GetOverhead() *LinuxContainerResources
- func (x *PodSandboxHookRequest) GetPodMeta() *PodSandboxMetadata
- func (x *PodSandboxHookRequest) GetResources() *LinuxContainerResources
- func (x *PodSandboxHookRequest) GetRuntimeHandler() string
- func (*PodSandboxHookRequest) ProtoMessage()
- func (x *PodSandboxHookRequest) ProtoReflect() protoreflect.Message
- func (x *PodSandboxHookRequest) Reset()
- func (x *PodSandboxHookRequest) String() string
- type PodSandboxHookResponse
- func (*PodSandboxHookResponse) Descriptor() ([]byte, []int)deprecated
- func (x *PodSandboxHookResponse) GetAnnotations() map[string]string
- func (x *PodSandboxHookResponse) GetCgroupParent() string
- func (x *PodSandboxHookResponse) GetLabels() map[string]string
- func (x *PodSandboxHookResponse) GetResources() *LinuxContainerResources
- func (*PodSandboxHookResponse) ProtoMessage()
- func (x *PodSandboxHookResponse) ProtoReflect() protoreflect.Message
- func (x *PodSandboxHookResponse) Reset()
- func (x *PodSandboxHookResponse) String() string
- type PodSandboxMetadata
- func (*PodSandboxMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *PodSandboxMetadata) GetAttempt() uint32
- func (x *PodSandboxMetadata) GetName() string
- func (x *PodSandboxMetadata) GetNamespace() string
- func (x *PodSandboxMetadata) GetUid() string
- func (*PodSandboxMetadata) ProtoMessage()
- func (x *PodSandboxMetadata) ProtoReflect() protoreflect.Message
- func (x *PodSandboxMetadata) Reset()
- func (x *PodSandboxMetadata) String() string
- type RuntimeHookServiceClient
- type RuntimeHookServiceServer
- type UnimplementedRuntimeHookServiceServer
- func (UnimplementedRuntimeHookServiceServer) PostStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PostStopContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PostStopPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PreCreateContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PreRunPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PreStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
- func (UnimplementedRuntimeHookServiceServer) PreUpdateContainerResourcesHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
- type UnsafeRuntimeHookServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_proto protoreflect.FileDescriptor
var RuntimeHookService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "runtime.v1alpha1.RuntimeHookService", HandlerType: (*RuntimeHookServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PreRunPodSandboxHook", Handler: _RuntimeHookService_PreRunPodSandboxHook_Handler, }, { MethodName: "PostStopPodSandboxHook", Handler: _RuntimeHookService_PostStopPodSandboxHook_Handler, }, { MethodName: "PreCreateContainerHook", Handler: _RuntimeHookService_PreCreateContainerHook_Handler, }, { MethodName: "PreStartContainerHook", Handler: _RuntimeHookService_PreStartContainerHook_Handler, }, { MethodName: "PostStartContainerHook", Handler: _RuntimeHookService_PostStartContainerHook_Handler, }, { MethodName: "PostStopContainerHook", Handler: _RuntimeHookService_PostStopContainerHook_Handler, }, { MethodName: "PreUpdateContainerResourcesHook", Handler: _RuntimeHookService_PreUpdateContainerResourcesHook_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api.proto", }
RuntimeHookService_ServiceDesc is the grpc.ServiceDesc for RuntimeHookService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRuntimeHookServiceServer ¶
func RegisterRuntimeHookServiceServer(s grpc.ServiceRegistrar, srv RuntimeHookServiceServer)
Types ¶
type ContainerMetadata ¶
type ContainerMetadata struct { // Name of the container. Same as the container name in the PodSpec. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Attempt number of creating the container. Default: 0. Attempt uint32 `protobuf:"varint,2,opt,name=attempt,proto3" json:"attempt,omitempty"` // Id of the container. Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*ContainerMetadata) Descriptor
deprecated
func (*ContainerMetadata) Descriptor() ([]byte, []int)
Deprecated: Use ContainerMetadata.ProtoReflect.Descriptor instead.
func (*ContainerMetadata) GetAttempt ¶
func (x *ContainerMetadata) GetAttempt() uint32
func (*ContainerMetadata) GetId ¶ added in v0.5.0
func (x *ContainerMetadata) GetId() string
func (*ContainerMetadata) GetName ¶
func (x *ContainerMetadata) GetName() string
func (*ContainerMetadata) ProtoMessage ¶
func (*ContainerMetadata) ProtoMessage()
func (*ContainerMetadata) ProtoReflect ¶
func (x *ContainerMetadata) ProtoReflect() protoreflect.Message
func (*ContainerMetadata) Reset ¶
func (x *ContainerMetadata) Reset()
func (*ContainerMetadata) String ¶
func (x *ContainerMetadata) String() string
type ContainerResourceHookRequest ¶
type ContainerResourceHookRequest struct { PodMeta *PodSandboxMetadata `protobuf:"bytes,1,opt,name=pod_meta,json=podMeta,proto3" json:"pod_meta,omitempty"` ContainerMeta *ContainerMetadata `protobuf:"bytes,2,opt,name=container_meta,json=containerMeta,proto3" json:"container_meta,omitempty"` // container related annotations ContainerAnnotations map[string]string `` /* 209-byte string literal not displayed */ ContainerResources *LinuxContainerResources `protobuf:"bytes,4,opt,name=container_resources,json=containerResources,proto3" json:"container_resources,omitempty"` PodResources *LinuxContainerResources `protobuf:"bytes,5,opt,name=pod_resources,json=podResources,proto3" json:"pod_resources,omitempty"` // pod related annotations and labels PodAnnotations map[string]string `` /* 191-byte string literal not displayed */ PodLabels map[string]string `` /* 176-byte string literal not displayed */ PodCgroupParent string `protobuf:"bytes,8,opt,name=pod_cgroup_parent,json=podCgroupParent,proto3" json:"pod_cgroup_parent,omitempty"` ContainerEnvs map[string]string `` // TODO: add the error info from containerd/dockerd /* 188-byte string literal not displayed */ // contains filtered or unexported fields }
ContainerResourceHookRequest is sent to RuntimeHookServer before/after container related operations including pre-container-start, post-container-create, pre-container-resource-update, post-container-stop.
func (*ContainerResourceHookRequest) Descriptor
deprecated
func (*ContainerResourceHookRequest) Descriptor() ([]byte, []int)
Deprecated: Use ContainerResourceHookRequest.ProtoReflect.Descriptor instead.
func (*ContainerResourceHookRequest) GetContainerAnnotations ¶
func (x *ContainerResourceHookRequest) GetContainerAnnotations() map[string]string
func (*ContainerResourceHookRequest) GetContainerEnvs ¶ added in v0.7.0
func (x *ContainerResourceHookRequest) GetContainerEnvs() map[string]string
func (*ContainerResourceHookRequest) GetContainerMeta ¶ added in v0.7.0
func (x *ContainerResourceHookRequest) GetContainerMeta() *ContainerMetadata
func (*ContainerResourceHookRequest) GetContainerResources ¶
func (x *ContainerResourceHookRequest) GetContainerResources() *LinuxContainerResources
func (*ContainerResourceHookRequest) GetPodAnnotations ¶ added in v0.4.0
func (x *ContainerResourceHookRequest) GetPodAnnotations() map[string]string
func (*ContainerResourceHookRequest) GetPodCgroupParent ¶ added in v0.5.0
func (x *ContainerResourceHookRequest) GetPodCgroupParent() string
func (*ContainerResourceHookRequest) GetPodLabels ¶ added in v0.4.0
func (x *ContainerResourceHookRequest) GetPodLabels() map[string]string
func (*ContainerResourceHookRequest) GetPodMeta ¶
func (x *ContainerResourceHookRequest) GetPodMeta() *PodSandboxMetadata
func (*ContainerResourceHookRequest) GetPodResources ¶
func (x *ContainerResourceHookRequest) GetPodResources() *LinuxContainerResources
func (*ContainerResourceHookRequest) ProtoMessage ¶
func (*ContainerResourceHookRequest) ProtoMessage()
func (*ContainerResourceHookRequest) ProtoReflect ¶
func (x *ContainerResourceHookRequest) ProtoReflect() protoreflect.Message
func (*ContainerResourceHookRequest) Reset ¶
func (x *ContainerResourceHookRequest) Reset()
func (*ContainerResourceHookRequest) String ¶
func (x *ContainerResourceHookRequest) String() string
type ContainerResourceHookResponse ¶
type ContainerResourceHookResponse struct { ContainerAnnotations map[string]string `` /* 209-byte string literal not displayed */ ContainerResources *LinuxContainerResources `protobuf:"bytes,2,opt,name=container_resources,json=containerResources,proto3" json:"container_resources,omitempty"` PodCgroupParent string `protobuf:"bytes,3,opt,name=pod_cgroup_parent,json=podCgroupParent,proto3" json:"pod_cgroup_parent,omitempty"` ContainerEnvs map[string]string `` /* 188-byte string literal not displayed */ // contains filtered or unexported fields }
ContainerResourceHookResponse is RuntimeHookServer's response to ContainerResourceHookRequest. RuntimeManager will merge ContainerResourceHookResponse and Pre hookType Request to generate a RunPodSandboxRequest to containerd(dockerd).
func (*ContainerResourceHookResponse) Descriptor
deprecated
func (*ContainerResourceHookResponse) Descriptor() ([]byte, []int)
Deprecated: Use ContainerResourceHookResponse.ProtoReflect.Descriptor instead.
func (*ContainerResourceHookResponse) GetContainerAnnotations ¶
func (x *ContainerResourceHookResponse) GetContainerAnnotations() map[string]string
func (*ContainerResourceHookResponse) GetContainerEnvs ¶ added in v0.7.0
func (x *ContainerResourceHookResponse) GetContainerEnvs() map[string]string
func (*ContainerResourceHookResponse) GetContainerResources ¶
func (x *ContainerResourceHookResponse) GetContainerResources() *LinuxContainerResources
func (*ContainerResourceHookResponse) GetPodCgroupParent ¶ added in v0.5.0
func (x *ContainerResourceHookResponse) GetPodCgroupParent() string
func (*ContainerResourceHookResponse) ProtoMessage ¶
func (*ContainerResourceHookResponse) ProtoMessage()
func (*ContainerResourceHookResponse) ProtoReflect ¶
func (x *ContainerResourceHookResponse) ProtoReflect() protoreflect.Message
func (*ContainerResourceHookResponse) Reset ¶
func (x *ContainerResourceHookResponse) Reset()
func (*ContainerResourceHookResponse) String ¶
func (x *ContainerResourceHookResponse) String() string
type HugepageLimit ¶
type HugepageLimit struct { // The value of PageSize has the format <size><unit-prefix>B (2MB, 1GB), // and must match the <hugepagesize> of the corresponding control file found in `hugetlb.<hugepagesize>.limit_in_bytes`. // The values of <unit-prefix> are intended to be parsed using base 1024("1KB" = 1024, "1MB" = 1048576, etc). PageSize string `protobuf:"bytes,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // limit in bytes of hugepagesize HugeTLB usage. Limit uint64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
HugepageLimit corresponds to the file`hugetlb.<hugepagesize>.limit_in_byte` in container level cgroup. For example, `PageSize=1GB`, `Limit=1073741824` means setting `1073741824` bytes to hugetlb.1GB.limit_in_bytes.
func (*HugepageLimit) Descriptor
deprecated
func (*HugepageLimit) Descriptor() ([]byte, []int)
Deprecated: Use HugepageLimit.ProtoReflect.Descriptor instead.
func (*HugepageLimit) GetLimit ¶
func (x *HugepageLimit) GetLimit() uint64
func (*HugepageLimit) GetPageSize ¶
func (x *HugepageLimit) GetPageSize() string
func (*HugepageLimit) ProtoMessage ¶
func (*HugepageLimit) ProtoMessage()
func (*HugepageLimit) ProtoReflect ¶
func (x *HugepageLimit) ProtoReflect() protoreflect.Message
func (*HugepageLimit) Reset ¶
func (x *HugepageLimit) Reset()
func (*HugepageLimit) String ¶
func (x *HugepageLimit) String() string
type LinuxContainerResources ¶
type LinuxContainerResources struct { // CPU CFS (Completely Fair Scheduler) period. Default: 0 (not specified). CpuPeriod int64 `protobuf:"varint,1,opt,name=cpu_period,json=cpuPeriod,proto3" json:"cpu_period,omitempty"` // CPU CFS (Completely Fair Scheduler) quota. Default: 0 (not specified). CpuQuota int64 `protobuf:"varint,2,opt,name=cpu_quota,json=cpuQuota,proto3" json:"cpu_quota,omitempty"` CpuShares int64 `protobuf:"varint,3,opt,name=cpu_shares,json=cpuShares,proto3" json:"cpu_shares,omitempty"` // Memory limit in bytes. Default: 0 (not specified). MemoryLimitInBytes int64 `protobuf:"varint,4,opt,name=memory_limit_in_bytes,json=memoryLimitInBytes,proto3" json:"memory_limit_in_bytes,omitempty"` // OOMScoreAdj adjusts the oom-killer score. Default: 0 (not specified). OomScoreAdj int64 `protobuf:"varint,5,opt,name=oom_score_adj,json=oomScoreAdj,proto3" json:"oom_score_adj,omitempty"` // CpusetCpus constrains the allowed set of logical CPUs. Default: "" (not specified). CpusetCpus string `protobuf:"bytes,6,opt,name=cpuset_cpus,json=cpusetCpus,proto3" json:"cpuset_cpus,omitempty"` // CpusetMems constrains the allowed set of memory nodes. Default: "" (not specified). CpusetMems string `protobuf:"bytes,7,opt,name=cpuset_mems,json=cpusetMems,proto3" json:"cpuset_mems,omitempty"` // List of HugepageLimits to limit the HugeTLB usage of container per page size. Default: nil (not specified). HugepageLimits []*HugepageLimit `protobuf:"bytes,8,rep,name=hugepage_limits,json=hugepageLimits,proto3" json:"hugepage_limits,omitempty"` // Unified resources for cgroup v2. Default: nil (not specified). // Each key/value in the map refers to the cgroup v2. // e.g. "memory.max": "6937202688" or "io.weight": "default 100". Unified map[string]string `` /* 155-byte string literal not displayed */ // Memory swap limit in bytes. Default 0 (not specified). MemorySwapLimitInBytes int64 `` /* 135-byte string literal not displayed */ // contains filtered or unexported fields }
LinuxContainerResources specifies Linux specific configuration for resources.
func (*LinuxContainerResources) Descriptor
deprecated
func (*LinuxContainerResources) Descriptor() ([]byte, []int)
Deprecated: Use LinuxContainerResources.ProtoReflect.Descriptor instead.
func (*LinuxContainerResources) GetCpuPeriod ¶
func (x *LinuxContainerResources) GetCpuPeriod() int64
func (*LinuxContainerResources) GetCpuQuota ¶
func (x *LinuxContainerResources) GetCpuQuota() int64
func (*LinuxContainerResources) GetCpuShares ¶
func (x *LinuxContainerResources) GetCpuShares() int64
func (*LinuxContainerResources) GetCpusetCpus ¶
func (x *LinuxContainerResources) GetCpusetCpus() string
func (*LinuxContainerResources) GetCpusetMems ¶
func (x *LinuxContainerResources) GetCpusetMems() string
func (*LinuxContainerResources) GetHugepageLimits ¶
func (x *LinuxContainerResources) GetHugepageLimits() []*HugepageLimit
func (*LinuxContainerResources) GetMemoryLimitInBytes ¶
func (x *LinuxContainerResources) GetMemoryLimitInBytes() int64
func (*LinuxContainerResources) GetMemorySwapLimitInBytes ¶
func (x *LinuxContainerResources) GetMemorySwapLimitInBytes() int64
func (*LinuxContainerResources) GetOomScoreAdj ¶
func (x *LinuxContainerResources) GetOomScoreAdj() int64
func (*LinuxContainerResources) GetUnified ¶
func (x *LinuxContainerResources) GetUnified() map[string]string
func (*LinuxContainerResources) ProtoMessage ¶
func (*LinuxContainerResources) ProtoMessage()
func (*LinuxContainerResources) ProtoReflect ¶
func (x *LinuxContainerResources) ProtoReflect() protoreflect.Message
func (*LinuxContainerResources) Reset ¶
func (x *LinuxContainerResources) Reset()
func (*LinuxContainerResources) String ¶
func (x *LinuxContainerResources) String() string
type PodSandboxHookRequest ¶ added in v0.5.0
type PodSandboxHookRequest struct { // Metadata of the sandbox. This information will uniquely identify the sandbox. PodMeta *PodSandboxMetadata `protobuf:"bytes,1,opt,name=pod_meta,json=podMeta,proto3" json:"pod_meta,omitempty"` // Named runtime to use for podSandbox. RuntimeHandler string `protobuf:"bytes,2,opt,name=runtime_handler,json=runtimeHandler,proto3" json:"runtime_handler,omitempty"` // Labels/Annotations are key-value pairs that may be used. Labels map[string]string `` /* 153-byte string literal not displayed */ Annotations map[string]string `` /* 163-byte string literal not displayed */ // Parent cgroup of the pod sandbox. CgroupParent string `protobuf:"bytes,5,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"` // Optional overhead represents the overheads associated with this sandbox, // same as LinuxPodSandboxConfig.overhead under CRI scenario Overhead *LinuxContainerResources `protobuf:"bytes,6,opt,name=overhead,proto3" json:"overhead,omitempty"` // Optional resources represents the sum of container resources for this sandbox // same as LinuxPodSandboxConfig.resources under CRI scenario Resources *LinuxContainerResources `protobuf:"bytes,7,opt,name=resources,proto3" json:"resources,omitempty"` // contains filtered or unexported fields }
RunPodSandboxHookRequest is sent to RuntimeHookServer before pod creating request transferred to backend containerd or dockerd. This Request is generated basing on CRI's RunPodSandboxRequest, including pod Meta, Resources, Annotations .e.g and RuntimeHookServer should ensure correct operations basing on this request.
func (*PodSandboxHookRequest) Descriptor
deprecated
added in
v0.5.0
func (*PodSandboxHookRequest) Descriptor() ([]byte, []int)
Deprecated: Use PodSandboxHookRequest.ProtoReflect.Descriptor instead.
func (*PodSandboxHookRequest) GetAnnotations ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetAnnotations() map[string]string
func (*PodSandboxHookRequest) GetCgroupParent ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetCgroupParent() string
func (*PodSandboxHookRequest) GetLabels ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetLabels() map[string]string
func (*PodSandboxHookRequest) GetOverhead ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetOverhead() *LinuxContainerResources
func (*PodSandboxHookRequest) GetPodMeta ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetPodMeta() *PodSandboxMetadata
func (*PodSandboxHookRequest) GetResources ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetResources() *LinuxContainerResources
func (*PodSandboxHookRequest) GetRuntimeHandler ¶ added in v0.5.0
func (x *PodSandboxHookRequest) GetRuntimeHandler() string
func (*PodSandboxHookRequest) ProtoMessage ¶ added in v0.5.0
func (*PodSandboxHookRequest) ProtoMessage()
func (*PodSandboxHookRequest) ProtoReflect ¶ added in v0.5.0
func (x *PodSandboxHookRequest) ProtoReflect() protoreflect.Message
func (*PodSandboxHookRequest) Reset ¶ added in v0.5.0
func (x *PodSandboxHookRequest) Reset()
func (*PodSandboxHookRequest) String ¶ added in v0.5.0
func (x *PodSandboxHookRequest) String() string
type PodSandboxHookResponse ¶ added in v0.5.0
type PodSandboxHookResponse struct { // RuntimeHookServer may inject additional labels/annotations to PodSandboxRequest to be send to // backend contaienrd/dockerd Labels map[string]string `` /* 153-byte string literal not displayed */ Annotations map[string]string `` /* 163-byte string literal not displayed */ // RuntimeHookSever may modify cgroup_parent to construct customized cgroup topology. CgroupParent string `protobuf:"bytes,3,opt,name=cgroup_parent,json=cgroupParent,proto3" json:"cgroup_parent,omitempty"` // RuntimeHookServer may modify the linux resource config. // Optional resources represents the sum of container resources for this sandbox Resources *LinuxContainerResources `protobuf:"bytes,4,opt,name=resources,proto3" json:"resources,omitempty"` // contains filtered or unexported fields }
RunPodSandboxHookResponse is RuntimeHookServer's response to RunPodSandboxHookRequest. RuntimeManager will merge RunPodSandboxHookResponse and RunPodSandboxRequest to generate a RunPodSandboxRequest to containerd(dockerd).
func (*PodSandboxHookResponse) Descriptor
deprecated
added in
v0.5.0
func (*PodSandboxHookResponse) Descriptor() ([]byte, []int)
Deprecated: Use PodSandboxHookResponse.ProtoReflect.Descriptor instead.
func (*PodSandboxHookResponse) GetAnnotations ¶ added in v0.5.0
func (x *PodSandboxHookResponse) GetAnnotations() map[string]string
func (*PodSandboxHookResponse) GetCgroupParent ¶ added in v0.5.0
func (x *PodSandboxHookResponse) GetCgroupParent() string
func (*PodSandboxHookResponse) GetLabels ¶ added in v0.5.0
func (x *PodSandboxHookResponse) GetLabels() map[string]string
func (*PodSandboxHookResponse) GetResources ¶ added in v0.5.0
func (x *PodSandboxHookResponse) GetResources() *LinuxContainerResources
func (*PodSandboxHookResponse) ProtoMessage ¶ added in v0.5.0
func (*PodSandboxHookResponse) ProtoMessage()
func (*PodSandboxHookResponse) ProtoReflect ¶ added in v0.5.0
func (x *PodSandboxHookResponse) ProtoReflect() protoreflect.Message
func (*PodSandboxHookResponse) Reset ¶ added in v0.5.0
func (x *PodSandboxHookResponse) Reset()
func (*PodSandboxHookResponse) String ¶ added in v0.5.0
func (x *PodSandboxHookResponse) String() string
type PodSandboxMetadata ¶
type PodSandboxMetadata struct { // Pod name of the sandbox. Same as the pod name in the Pod ObjectMeta. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Pod UID of the sandbox. Same as the pod UID in the Pod ObjectMeta. Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"` // Pod namespace of the sandbox. Same as the pod namespace in the Pod ObjectMeta. Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` // Attempt number of creating the sandbox. Default: 0. Attempt uint32 `protobuf:"varint,4,opt,name=attempt,proto3" json:"attempt,omitempty"` // contains filtered or unexported fields }
PodSandboxMetadata holds all necessary information for sandbox.
func (*PodSandboxMetadata) Descriptor
deprecated
func (*PodSandboxMetadata) Descriptor() ([]byte, []int)
Deprecated: Use PodSandboxMetadata.ProtoReflect.Descriptor instead.
func (*PodSandboxMetadata) GetAttempt ¶
func (x *PodSandboxMetadata) GetAttempt() uint32
func (*PodSandboxMetadata) GetName ¶
func (x *PodSandboxMetadata) GetName() string
func (*PodSandboxMetadata) GetNamespace ¶
func (x *PodSandboxMetadata) GetNamespace() string
func (*PodSandboxMetadata) GetUid ¶
func (x *PodSandboxMetadata) GetUid() string
func (*PodSandboxMetadata) ProtoMessage ¶
func (*PodSandboxMetadata) ProtoMessage()
func (*PodSandboxMetadata) ProtoReflect ¶
func (x *PodSandboxMetadata) ProtoReflect() protoreflect.Message
func (*PodSandboxMetadata) Reset ¶
func (x *PodSandboxMetadata) Reset()
func (*PodSandboxMetadata) String ¶
func (x *PodSandboxMetadata) String() string
type RuntimeHookServiceClient ¶
type RuntimeHookServiceClient interface { // PreRunPodSandboxHook calls RuntimeHookServer before pod creating, and would merge RunPodSandboxHookResponse // and Original RunPodSandboxRequest generating a new RunPodSandboxRequest to transfer to backend runtime engine. // RuntimeHookServer should ensure the correct operations basing on RunPodSandboxHookRequest. PreRunPodSandboxHook(ctx context.Context, in *PodSandboxHookRequest, opts ...grpc.CallOption) (*PodSandboxHookResponse, error) // PostStopPodSandboxHook calls RuntimeHookServer after pod deleted. RuntimeHookServer could do resource setting garbage collection // sanity check after PodSandBox stopped. PostStopPodSandboxHook(ctx context.Context, in *PodSandboxHookRequest, opts ...grpc.CallOption) (*PodSandboxHookResponse, error) // PreCreateContainerHook calls RuntimeHookServer before container creating. RuntimeHookServer could do some // resource setting before container launching. PreCreateContainerHook(ctx context.Context, in *ContainerResourceHookRequest, opts ...grpc.CallOption) (*ContainerResourceHookResponse, error) // PreStartContainerHook calls RuntimeHookServer before container starting, RuntimeHookServer could do some // resource adjustments before container launching. PreStartContainerHook(ctx context.Context, in *ContainerResourceHookRequest, opts ...grpc.CallOption) (*ContainerResourceHookResponse, error) // PostStartContainerHook calls RuntimeHookServer after container starting. RuntimeHookServer could do resource // set checking after container launch. PostStartContainerHook(ctx context.Context, in *ContainerResourceHookRequest, opts ...grpc.CallOption) (*ContainerResourceHookResponse, error) // PostStopContainerHook calls RuntimeHookServer after container stop. RuntimeHookServer could do resource setting // garbage collection. PostStopContainerHook(ctx context.Context, in *ContainerResourceHookRequest, opts ...grpc.CallOption) (*ContainerResourceHookResponse, error) // PreUpdateContainerResourcesHook calls RuntimeHookServer before container resource update to keep resource policy // consistent PreUpdateContainerResourcesHook(ctx context.Context, in *ContainerResourceHookRequest, opts ...grpc.CallOption) (*ContainerResourceHookResponse, error) }
RuntimeHookServiceClient is the client API for RuntimeHookService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewRuntimeHookServiceClient ¶
func NewRuntimeHookServiceClient(cc grpc.ClientConnInterface) RuntimeHookServiceClient
type RuntimeHookServiceServer ¶
type RuntimeHookServiceServer interface { // PreRunPodSandboxHook calls RuntimeHookServer before pod creating, and would merge RunPodSandboxHookResponse // and Original RunPodSandboxRequest generating a new RunPodSandboxRequest to transfer to backend runtime engine. // RuntimeHookServer should ensure the correct operations basing on RunPodSandboxHookRequest. PreRunPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error) // PostStopPodSandboxHook calls RuntimeHookServer after pod deleted. RuntimeHookServer could do resource setting garbage collection // sanity check after PodSandBox stopped. PostStopPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error) // PreCreateContainerHook calls RuntimeHookServer before container creating. RuntimeHookServer could do some // resource setting before container launching. PreCreateContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error) // PreStartContainerHook calls RuntimeHookServer before container starting, RuntimeHookServer could do some // resource adjustments before container launching. PreStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error) // PostStartContainerHook calls RuntimeHookServer after container starting. RuntimeHookServer could do resource // set checking after container launch. PostStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error) // PostStopContainerHook calls RuntimeHookServer after container stop. RuntimeHookServer could do resource setting // garbage collection. PostStopContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error) // PreUpdateContainerResourcesHook calls RuntimeHookServer before container resource update to keep resource policy // consistent PreUpdateContainerResourcesHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error) // contains filtered or unexported methods }
RuntimeHookServiceServer is the server API for RuntimeHookService service. All implementations must embed UnimplementedRuntimeHookServiceServer for forward compatibility
type UnimplementedRuntimeHookServiceServer ¶
type UnimplementedRuntimeHookServiceServer struct { }
UnimplementedRuntimeHookServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedRuntimeHookServiceServer) PostStartContainerHook ¶
func (UnimplementedRuntimeHookServiceServer) PostStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PostStopContainerHook ¶
func (UnimplementedRuntimeHookServiceServer) PostStopContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PostStopPodSandboxHook ¶ added in v0.5.0
func (UnimplementedRuntimeHookServiceServer) PostStopPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PreCreateContainerHook ¶ added in v0.5.0
func (UnimplementedRuntimeHookServiceServer) PreCreateContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PreRunPodSandboxHook ¶
func (UnimplementedRuntimeHookServiceServer) PreRunPodSandboxHook(context.Context, *PodSandboxHookRequest) (*PodSandboxHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PreStartContainerHook ¶
func (UnimplementedRuntimeHookServiceServer) PreStartContainerHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
func (UnimplementedRuntimeHookServiceServer) PreUpdateContainerResourcesHook ¶
func (UnimplementedRuntimeHookServiceServer) PreUpdateContainerResourcesHook(context.Context, *ContainerResourceHookRequest) (*ContainerResourceHookResponse, error)
type UnsafeRuntimeHookServiceServer ¶
type UnsafeRuntimeHookServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRuntimeHookServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RuntimeHookServiceServer will result in compilation errors.