scheduler

package
v0.0.0-...-ef63bee Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClusterCache

func NewClusterCache(
	cluster *rocketv1alpha1.Cluster,
	kubeclientset kubernetes.Interface,
	nodeInformer corev1informers.NodeInformer,
	podInformer corev1informers.PodInformer) *clusterCache

NewClusterCache return a new clusterCache。

Types

type ClusterResult

type ClusterResult struct {
	// 集群名称
	Name string `json:"name,omitempty"`
	// 调度分数,分数越高,越适合
	Score int64 `json:"score,omitempty"`
	// 集群的地域信息 eg: ap-beijing
	Region string `json:"region,omitempty"`
	// 集群的区域信息 eg: pub, ded
	Area string `json:"area,omitempty"`
}

type SchedulerReconciler

type SchedulerReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

SchedulerReconciler reconciles a Scheduler object

func NewReconcile

func NewReconcile(mgr manager.Manager) *SchedulerReconciler

NewReconcile 返回一个新的 reconcile

func (*SchedulerReconciler) Reconcile

func (r *SchedulerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.8.3/pkg/reconcile

func (*SchedulerReconciler) SetupWithManager

func (r *SchedulerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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