node

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 9, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPodsOnNode added in v1.0.4

func GetPodsOnNode(ctx context.Context, nodeName string, clientset kubernetes.Interface, options ...NodeValidationOption) ([]corev1.Pod, error)

GetPodsOnNode makes 5 attempts by default to list pods before erroring unless it times out.

func IsDrained

func IsDrained(ctx context.Context) (bool, error)

func IsInitialized

func IsInitialized(ctx context.Context) error

func IsUnscheduled

func IsUnscheduled(ctx context.Context) error

func NewNodeProvider

func NewNodeProvider(configSource string, skipPhases []string, logger *zap.Logger) (nodeprovider.NodeProvider, error)

Types

type APIServerValidator

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

func NewAPIServerValidator

func NewAPIServerValidator(kubelet Kubelet) APIServerValidator

func (APIServerValidator) CheckIdentity

func (a APIServerValidator) CheckIdentity(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error

func (APIServerValidator) CheckVPCEndpointAccess

func (a APIServerValidator) CheckVPCEndpointAccess(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error

func (APIServerValidator) MakeAuthenticatedRequest

func (a APIServerValidator) MakeAuthenticatedRequest(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error

type Kubelet added in v1.0.4

type Kubelet interface {
	// BuildClient creates a new Kubernetes client
	BuildClient() (kubernetes.Interface, error)
	// KubeconfigPath returns the path to the kubeconfig file
	KubeconfigPath() string
	// Version returns the current kubelet version
	Version() (string, error)
}

Kubelet is the kubernetes node agent.

type NodeValidationOption added in v1.0.4

type NodeValidationOption func(*NodeValidationOptions)

NodeValidationOption defines a function type for setting options.

func WithMaxRetries added in v1.0.4

func WithMaxRetries(maxRetries int) NodeValidationOption

WithMaxRetries sets the maximum number of retries.

func WithValidationInterval added in v1.0.4

func WithValidationInterval(interval time.Duration) NodeValidationOption

WithValidationInterval sets the validation interval.

func WithValidationTimeout added in v1.0.4

func WithValidationTimeout(timeout time.Duration) NodeValidationOption

WithValidationTimeout sets the validation timeout.

type NodeValidationOptions added in v1.0.4

type NodeValidationOptions struct {
	ValidationInterval time.Duration
	ValidationTimeout  time.Duration
	MaxRetries         int
}

NodeValidationOptions are options to configure node validations.

func DefaultNodeValidationOptions added in v1.0.4

func DefaultNodeValidationOptions() NodeValidationOptions

DefaultNodeValidationOptions returns the default configuration options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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