package state
import "k8s.io/kubernetes/pkg/kubelet/status/state"
Index ¶
- type PodResizeStatus
- type PodResourceAllocation
- type PodResourceAllocationCheckpoint
- func NewPodResourceAllocationCheckpoint() *PodResourceAllocationCheckpoint
- func (prc *PodResourceAllocationCheckpoint) MarshalCheckpoint() ([]byte, error)
- func (prc *PodResourceAllocationCheckpoint) UnmarshalCheckpoint(blob []byte) error
- func (prc *PodResourceAllocationCheckpoint) VerifyChecksum() error
- type Reader
- type State
Types ¶
type PodResizeStatus ¶
type PodResizeStatus map[string]v1.PodResizeStatus
PodResizeStatus type is used in tracking the last resize decision for pod
type PodResourceAllocation ¶
type PodResourceAllocation map[string]map[string]v1.ResourceList
PodResourceAllocation type is used in tracking resources allocated to pod's containers
func (PodResourceAllocation) Clone ¶
func (pr PodResourceAllocation) Clone() PodResourceAllocation
Clone returns a copy of PodResourceAllocation
type PodResourceAllocationCheckpoint ¶
type PodResourceAllocationCheckpoint struct { AllocationEntries map[string]map[string]v1.ResourceList `json:"allocationEntries,omitempty"` ResizeStatusEntries map[string]v1.PodResizeStatus `json:"resizeStatusEntries,omitempty"` Checksum checksum.Checksum `json:"checksum"` }
PodResourceAllocationCheckpoint is used to store resources allocated to a pod in checkpoint
func NewPodResourceAllocationCheckpoint ¶
func NewPodResourceAllocationCheckpoint() *PodResourceAllocationCheckpoint
NewPodResourceAllocationCheckpoint returns an instance of Checkpoint
func (*PodResourceAllocationCheckpoint) MarshalCheckpoint ¶
func (prc *PodResourceAllocationCheckpoint) MarshalCheckpoint() ([]byte, error)
MarshalCheckpoint returns marshalled checkpoint
func (*PodResourceAllocationCheckpoint) UnmarshalCheckpoint ¶
func (prc *PodResourceAllocationCheckpoint) UnmarshalCheckpoint(blob []byte) error
UnmarshalCheckpoint tries to unmarshal passed bytes to checkpoint
func (*PodResourceAllocationCheckpoint) VerifyChecksum ¶
func (prc *PodResourceAllocationCheckpoint) VerifyChecksum() error
VerifyChecksum verifies that current checksum of checkpoint is valid
type Reader ¶
type Reader interface { GetContainerResourceAllocation(podUID string, containerName string) (v1.ResourceList, bool) GetPodResourceAllocation() PodResourceAllocation GetPodResizeStatus(podUID string) (v1.PodResizeStatus, bool) GetResizeStatus() PodResizeStatus }
Reader interface used to read current pod resource allocation state
type State ¶
type State interface { Reader // contains filtered or unexported methods }
State interface provides methods for tracking and setting pod resource allocation
func NewNoopStateCheckpoint ¶
func NewNoopStateCheckpoint() State
NewNoopStateCheckpoint creates a dummy state checkpoint manager
func NewStateCheckpoint ¶
NewStateCheckpoint creates new State for keeping track of pod resource allocations with checkpoint backend
func NewStateMemory ¶
func NewStateMemory() State
NewStateMemory creates new State to track resources allocated to pods
Source Files ¶
checkpoint.go state.go state_checkpoint.go state_mem.go
- Version
- v1.29.0
- Published
- Dec 13, 2023
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 1 minute ago –
Tools for package owners.