Documentation ¶
Index ¶
- Constants
- Variables
- func CovertPolicy(dp []v1alpha1.SchedulePolicy) map[string]int32
- func GetClusterID(node *corev1.Node) string
- func IsVirtualNode(node *corev1.Node) bool
- func IsVirtualPod(pod *corev1.Pod) bool
- func Until(ctx context.Context, pieces int, doWorkPiece workqueue.DoWorkPieceFunc)
- type ClustersNodeSelection
Constants ¶
View Source
const ( // NodeType is define the node type key NodeType = "type" // VirtualPodLabel is the label of virtual pod VirtualPodLabel = "virtual-pod" // VirtualKubeletLabel is the label of virtual kubelet VirtualKubeletLabel = "virtual-kubelet" // TrippedLabels is the label of tripped labels TrippedLabels = "tripped-labels" // ClusterID marks the id of a cluster ClusterID = "clusterID" // SelectorKey is the key of ClusterSelector SelectorKey = "clusterSelector" )
View Source
const (
TopologySchedulingLabelKey = "topology-scheduling-policy.scheduling.sigs.k8s.io"
)
Variables ¶
View Source
var ( // ErrorNotMatched means pod does not match coscheduling ErrorNotMatched = fmt.Errorf("not match coscheduling") // ErrorWaiting means pod number does not match the min pods required ErrorWaiting = fmt.Errorf("waiting") // ErrorResourceNotEnough means cluster resource is not enough, mainly used in Pre-Filter ErrorResourceNotEnough = fmt.Errorf("resource not enough") )
Functions ¶
func CovertPolicy ¶
func CovertPolicy(dp []v1alpha1.SchedulePolicy) map[string]int32
func GetClusterID ¶
GetClusterID return the cluster in node label
func IsVirtualNode ¶
IsVirtualNode defines if a node is virtual node
func IsVirtualPod ¶
IsVirtualPod defines if a pod is virtual pod
Types ¶
type ClustersNodeSelection ¶
type ClustersNodeSelection struct { NodeSelector map[string]string `json:"nodeSelector,omitempty"` Affinity *corev1.Affinity `json:"affinity,omitempty"` Tolerations []corev1.Toleration `json:"tolerations,omitempty"` }
ClustersNodeSelection is a struct including some scheduling parameters
func ConvertAnnotations ¶
func ConvertAnnotations(annotation map[string]string) *ClustersNodeSelection
ConvertAnnotations converts annotations to ClustersNodeSelection
Click to show internal directories.
Click to hide internal directories.