planner

package
v0.2.0-alpha01 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JoinURLAnnotation = "rke.cattle.io/join-url"

	InitNodeLabel         = "rke.cattle.io/init-node"
	EtcdRoleLabel         = "rke.cattle.io/etcd-role"
	WorkerRoleLabel       = "rke.cattle.io/worker-role"
	ControlPlaneRoleLabel = "rke.cattle.io/control-plane-role"
	MachineUIDLabel       = "rke.cattle.io/machine"

	MachineNameLabel      = "rke.cattle.io/machine-name"
	MachineNamespaceLabel = "rke.cattle.io/machine-namespace"

	LabelsAnnotation = "rke.cattle.io/labels"
	TaintsAnnotation = "rke.cattle.io/taints"

	RuntimeK3S  = "k3s"
	RuntimeRKE2 = "rke2"

	SecretTypeMachinePlan = "rke.cattle.io/machine-plan"
)
View Source
const (
	NoPlanPlanStatus         PlanStatus = "NoPlan"
	NoPlanPlanStatusMessage             = "waiting for plan to be assigned"
	WaitingPlanStatus        PlanStatus = "Waiting"
	WaitingPlanStatusMessage            = "waiting for plan to be applied"
	InSyncPlanStatus         PlanStatus = "InSync"
	InSyncPlanStatusMessage             = "plan applied"
	ErrorStatus              PlanStatus = "Error"
)

Variables

This section is empty.

Functions

func DownloadClusterAgentYAML

func DownloadClusterAgentYAML(ctx context.Context, url, ca string, token, clusterID string) ([]byte, error)

func GetRuntime

func GetRuntime(kubernetesVersion string) string

func PlanSecretFromMachine

func PlanSecretFromMachine(obj *capi.Machine) string

func SecretToNode

func SecretToNode(secret *corev1.Secret) (*plan.Node, error)

Types

type ErrWaiting

type ErrWaiting string

func (ErrWaiting) Error

func (e ErrWaiting) Error() string

type PlanStatus

type PlanStatus string

func GetPlanStatusReasonMessage

func GetPlanStatusReasonMessage(plan *plan.Node) (corev1.ConditionStatus, PlanStatus, string)

type PlanStore

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

func (*PlanStore) Load

func (p *PlanStore) Load(cluster *rkev1.RKECluster) (*plan.Plan, error)

func (*PlanStore) UpdatePlan

func (p *PlanStore) UpdatePlan(machine *capi.Machine, plan plan.NodePlan) error

type Planner

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

func New

func New(ctx context.Context, clients *clients.Clients) *Planner

func (*Planner) CurrentPlan

func (p *Planner) CurrentPlan(cluster *rkev1.RKECluster) (*plan.Plan, error)

func (*Planner) Process

func (p *Planner) Process(cluster *rkev1.RKECluster) error

Jump to

Keyboard shortcuts

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