Documentation
¶
Index ¶
- func CheckUnauthenticatedAccess(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
- func GetAndWait[O runtime.Object](ctx context.Context, timeout time.Duration, get Getter[O], name string, ...) (O, error)
- func GetRetry[O runtime.Object](ctx context.Context, getter Getter[O], name string, opts ...GetOption) (O, error)
- func IdempotentCreate[O runtime.Object](ctx context.Context, creator Creator[O], obj O, opts ...CreateOption) error
- func IdempotentDelete(ctx context.Context, deleter Deleter, name string, opts ...DeleteOption) error
- func ListAndWait[O runtime.Object](ctx context.Context, timeout time.Duration, list Lister[O], ready func(O) bool, ...) (O, error)
- func ListRetry[O runtime.Object](ctx context.Context, lister Lister[O], opts ...ListOption) (O, error)
- func MakeUnauthenticatedRequest(ctx context.Context, endpoint string, caCertificate []byte) error
- func ValidateAPIServerEndpointResolution(ctx context.Context, informer validation.Informer, nodeConfig *api.NodeConfig) error
- func WaitFor[O runtime.Object](ctx context.Context, timeout time.Duration, read Read[O], ready func(O) bool) (O, error)
- func WithCertPath(certPath string) func(*KubeletCertificateValidator)
- func WithIgnoreDateAndNoCertErrors(ignore bool) func(*KubeletCertificateValidator)
- type APIServerValidator
- func (a APIServerValidator) CheckIdentity(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
- func (a APIServerValidator) CheckVPCEndpointAccess(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
- func (a APIServerValidator) MakeAuthenticatedRequest(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
- type AccessValidator
- type ClusterProvider
- type CreateOption
- type CreateOptions
- type Creator
- type DeleteOption
- type DeleteOptions
- type Deleter
- type GetOption
- type GetOptions
- type Getter
- type GetterDynamic
- type GetterFromDynamic
- type Kubelet
- type KubeletCertificateValidator
- type ListOption
- type ListOptions
- type Lister
- type Read
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ValidateAPIServerEndpointResolution ¶ added in v1.0.10
func ValidateAPIServerEndpointResolution(ctx context.Context, informer validation.Informer, nodeConfig *api.NodeConfig) error
ValidateAPIServerEndpointResolution validates access to the Kubernetes API endpoint This function conforms to the validation framework signature
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)
func WithIgnoreDateAndNoCertErrors ¶ added in v1.0.10
func WithIgnoreDateAndNoCertErrors(ignore bool) func(*KubeletCertificateValidator)
Types ¶
type APIServerValidator ¶ added in v1.0.11
type APIServerValidator struct {
// contains filtered or unexported fields
}
func NewAPIServerValidator ¶ added in v1.0.11
func NewAPIServerValidator(kubelet Kubelet) APIServerValidator
func (APIServerValidator) CheckIdentity ¶ added in v1.0.11
func (a APIServerValidator) CheckIdentity(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
func (APIServerValidator) CheckVPCEndpointAccess ¶ added in v1.0.11
func (a APIServerValidator) CheckVPCEndpointAccess(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
func (APIServerValidator) MakeAuthenticatedRequest ¶ added in v1.0.11
func (a APIServerValidator) MakeAuthenticatedRequest(ctx context.Context, informer validation.Informer, node *api.NodeConfig) error
type AccessValidator ¶
type AccessValidator struct {
// contains filtered or unexported fields
}
func NewAccessValidator ¶
func NewAccessValidator(cluster *api.ClusterDetails) 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 Kubelet ¶ added in v1.0.11
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 KubeletCertificateValidator ¶ added in v1.0.7
type KubeletCertificateValidator struct {
// contains filtered or unexported fields
}
func NewKubeletCertificateValidator ¶ added in v1.0.7
func NewKubeletCertificateValidator(cluster *api.ClusterDetails, opts ...func(*KubeletCertificateValidator)) KubeletCertificateValidator
func (KubeletCertificateValidator) Run ¶ added in v1.0.7
func (v KubeletCertificateValidator) Run(ctx context.Context, informer validation.Informer, _ *api.NodeConfig) error
Run validates the kubelet certificate against the cluster CA This function conforms to the validation framework signature
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.