hybrid

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: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildKubeClient added in v1.0.5

func BuildKubeClient() (kubernetes.Interface, error)

BuildKubeClient builds a kubernetes client from the kubelet kubeconfig but with the iam-ra credentials file set if the node is running the iam-ra service, this will avoid starting a new session to make the kuberenetes api calls if the node is not running the iam-ra service, aws config will fallback to the default aws_config file, which either be a creds file created by ssm or if using iam-ra, will exec the aws_signing_helper

func IsDateValidationError added in v1.0.7

func IsDateValidationError(err error) bool

func IsNoCertError added in v1.0.7

func IsNoCertError(err error) bool

func LoadAWSConfigForRolesAnywhere

func LoadAWSConfigForRolesAnywhere(ctx context.Context, nodeConfig *api.NodeConfig) (aws.Config, error)

func NewHybridNodeProvider

func NewHybridNodeProvider(nodeConfig *api.NodeConfig, skipPhases []string, logger *zap.Logger, opts ...NodeProviderOpt) (nodeprovider.NodeProvider, error)

func PopulateNodeConfigDefaults

func PopulateNodeConfigDefaults(nodeConfig *api.NodeConfig)

func ValidateKubeletCert added in v1.0.4

func ValidateKubeletCert(certPath string, ca []byte) error

ValidateKubeletCert checks if there is an existing kubelet certificate and validates it against the cluster's CA

Types

type HybridNodeProvider

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

func (*HybridNodeProvider) Cleanup

func (hnp *HybridNodeProvider) Cleanup() error

func (*HybridNodeProvider) ConfigureAws

func (hnp *HybridNodeProvider) ConfigureAws(ctx context.Context) error

func (*HybridNodeProvider) Enrich

func (hnp *HybridNodeProvider) Enrich(ctx context.Context) error

func (*HybridNodeProvider) GetAspects

func (hnp *HybridNodeProvider) GetAspects() []system.SystemAspect

func (*HybridNodeProvider) GetConfig

func (hnp *HybridNodeProvider) GetConfig() *aws.Config

func (*HybridNodeProvider) GetDaemons

func (hnp *HybridNodeProvider) GetDaemons() ([]daemon.Daemon, error)

func (*HybridNodeProvider) GetNodeConfig

func (hnp *HybridNodeProvider) GetNodeConfig() *api.NodeConfig

func (*HybridNodeProvider) Logger

func (hnp *HybridNodeProvider) Logger() *zap.Logger

func (*HybridNodeProvider) PopulateNodeConfigDefaults

func (hnp *HybridNodeProvider) PopulateNodeConfigDefaults()

func (*HybridNodeProvider) PreProcessDaemon

func (hnp *HybridNodeProvider) PreProcessDaemon(ctx context.Context) error

func (*HybridNodeProvider) Validate added in v1.0.4

func (hnp *HybridNodeProvider) Validate() error

func (*HybridNodeProvider) ValidateConfig

func (hnp *HybridNodeProvider) ValidateConfig() error

func (*HybridNodeProvider) ValidateNodeIP added in v1.0.4

func (hnp *HybridNodeProvider) ValidateNodeIP() error

type Network added in v1.0.4

type Network interface {
	LookupIP(host string) ([]net.IP, error)
	ResolveBindAddress(bindAddress net.IP) (net.IP, error)
	InterfaceAddrs() ([]net.Addr, error)
}

Network interfaces with the host's network stack.

type NodeProviderOpt

type NodeProviderOpt func(*HybridNodeProvider)

func WithAWSConfig

func WithAWSConfig(config *aws.Config) NodeProviderOpt

func WithCertPath added in v1.0.7

func WithCertPath(path string) NodeProviderOpt

WithCertPath sets the path to the kubelet certificate

func WithCluster added in v1.0.4

func WithCluster(cluster *types.Cluster) NodeProviderOpt

WithCluster adds an EKS cluster to the HybridNodeProvider for testing purposes.

func WithNetwork added in v1.0.4

func WithNetwork(network Network) NodeProviderOpt

WithNetwork adds network util functions to the HybridNodeProvider for testing purposes.

type RolesAnywhereAWSConfigurator

type RolesAnywhereAWSConfigurator struct {
	Manager daemon.DaemonManager
	Logger  *zap.Logger
}

func (RolesAnywhereAWSConfigurator) Configure

func (c RolesAnywhereAWSConfigurator) Configure(ctx context.Context, nodeConfig *api.NodeConfig) error

type SSMAWSConfigurator

type SSMAWSConfigurator struct {
	Manager daemon.DaemonManager
	Logger  *zap.Logger
}

func (SSMAWSConfigurator) Configure

func (c SSMAWSConfigurator) Configure(ctx context.Context, nodeConfig *api.NodeConfig) error

type ValidationError added in v1.0.7

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

ValidationError represents a kubelet certificate validation error with remediation information

func (*ValidationError) Error added in v1.0.7

func (e *ValidationError) Error() string

func (*ValidationError) Remediation added in v1.0.7

func (e *ValidationError) Remediation() string

func (*ValidationError) Unwrap added in v1.0.7

func (e *ValidationError) Unwrap() error

Jump to

Keyboard shortcuts

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