node

package
v0.0.0-...-d7985ca Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExtendedResourceRegistered

func IsExtendedResourceRegistered(node *v1.Node, instanceType *cloudprovider.InstanceType) (v1.ResourceName, bool)

IsExtendedResourceRegistered returns true if there are no extended resources on the node, or they have all been registered by device plugins

func IsStartupTaintRemoved

func IsStartupTaintRemoved(node *v1.Node, provisioner *v1alpha5.Provisioner) (*v1.Taint, bool)

IsStartupTaintRemoved returns true if there are no startup taints registered for the provisioner, or if all startup taints have been removed from the node

func NewController

func NewController(clk clock.Clock, kubeClient client.Client, cloudProvider cloudprovider.CloudProvider, cluster *state.Cluster) corecontroller.Controller

NewController constructs a nodeController instance

Types

type Controller

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

Controller manages a set of properties on karpenter provisioned nodes, such as taints, labels, finalizers.

func (*Controller) Builder

func (*Controller) Name

func (c *Controller) Name() string

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context, node *v1.Node) (reconcile.Result, error)

Reconcile executes a reallocation control loop for the resource

type Drift

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

func (*Drift) Reconcile

func (d *Drift) Reconcile(ctx context.Context, provisioner *v1alpha5.Provisioner, node *v1.Node) (reconcile.Result, error)

type Emptiness

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

Emptiness is a subreconciler that deletes nodes that are empty after a ttl

func (*Emptiness) Reconcile

func (r *Emptiness) Reconcile(ctx context.Context, provisioner *v1alpha5.Provisioner, n *v1.Node) (reconcile.Result, error)

Reconcile reconciles the node

type Finalizer

type Finalizer struct{}

Finalizer is a subreconciler that ensures nodes have the termination finalizer. This protects against instances that launch when Karpenter fails to create the node object. In this case, the node will come online without the termination finalizer. This controller will update the node accordingly.

func (*Finalizer) Reconcile

func (r *Finalizer) Reconcile(_ context.Context, provisioner *v1alpha5.Provisioner, node *v1.Node) (reconcile.Result, error)

Reconcile reconciles the node

type Initialization

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

func (*Initialization) Reconcile

func (r *Initialization) Reconcile(ctx context.Context, provisioner *v1alpha5.Provisioner, n *v1.Node) (reconcile.Result, error)

Reconcile reconciles the node

Jump to

Keyboard shortcuts

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