nodestore

package
v0.0.0-...-dcfb068 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Name commonstores.StoreName = "NodeStore"

Variables

View Source
var GlobalNodeInfoPlaceHolder = framework.NewNodeInfo()

Functions

func AssignMicroTopology

func AssignMicroTopology(node framework.NodeInfo, pod *v1.Pod) error

-------------------------------------- topology --------------------------------------

func NewCache

func NewCache(handler handler.CacheHandler) commonstores.CommonStore

func NewSnapshot

func NewSnapshot(handler handler.CacheHandler) commonstores.CommonStore

Types

type NodeStore

type NodeStore struct {
	commonstores.BaseStore

	Store generationstore.Store // Holds all nodes including those that have been Deleted but still have residual pods.
	// `Deleted` holds all the nodes:
	// 1. that have been deleted but still have residual pods.
	// 2. that its pod comes before its own, so we can't use it to schedule.
	Deleted     sets.String
	AfterAdd    func(framework.NodeInfo) // Triggered by a call to the NodeStore.Add function, used to maintain additional information about the node.
	AfterDelete func(framework.NodeInfo) // Triggered by a call to the NodeStore.Delete function, used to maintain additional information about the node.
	// contains filtered or unexported fields
}

-------------------------------------- NodeStore --------------------------------------

func (*NodeStore) Add

func (s *NodeStore) Add(nodeName string, nodeInfo framework.NodeInfo)

Add will Store the node and trigger the AfterAdd.

func (*NodeStore) AddCNR

func (*NodeStore) AddNMNode

func (s *NodeStore) AddNMNode(nmNode *nodev1alpha1.NMNode) error

func (*NodeStore) AddNode

func (s *NodeStore) AddNode(node *v1.Node) error

func (*NodeStore) AddPod

func (s *NodeStore) AddPod(pod *v1.Pod) error

func (*NodeStore) AllNodesClone

func (s *NodeStore) AllNodesClone() map[string]framework.NodeInfo

AllNodesClone return all nodes's deepcopy and organize them in map.

func (*NodeStore) AssumePod

func (s *NodeStore) AssumePod(podInfo *framework.CachePodInfo) error

func (*NodeStore) Delete

func (s *NodeStore) Delete(nodeName string, nodeInfo framework.NodeInfo)

Delete will delete the node and trigger the AfterDelete.

func (*NodeStore) ForgetPod

func (s *NodeStore) ForgetPod(podInfo *framework.CachePodInfo) error

func (*NodeStore) Get

func (s *NodeStore) Get(nodeName string) framework.NodeInfo

Set will get the node without trigger any function.

func (*NodeStore) GetNodeInfo

func (s *NodeStore) GetNodeInfo(nodeName string) framework.NodeInfo

func (*NodeStore) Len

func (s *NodeStore) Len() int

func (*NodeStore) Name

func (c *NodeStore) Name() commonstores.StoreName

func (*NodeStore) NodeInThisPartition

func (s *NodeStore) NodeInThisPartition(nodeName string) bool

func (*NodeStore) RemoveCNR

RemoveCNR removes custom node resource. The node might be still in the node tree because their deletion events didn't arrive yet.

func (*NodeStore) RemoveNMNode

func (s *NodeStore) RemoveNMNode(nmNode *nodev1alpha1.NMNode) error

func (*NodeStore) RemoveNode

func (s *NodeStore) RemoveNode(node *v1.Node) error

func (*NodeStore) RemovePod

func (s *NodeStore) RemovePod(pod *v1.Pod) error

func (*NodeStore) Set

func (s *NodeStore) Set(nodeName string, nodeInfo framework.NodeInfo)

Set will Store the node without trigger any function.

func (*NodeStore) SetNodeInPartition

func (s *NodeStore) SetNodeInPartition(nodeName string) error

func (*NodeStore) SetNodeOutOfPartition

func (s *NodeStore) SetNodeOutOfPartition(nodeName string) error

func (*NodeStore) UpdateCNR

func (s *NodeStore) UpdateCNR(oldCNR, newCNR *katalystv1alpha1.CustomNodeResource) error

func (*NodeStore) UpdateNMNode

func (s *NodeStore) UpdateNMNode(oldNMNode, newNMNode *nodev1alpha1.NMNode) error

func (*NodeStore) UpdateNode

func (s *NodeStore) UpdateNode(oldNode, newNode *v1.Node) error

func (*NodeStore) UpdatePod

func (s *NodeStore) UpdatePod(oldPod, newPod *v1.Pod) error

func (*NodeStore) UpdateSnapshot

func (cacheStore *NodeStore) UpdateSnapshot(store commonstores.CommonStore) error

Jump to

Keyboard shortcuts

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