kubernetes/pkg/scheduler/framework/types.go

var generation

type ActionType

const Add

const Delete

const UpdateNodeAllocatable

const UpdateNodeLabel

const UpdateNodeTaint

const UpdateNodeCondition

const UpdateNodeAnnotation

const UpdatePodLabel

const UpdatePodScaleDown

const UpdatePodTolerations

const UpdatePodSchedulingGatesEliminated

const UpdatePodGeneratedResourceClaim

const updatePodOther

const All

const Update

const none

var basicActionTypes

var podActionTypes

var nodeActionTypes

func (a ActionType) String() string {}

type EventResource

const Pod

const assignedPod

const unschedulablePod

const Node

const PersistentVolume

const PersistentVolumeClaim

const CSINode

const CSIDriver

const VolumeAttachment

const CSIStorageCapacity

const StorageClass

const ResourceClaim

const ResourceSlice

const DeviceClass

const WildCard

var allResources

type ClusterEventWithHint

type QueueingHintFn

type QueueingHint

const QueueSkip

const Queue

func (s QueueingHint) String() string {}

type ClusterEvent

// Label is used for logging and metrics.
func (ce ClusterEvent) Label() string {}

// AllClusterEventLabels returns all possible cluster event labels given to the metrics.
func AllClusterEventLabels() []string {}

// IsWildCard returns true if ClusterEvent follows WildCard semantics
func (ce ClusterEvent) IsWildCard() bool {}

// Match returns true if ClusterEvent is matched with the coming event.
// If the ce.Resource is "*", there's no requirement for the coming event' Resource.
// Contrarily, if the coming event's Resource is "*", the ce.Resource should only be "*".
//
// Note: we have a special case here when the coming event is a wildcard event,
// it will force all Pods to move to activeQ/backoffQ,
// but we take it as an unmatched event unless the ce is also a wildcard one.
func (ce ClusterEvent) Match(incomingEvent ClusterEvent) bool {}

// match returns true if the resource is matched with the coming resource.
func (r EventResource) match(resource EventResource) bool {}

func UnrollWildCardResource() []ClusterEventWithHint {}

type QueuedPodInfo

// DeepCopy returns a deep copy of the QueuedPodInfo object.
func (pqi *QueuedPodInfo) DeepCopy() *QueuedPodInfo {}

type PodInfo

// DeepCopy returns a deep copy of the PodInfo object.
func (pi *PodInfo) DeepCopy() *PodInfo {}

// Update creates a full new PodInfo by default. And only updates the pod when the PodInfo
// has been instantiated and the passed pod is the exact same one as the original pod.
func (pi *PodInfo) Update(pod *v1.Pod) error {}

type AffinityTerm

// Matches returns true if the pod matches the label selector and namespaces or namespace selector.
func (at *AffinityTerm) Matches(pod *v1.Pod, nsLabels labels.Set) bool {}

type WeightedAffinityTerm

const ExtenderName

type Diagnosis

type FitError

const NoNodeAvailableMsg

func (d *Diagnosis) AddPluginStatus(sts *Status) {}

// Error returns detailed information of why the pod failed to fit on each node.
// A message format is "0/X nodes are available: <PreFilterMsg>. <FilterMsg>. <PostFilterMsg>."
func (f *FitError) Error() string {}

func newAffinityTerm(pod *v1.Pod, term *v1.PodAffinityTerm) (*AffinityTerm, error) {}

// GetAffinityTerms receives a Pod and affinity terms and returns the namespaces and
// selectors of the terms.
func GetAffinityTerms(pod *v1.Pod, v1Terms []v1.PodAffinityTerm) ([]AffinityTerm, error) {}

// getWeightedAffinityTerms returns the list of processed affinity terms.
func getWeightedAffinityTerms(pod *v1.Pod, v1Terms []v1.WeightedPodAffinityTerm) ([]WeightedAffinityTerm, error) {}

// NewPodInfo returns a new PodInfo.
func NewPodInfo(pod *v1.Pod) (*PodInfo, error) {}

func GetPodAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) {}

func GetPodAntiAffinityTerms(affinity *v1.Affinity) (terms []v1.PodAffinityTerm) {}

// returns a set of names according to the namespaces indicated in podAffinityTerm.
// If namespaces is empty it considers the given pod's namespace.
func getNamespacesFromPodAffinityTerm(pod *v1.Pod, podAffinityTerm *v1.PodAffinityTerm) sets.Set[string] {}

type ImageStateSummary

// Snapshot returns a copy without Nodes field of ImageStateSummary
func (iss *ImageStateSummary) Snapshot() *ImageStateSummary {}

type NodeInfo

var _

func (n *NodeInfo) GetName() string {}

func (n *NodeInfo) GetNamespace() string {}

// nextGeneration: Let's make sure history never forgets the name...
// Increments the generation number monotonically ensuring that generation numbers never collide.
// Collision of the generation numbers would be particularly problematic if a node was deleted and
// added back with the same name. See issue#63262.
func nextGeneration() int64 {}

type Resource

// NewResource creates a Resource from ResourceList
func NewResource(rl v1.ResourceList) *Resource {}

// Add adds ResourceList into Resource.
func (r *Resource) Add(rl v1.ResourceList) {}

// Clone returns a copy of this resource.
func (r *Resource) Clone() *Resource {}

// AddScalar adds a resource by a scalar value of this resource.
func (r *Resource) AddScalar(name v1.ResourceName, quantity int64) {}

// SetScalar sets a resource by a scalar value of this resource.
func (r *Resource) SetScalar(name v1.ResourceName, quantity int64) {}

// SetMaxResource compares with ResourceList and takes max value for each Resource.
func (r *Resource) SetMaxResource(rl v1.ResourceList) {}

// NewNodeInfo returns a ready to use empty NodeInfo object.
// If any pods are given in arguments, their information will be aggregated in
// the returned object.
func NewNodeInfo(pods ...*v1.Pod) *NodeInfo {}

// Node returns overall information about this node.
func (n *NodeInfo) Node() *v1.Node {}

// Snapshot returns a copy of this node, Except that ImageStates is copied without the Nodes field.
func (n *NodeInfo) Snapshot() *NodeInfo {}

// String returns representation of human readable format of this NodeInfo.
func (n *NodeInfo) String() string {}

// AddPodInfo adds pod information to this NodeInfo.
// Consider using this instead of AddPod if a PodInfo is already computed.
func (n *NodeInfo) AddPodInfo(podInfo *PodInfo) {}

// AddPod is a wrapper around AddPodInfo.
func (n *NodeInfo) AddPod(pod *v1.Pod) {}

func podWithAffinity(p *v1.Pod) bool {}

func podWithRequiredAntiAffinity(p *v1.Pod) bool {}

func removeFromSlice(logger klog.Logger, s []*PodInfo, k string) ([]*PodInfo, bool) {}

// RemovePod subtracts pod information from this NodeInfo.
func (n *NodeInfo) RemovePod(logger klog.Logger, pod *v1.Pod) error {}

// update node info based on the pod and sign.
// The sign will be set to `+1` when AddPod and to `-1` when RemovePod.
func (n *NodeInfo) update(pod *v1.Pod, sign int64) {}

func calculateResource(pod *v1.Pod) (Resource, int64, int64) {}

// updateUsedPorts updates the UsedPorts of NodeInfo.
func (n *NodeInfo) updateUsedPorts(pod *v1.Pod, add bool) {}

// updatePVCRefCounts updates the PVCRefCounts of NodeInfo.
func (n *NodeInfo) updatePVCRefCounts(pod *v1.Pod, add bool) {}

// SetNode sets the overall node information.
func (n *NodeInfo) SetNode(node *v1.Node) {}

// RemoveNode removes the node object, leaving all other tracking information.
func (n *NodeInfo) RemoveNode() {}

// GetPodKey returns the string key of a pod.
func GetPodKey(pod *v1.Pod) (string, error) {}

// GetNamespacedName returns the string format of a namespaced resource name.
func GetNamespacedName(namespace, name string) string {}

const DefaultBindAllHostIP

type ProtocolPort

// NewProtocolPort creates a ProtocolPort instance.
func NewProtocolPort(protocol string, port int32) *ProtocolPort {}

type HostPortInfo

// Add adds (ip, protocol, port) to HostPortInfo
func (h HostPortInfo) Add(ip, protocol string, port int32) {}

// Remove removes (ip, protocol, port) from HostPortInfo
func (h HostPortInfo) Remove(ip, protocol string, port int32) {}

// Len returns the total number of (ip, protocol, port) tuple in HostPortInfo
func (h HostPortInfo) Len() int {}

// CheckConflict checks if the input (ip, protocol, port) conflicts with the existing
// ones in HostPortInfo.
func (h HostPortInfo) CheckConflict(ip, protocol string, port int32) bool {}

// sanitize the parameters
func (h HostPortInfo) sanitize(ip, protocol *string) {}