workloadcontroller

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNodeSelectorByNodepoolName

func CreateNodeSelectorByNodepoolName(nodepool string) map[string]string

func TaintsToTolerations

func TaintsToTolerations(taints []corev1.Taint) []corev1.Toleration

Types

type DeploymentControllor

type DeploymentControllor struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*DeploymentControllor) CreateWorkload

func (d *DeploymentControllor) CreateWorkload(yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error

func (*DeploymentControllor) DeleteWorkload

func (d *DeploymentControllor) DeleteWorkload(yda *v1alpha1.YurtAppDaemon, load *Workload) error

func (*DeploymentControllor) GetAllWorkloads

func (d *DeploymentControllor) GetAllWorkloads(set *v1alpha1.YurtAppDaemon) ([]*Workload, error)

func (*DeploymentControllor) GetTemplateType

func (d *DeploymentControllor) GetTemplateType() v1alpha1.TemplateType

func (*DeploymentControllor) ObjectKey

func (d *DeploymentControllor) ObjectKey(load *Workload) client.ObjectKey

func (*DeploymentControllor) UpdateWorkload

func (d *DeploymentControllor) UpdateWorkload(load *Workload, yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error

type StatefulSetControllor

type StatefulSetControllor struct {
	client.Client
	// contains filtered or unexported fields
}

type Workload

type Workload struct {
	Name      string
	Namespace string
	Kind      string
	Spec      WorkloadSpec
	Status    WorkloadStatus
}

func (*Workload) GetKind

func (w *Workload) GetKind() string

func (*Workload) GetNodePoolName

func (w *Workload) GetNodePoolName() string

func (*Workload) GetNodeSelector

func (w *Workload) GetNodeSelector() map[string]string

func (*Workload) GetRevision

func (w *Workload) GetRevision() string

func (*Workload) GetToleration

func (w *Workload) GetToleration() []corev1.Toleration

type WorkloadControllor

type WorkloadControllor interface {
	ObjectKey(load *Workload) client.ObjectKey
	GetAllWorkloads(set *v1alpha1.YurtAppDaemon) ([]*Workload, error)
	CreateWorkload(set *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error
	UpdateWorkload(load *Workload, set *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error
	DeleteWorkload(set *v1alpha1.YurtAppDaemon, load *Workload) error
	GetTemplateType() v1alpha1.TemplateType
}

type WorkloadSpec

type WorkloadSpec struct {
	Ref          metav1.Object
	Toleration   []corev1.Toleration
	NodeSelector map[string]string
}

WorkloadSpec stores the spec details of the workload

type WorkloadStatus

type WorkloadStatus struct {
}

WorkloadStatus stores the observed state of the Workload.

Jump to

Keyboard shortcuts

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