kubernetes

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConnection

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

func CheckUnauthenticatedAccess

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

func GetAndWait added in v1.0.6

func GetAndWait[O runtime.Object](ctx context.Context, timeout time.Duration, get Getter[O], name string, ready func(O) bool) (O, error)

GetAndWait waits for an object to meet a condition. It will retry until the timeout is reached or the condition is met. To allow for longer wait times while avoiding to retry non-transient errors, we only retry up to 3 consecutive errors coming from the API server.

func GetRetry added in v1.0.6

func GetRetry[O runtime.Object](ctx context.Context, getter Getter[O], name string, opts ...GetOption) (O, error)

GetRetry retries the get request until it succeeds or the retry limit is reached.

func IdempotentCreate added in v1.0.7

func IdempotentCreate[O runtime.Object](ctx context.Context, creator Creator[O], obj O, opts ...CreateOption) error

IdempotentCreate retries the create request until it succeeds, returns an AlreadyExists error, or the retry limit is reached. AlreadyExists errors will not be returned as errors

func IdempotentDelete added in v1.0.7

func IdempotentDelete(ctx context.Context, deleter Deleter, name string, opts ...DeleteOption) error

IdempotentDelete retries the delete request until it succeeds, returns a NotFound error, or the retry limit is reached. NotFound errors will not be returned as errors

func ListAndWait added in v1.0.6

func ListAndWait[O runtime.Object](ctx context.Context, timeout time.Duration, list Lister[O], ready func(O) bool, opts ...ListOption) (O, error)

ListAndWait waits for a list of objects to meet a condition. It will retry until the timeout is reached or the condition is met. To allow for longer wait times while avoiding to retry non-transient errors, we only retry up to 3 consecutive errors coming from the API server.

func ListRetry added in v1.0.6

func ListRetry[O runtime.Object](ctx context.Context, lister Lister[O], opts ...ListOption) (O, error)

ListRetry retries the list request until it succeeds or the retry limit is reached.

func MakeUnauthenticatedRequest

func MakeUnauthenticatedRequest(ctx context.Context, endpoint string, caCertificate []byte) error

func WaitFor added in v1.0.6

func WaitFor[O runtime.Object](ctx context.Context, timeout time.Duration, read Read[O], ready func(O) bool) (O, error)

WaitFor waits for an object/s to meet a condition. It will retry until the timeout is reached or the condition is met. To allow for longer wait times while avoiding to retry non-transient errors, we only retry up to 3 consecutive errors coming from the API server.

func WithCertPath added in v1.0.7

func WithCertPath(certPath string) func(*KubeletCertificateValidator)

Types

type AccessValidator

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

func NewAccessValidator

func NewAccessValidator(clusterProvider ClusterProvider) AccessValidator

func (AccessValidator) Run

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

type ClusterProvider added in v1.0.7

type ClusterProvider interface {
	ReadClusterDetails(ctx context.Context, node *api.NodeConfig) (*api.ClusterDetails, error)
}

func NewClusterProvider added in v1.0.7

func NewClusterProvider(config aws.Config) ClusterProvider

type CreateOption added in v1.0.7

type CreateOption func(*CreateOptions)

CreateOption is an option for the Create request.

type CreateOptions added in v1.0.7

type CreateOptions struct {
	metav1.CreateOptions
}

CreateOptions configures a Create request.

type Creator added in v1.0.7

type Creator[O runtime.Object] interface {
	Create(ctx context.Context, obj O, options metav1.CreateOptions) (O, error)
}

Creator creates an object in the Kubernetes API. It matches the Create signature of client-go clients.

type DeleteOption added in v1.0.7

type DeleteOption func(*DeleteOptions)

DeleteOption is an option for the Delete request.

type DeleteOptions added in v1.0.7

type DeleteOptions struct {
	metav1.DeleteOptions
}

DeleteOptions configures a Delete request.

type Deleter added in v1.0.7

type Deleter interface {
	Delete(ctx context.Context, name string, options metav1.DeleteOptions) error
}

Deleter deletes an object from the Kubernetes API. It matches the Delete signature of client-go clients.

type GetOption added in v1.0.6

type GetOption func(*GetOptions)

GetOption is an option for the Get request.

type GetOptions added in v1.0.6

type GetOptions struct {
	metav1.GetOptions
}

GetOptions configures a Get request.

type Getter added in v1.0.6

type Getter[O runtime.Object] interface {
	Get(ctx context.Context, name string, options metav1.GetOptions) (O, error)
}

Getter retrieves an object of type O from the Kubernetes API. It matches the Get signature of client-go clients.

type GetterDynamic added in v1.0.6

type GetterDynamic[O runtime.Object] interface {
	Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (O, error)
}

GetterDynamic retrieves an object of type O from the Kubernetes API. It matches the Get signature of client-go dynamic client.

type GetterFromDynamic added in v1.0.6

type GetterFromDynamic[O runtime.Object] struct {
	GetterDynamic[O]
}

GetterFromDynamic converts a dynamic client to a Getter.

func GetterForDynamic added in v1.0.6

func GetterForDynamic[O runtime.Object](dyn GetterDynamic[O]) *GetterFromDynamic[O]

GetterForDynamic makes a Getter from a dynamic client.

func (*GetterFromDynamic[O]) Get added in v1.0.6

func (g *GetterFromDynamic[O]) Get(ctx context.Context, name string, options metav1.GetOptions) (O, error)

type KubeletCertificateValidator added in v1.0.7

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

func NewKubeletCertificateValidator added in v1.0.7

func NewKubeletCertificateValidator(clusterProvider ClusterProvider, opts ...func(*KubeletCertificateValidator)) KubeletCertificateValidator

func (KubeletCertificateValidator) Run added in v1.0.7

type ListOption added in v1.0.6

type ListOption func(*ListOptions)

ListOption is an option for the List request.

type ListOptions added in v1.0.6

type ListOptions struct {
	metav1.ListOptions
}

ListOptions configures a List request.

type Lister added in v1.0.6

type Lister[O runtime.Object] interface {
	List(context.Context, metav1.ListOptions) (O, error)
}

List retrieves a list of objects from the Kubernetes API. It matches the List signature of client-go clients.

type Read added in v1.0.6

type Read[O runtime.Object] func(context.Context) (O, error)

Jump to

Keyboard shortcuts

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