server

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployAppRequest

type DeployAppRequest struct {
	// 待模拟调度的 Pod 信息
	Pods []*corev1.Pod `json:"pods"`
	// 待模拟调度的 Deployment 信息
	Deployments []*appsv1.Deployment `json:"deployments"`
	// 待模拟调度的 DaemonSet 信息
	DaemonSets []*appsv1.DaemonSet `json:"daemonsets"`
	// 待模拟调度的 StatefulSet 信息
	StatefulSets []*appsv1.StatefulSet `json:"statefulsets"`
	// 待模拟调度的 Job 信息
	Jobs []*batchv1.Job
	// 应用 ConfigMap 信息
	ConfigMaps []*corev1.ConfigMap
	// 添加的虚拟节点
	NewNodes []*corev1.Node `json:"newnodes"`
}

type NodeStatus

type NodeStatus struct {
	// 节点信息
	Node string `json:"node"`
	// 该节点上所有 Pod 信息
	Pods []string `json:"pods"`
}

已成功调度的 Pod 信息

type ScaleAppRequest

type ScaleAppRequest struct {
	// 待扩容的 Deployment 信息
	Deployments []*appsv1.Deployment `json:"deployments"`
	// 待扩容的 DaemonSet 信息
	DaemonSets []*appsv1.DaemonSet `json:"daemonsets"`
	// 待扩容的 StatefulSet 信息
	StatefulSets []*appsv1.StatefulSet `json:"statefulsets"`
	// 添加的虚拟节点
	NewNodes []*corev1.Node `json:"newnodes"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(kubeconfig, master string) (*Server, error)

func (*Server) Start

func (server *Server) Start(opts ...simulator.Option)

type SimulateResponse

type SimulateResponse struct {
	UnscheduledPods []UnscheduledPod `json:"unscheduledPods"`
	NodeStatus      []NodeStatus     `json:"nodeStatus"`
}

type UnscheduledPod

type UnscheduledPod struct {
	Pod    string `json:"pod"`
	Reason string `json:"reason"`
}

无法成功调度的 Pod 信息

Jump to

Keyboard shortcuts

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