nodeclaim

package
v0.32.10 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllNodesForNodeClaim

func AllNodesForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) ([]*v1.Node, error)

AllNodesForNodeClaim is a helper function that takes a v1beta1.NodeClaim and finds ALL matching v1.Nodes by their providerID If the providerID is not resolved for a NodeClaim, then no Nodes will map to it

func CreatedCounter

func CreatedCounter(nodeClaim *v1beta1.NodeClaim, reason string) prometheus.Counter

func Delete

func Delete(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) error

func DisruptedCounter

func DisruptedCounter(nodeClaim *v1beta1.NodeClaim, disruptionType string) prometheus.Counter

func DriftedCounter

func DriftedCounter(nodeClaim *v1beta1.NodeClaim, driftType string) prometheus.Counter

func Get

func Get(ctx context.Context, c client.Client, key Key) (*v1beta1.NodeClaim, error)

func IgnoreDuplicateNodeError

func IgnoreDuplicateNodeError(err error) error

func IgnoreNodeNotFoundError

func IgnoreNodeNotFoundError(err error) error

func InitializedCounter

func InitializedCounter(nodeClaim *v1beta1.NodeClaim) prometheus.Counter

func IsDuplicateNodeError

func IsDuplicateNodeError(err error) bool

func IsNodeNotFoundError

func IsNodeNotFoundError(err error) bool

func LaunchedCounter

func LaunchedCounter(nodeClaim *v1beta1.NodeClaim) prometheus.Counter

func New

func New(machine *v1alpha5.Machine) *v1beta1.NodeClaim

func NewConditions

func NewConditions(conds apis.Conditions) apis.Conditions

func NewFromNode

func NewFromNode(node *v1.Node) *v1beta1.NodeClaim

NewFromNode converts a node into a pseudo-NodeClaim using known values from the node Deprecated: This NodeClaim generator function can be removed when v1beta1 migration has completed.

func NodeEventHandler

func NodeEventHandler(c client.Client) handler.EventHandler

NodeEventHandler is a watcher on v1.Node that maps Nodes to NodeClaims based on provider ids and enqueues reconcile.Requests for the NodeClaims

func NodeForNodeClaim

func NodeForNodeClaim(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) (*v1.Node, error)

NodeForNodeClaim is a helper function that takes a v1beta1.NodeClaim and attempts to find the matching v1.Node by its providerID This function will return errors if:

  1. No v1.Nodes match the v1beta1.NodeClaim providerID
  2. Multiple v1.Nodes match the v1beta1.NodeClaim providerID

func NodePoolEventHandler

func NodePoolEventHandler(c client.Client) handler.EventHandler

NodePoolEventHandler is a watcher on v1beta1.NodeClaim that maps Provisioner to NodeClaims based on the v1beta1.NodePoolLabelKey and enqueues reconcile.Requests for the NodeClaim

func Owner

func Owner(ctx context.Context, c client.Client, obj interface{ GetLabels() map[string]string }) (*v1beta1.NodePool, error)

func OwnerKey

func OwnerKey(obj interface{ GetLabels() map[string]string }) nodepoolutil.Key

func Patch

func Patch(ctx context.Context, c client.Client, stored, nodeClaim *v1beta1.NodeClaim) error

func PatchStatus

func PatchStatus(ctx context.Context, c client.Client, stored, nodeClaim *v1beta1.NodeClaim) error

func PodEventHandler

func PodEventHandler(c client.Client) handler.EventHandler

PodEventHandler is a watcher on v1.Pods that maps Pods to NodeClaim based on the node names and enqueues reconcile.Requests for the NodeClaims

func RegisteredCounter

func RegisteredCounter(nodeClaim *v1beta1.NodeClaim) prometheus.Counter

func TerminatedCounter

func TerminatedCounter(nodeClaim *v1beta1.NodeClaim, reason string) prometheus.Counter

func UpdateNodeOwnerReferences

func UpdateNodeOwnerReferences(nodeClaim *v1beta1.NodeClaim, node *v1.Node) *v1.Node

func UpdateStatus

func UpdateStatus(ctx context.Context, c client.Client, nodeClaim *v1beta1.NodeClaim) error

Types

type DuplicateNodeError

type DuplicateNodeError struct {
	ProviderID string
}

DuplicateNodeError is an error returned when multiple v1.Nodes are found matching the passed providerID

func (*DuplicateNodeError) Error

func (e *DuplicateNodeError) Error() string

type Key

type Key struct {
	Name      string
	IsMachine bool
}

type NodeNotFoundError

type NodeNotFoundError struct {
	ProviderID string
}

NodeNotFoundError is an error returned when no v1.Nodes are found matching the passed providerID

func (*NodeNotFoundError) Error

func (e *NodeNotFoundError) Error() string

Jump to

Keyboard shortcuts

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