Documentation ¶
Index ¶
- func CreateNodeSelectorByNodepoolName(nodepool string) map[string]string
- func TaintsToTolerations(taints []corev1.Taint) []corev1.Toleration
- type DeploymentController
- func (d *DeploymentController) ApplyTemplate(scheme *runtime.Scheme, yad *v1alpha1.YurtAppDaemon, ...) error
- func (d *DeploymentController) CreateWorkload(yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error
- func (d *DeploymentController) DeleteWorkload(yda *v1alpha1.YurtAppDaemon, load *Workload) error
- func (d *DeploymentController) GetAllWorkloads(yad *v1alpha1.YurtAppDaemon) ([]*Workload, error)
- func (d *DeploymentController) GetTemplateType() v1alpha1.TemplateType
- func (d *DeploymentController) ObjectKey(load *Workload) client.ObjectKey
- func (d *DeploymentController) UpdateWorkload(load *Workload, yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, ...) error
- type StatefulSetController
- type Workload
- type WorkloadController
- type WorkloadSpec
- type WorkloadStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TaintsToTolerations ¶
func TaintsToTolerations(taints []corev1.Taint) []corev1.Toleration
Types ¶
type DeploymentController ¶ added in v1.5.0
func (*DeploymentController) ApplyTemplate ¶ added in v1.5.0
func (d *DeploymentController) ApplyTemplate(scheme *runtime.Scheme, yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string, set *appsv1.Deployment) error
ApplyTemplate updates the object to the latest revision, depending on the YurtAppDaemon.
func (*DeploymentController) CreateWorkload ¶ added in v1.5.0
func (d *DeploymentController) CreateWorkload(yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error
func (*DeploymentController) DeleteWorkload ¶ added in v1.5.0
func (d *DeploymentController) DeleteWorkload(yda *v1alpha1.YurtAppDaemon, load *Workload) error
func (*DeploymentController) GetAllWorkloads ¶ added in v1.5.0
func (d *DeploymentController) GetAllWorkloads(yad *v1alpha1.YurtAppDaemon) ([]*Workload, error)
func (*DeploymentController) GetTemplateType ¶ added in v1.5.0
func (d *DeploymentController) GetTemplateType() v1alpha1.TemplateType
func (*DeploymentController) ObjectKey ¶ added in v1.5.0
func (d *DeploymentController) ObjectKey(load *Workload) client.ObjectKey
func (*DeploymentController) UpdateWorkload ¶ added in v1.5.0
func (d *DeploymentController) UpdateWorkload(load *Workload, yad *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error
type StatefulSetController ¶ added in v1.5.0
type Workload ¶
type Workload struct { Name string Namespace string Kind string Spec WorkloadSpec Status WorkloadStatus }
func (*Workload) GetNodePoolName ¶
func (*Workload) GetNodeSelector ¶
func (*Workload) GetRevision ¶
func (*Workload) GetToleration ¶
func (w *Workload) GetToleration() []corev1.Toleration
type WorkloadController ¶
type WorkloadController interface { ObjectKey(load *Workload) client.ObjectKey GetAllWorkloads(daemon *v1alpha1.YurtAppDaemon) ([]*Workload, error) CreateWorkload(daemon *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error UpdateWorkload(load *Workload, daemon *v1alpha1.YurtAppDaemon, nodepool v1alpha1.NodePool, revision string) error DeleteWorkload(daemon *v1alpha1.YurtAppDaemon, load *Workload) error GetTemplateType() v1alpha1.TemplateType }
type WorkloadSpec ¶
type WorkloadSpec struct { Ref metav1.Object Tolerations []corev1.Toleration NodeSelector map[string]string }
WorkloadSpec stores the spec details of the workload
type WorkloadStatus ¶
type WorkloadStatus struct { Replicas int32 ReadyReplicas int32 AvailableCondition corev1.ConditionStatus }
WorkloadStatus stores the observed state of the Workload.
Click to show internal directories.
Click to hide internal directories.