Documentation
¶
Index ¶
- func NewAWSConfig(ctx context.Context, optFns ...func(*config.LoadOptions) error) (aws.Config, error)
- func NewEKSClient(aws aws.Config, endpoint string) *eks.Client
- func NewLogger(opts ...LoggerOption) logr.Logger
- func SanitizeForAWSName(input string) string
- func Truncate(name string, limit int) string
- type Cluster
- type ComputeType
- type CredsOS
- type EksResolverV2
- type File
- type HybridEC2Node
- type InstanceSize
- type LoggerConfig
- type LoggerOption
- type LogsUploadUrl
- type NodeSpec
- type NodeadmCredentialsProvider
- type NodeadmOS
- type NodeadmURLs
- type PausableLogger
- type SwitchWriter
- type TestConfig
- type UserDataInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAWSConfig ¶ added in v1.0.4
func NewLogger ¶
func NewLogger(opts ...LoggerOption) logr.Logger
func SanitizeForAWSName ¶ added in v1.0.1
SanitizeForAWSName removes everything except alphanumeric characters and hyphens from a string.
Types ¶
type ComputeType ¶ added in v1.0.8
type ComputeType int
const ( CPUInstance ComputeType = iota GPUInstance )
type EksResolverV2 ¶ added in v1.0.2
type EksResolverV2 struct {
Endpoint string
}
EksResolverV2 is used to resolve custom endpoints for EKS clients.
func (*EksResolverV2) ResolveEndpoint ¶ added in v1.0.2
func (r *EksResolverV2) ResolveEndpoint(ctx context.Context, params eks.EndpointParameters) ( smithyendpoints.Endpoint, error, )
ResolveEndpoint resolves to a custom endpoint if not empty or default otherwise.
type HybridEC2Node ¶ added in v1.0.1
HybridEC2Node represents a Hybrid Node backed by an EC2 instance.
type InstanceSize ¶ added in v1.0.5
type InstanceSize int
const ( Large InstanceSize = iota XLarge )
type LoggerConfig ¶ added in v1.0.2
type LoggerConfig struct {
NoColor bool
// contains filtered or unexported fields
}
func (LoggerConfig) Apply ¶ added in v1.0.2
func (c LoggerConfig) Apply(opts *LoggerConfig)
type LoggerOption ¶ added in v1.0.2
type LoggerOption interface {
Apply(*LoggerConfig)
}
func WithOutputFile ¶ added in v1.0.4
func WithOutputFile(filename string) LoggerOption
WithOutputFile returns a LoggerOption that configures the logger to write to both the specified file and stdout.
func WithWriter ¶ added in v1.0.5
func WithWriter(w io.Writer) LoggerOption
WithWriter returns a LoggerOption that sets the output writer to the given io.Writer.
type LogsUploadUrl ¶ added in v1.0.1
type NodeSpec ¶ added in v1.0.1
type NodeSpec struct {
Cluster *Cluster
Name string
OS CredsOS
Provider NodeadmCredentialsProvider
}
NodeSpec is a specification for a node.
type NodeadmCredentialsProvider ¶ added in v1.0.1
type NodeadmOS ¶ added in v1.0.1
type NodeadmOS interface {
Name() string
AMIName(ctx context.Context, awsConfig aws.Config, kubernetesVersion string, computeType ComputeType) (string, error)
BuildUserData(ctx context.Context, userDataInput UserDataInput) ([]byte, error)
InstanceType(region string, instanceSize InstanceSize, computeType ComputeType) string
}
NodeadmOS defines an interface for operating system-specific behavior.
type NodeadmURLs ¶ added in v1.0.1
type PausableLogger ¶ added in v1.0.3
PausableLogger can be paused and resumed. It wraps a logr.Logger. When paused, writes go to a buffer; when resumed, writes go to stdout. After it's resumed, the buffer is flushed to stdout.
func NewPausableLogger ¶ added in v1.0.3
func NewPausableLogger(opts ...LoggerOption) PausableLogger
NewPausableLogger returns a logger that can be paused and resumed.
func (PausableLogger) Pause ¶ added in v1.0.3
func (l PausableLogger) Pause()
func (PausableLogger) Resume ¶ added in v1.0.3
func (l PausableLogger) Resume() error
type SwitchWriter ¶ added in v1.0.3
type SwitchWriter struct {
// contains filtered or unexported fields
}
SwitchWriter implements io.Writer. When paused, writes go to a buffer; when resumed, writes go to the active writer.
func NewSwitchWriter ¶ added in v1.0.3
func NewSwitchWriter(active io.Writer) *SwitchWriter
func (*SwitchWriter) Pause ¶ added in v1.0.3
func (s *SwitchWriter) Pause()
Pause causes subsequent writes to be buffered.
func (*SwitchWriter) Resume ¶ added in v1.0.3
func (s *SwitchWriter) Resume() error
Resume flushes the buffer to the active writer and resumes normal output.
type TestConfig ¶ added in v1.0.4
type TestConfig struct {
ClusterName string `yaml:"clusterName"`
ClusterRegion string `yaml:"clusterRegion"`
NodeadmUrlAMD string `yaml:"nodeadmUrlAMD"`
NodeadmUrlARM string `yaml:"nodeadmUrlARM"`
SetRootPassword bool `yaml:"setRootPassword"`
NodeK8sVersion string `yaml:"nodeK8SVersion"`
LogsBucket string `yaml:"logsBucket"`
Endpoint string `yaml:"endpoint"`
// ArtifactsFolder is the local path where the test will store the artifacts.
ArtifactsFolder string `yaml:"artifactsFolder"`
DNSSuffix string `yaml:"dnsSuffix"`
EcrAccount string `yaml:"ecrAccount"`
ManifestURL string `yaml:"manifestUrl"`
}
func ReadConfig ¶ added in v1.0.4
func ReadConfig(configPath string) (*TestConfig, error)
ReadConfig reads the configuration from the specified file path and unmarshals it into the TestConfig struct.
type UserDataInput ¶ added in v1.0.1
type UserDataInput struct {
CredsProviderName string
EKSEndpoint string
KubernetesVersion string
NodeadmUrls NodeadmURLs
NodeadmConfig *api.NodeConfig
NodeadmConfigYaml string
Provider string
PublicKey string
Region string
RootPasswordHash string
Files []File
KubernetesAPIServer string
HostName string
ClusterName string
ClusterCert []byte
// ManifestURL is an optional URL to a custom manifest file for testing
ManifestURL string
}