resources

package
v0.0.0-...-02dee7c Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAllResourcesCreated = fmt.Errorf("Not all resources were creatated")

Functions

func CreateResourcesLoop

func CreateResourcesLoop(kubeCl *client.KubernetesClient, resources template.Resources, checkers []Checker) error

Types

type Checker

type Checker interface {
	IsReady() (bool, error)
	Name() string
}

func GetCheckers

func GetCheckers(kubeCl *client.KubernetesClient, resources template.Resources, metaConfig *config.MetaConfig) ([]Checker, error)

type CloudInstances

type CloudInstances struct {
	// Minimal amount of instances for the group in each zone. Required.
	MinPerZone *int32 `json:"minPerZone,omitempty"`

	// Maximum amount of instances for the group in each zone. Required.
	MaxPerZone *int32 `json:"maxPerZone,omitempty"`
}

CloudInstances is an extra parameters for NodeGroup with type Cloud.

type ConditionSummary

type ConditionSummary struct {
	// Status message about group handling.
	StatusMessage string `json:"statusMessage,omitempty"`

	// Summary for the NodeGroup status: True or False
	Ready string `json:"ready,omitempty"`
}

type Creator

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

func NewCreator

func NewCreator(kubeCl *client.KubernetesClient, resources template.Resources) *Creator

func (*Creator) TryToCreate

func (c *Creator) TryToCreate() error

type MachineFailure

type MachineFailure struct {
	// Machine's name.
	Name string `json:"name,omitempty"`

	// Machine's ProviderID.
	ProviderID string `json:"providerID,omitempty"`

	// Machine owner's name.
	OwnerRef string `json:"ownerRef,omitempty"`

	// Last operation with machine.
	LastOperation MachineOperation `json:"lastOperation,omitempty"`
}

type MachineOperation

type MachineOperation struct {
	// Last operation's description.
	Description string `json:"description,omitempty"`

	// Timestamp of last status update for operation.
	LastUpdateTime string `json:"lastUpdateTime,omitempty"`

	// Machine's operation state.
	State string `json:"state,omitempty"`

	// Type of operation.
	Type string `json:"type,omitempty"`
}

type NodeGroup

type NodeGroup struct {
	metav1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec defines the behavior of a node group.
	Spec NodeGroupSpec `json:"spec"`

	Status NodeGroupStatus `json:"status,omitempty"`
}

NodeGroup is a group of nodes in Kubernetes.

type NodeGroupSpec

type NodeGroupSpec struct {
	// Type of nodes in group: CloudEphemeral, CloudPermanent, CloudStatic, Static. Field is required
	NodeType NodeType `json:"nodeType,omitempty"`

	// cloudInstances. Optional.
	CloudInstances CloudInstances `json:"cloudInstances,omitempty"`
}

type NodeGroupStatus

type NodeGroupStatus struct {
	// Number of ready Kubernetes nodes in the group.
	Ready int32 `json:"ready,omitempty"`

	// Number of Kubernetes nodes (in any state) in the group.
	Nodes int32 `json:"nodes,omitempty"`

	// Number of instances (in any state) in the group.
	Instances int32 `json:"instances,omitempty"`

	// Number of desired machines in the group.
	Desired int32 `json:"desired,omitempty"`

	// Minimal amount of instances in the group.
	Min int32 `json:"min,omitempty"`

	// Maximum amount of instances in the group.
	Max int32 `json:"max,omitempty"`

	// Number of up-to-date nodes in the group.
	UpToDate int32 `json:"upToDate,omitempty"`

	// Number of overprovisioned instances in the group.
	Standby int32 `json:"standby,omitempty"`

	// Error message about possible problems with the group handling.
	Error string `json:"error,omitempty"`

	// A list of last failures of handled Machines.
	LastMachineFailures []MachineFailure `json:"lastMachineFailures,omitempty"`

	// Status' summary.
	ConditionSummary ConditionSummary `json:"conditionSummary,omitempty"`
}

type NodeType

type NodeType string

NodeType type of node

func (NodeType) String

func (nt NodeType) String() string

type Waiter

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

func NewWaiter

func NewWaiter(checkers []Checker) *Waiter

func (*Waiter) ReadyAll

func (w *Waiter) ReadyAll() (bool, error)

func (*Waiter) WithAttempts

func (w *Waiter) WithAttempts(a int) *Waiter

Jump to

Keyboard shortcuts

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