Documentation
¶
Index ¶
- Constants
- Variables
- func GetTimeStreamAPI(session *session.Session) timestreamwriteiface.TimestreamWriteAPI
- type Environment
- func (env *Environment) AfterEach()
- func (env *Environment) BeforeEach()
- func (env *Environment) Cleanup()
- func (env *Environment) DefaultEC2NodeClass() *v1beta1.EC2NodeClass
- func (env *Environment) EventuallyExpectInstanceProfileExists(profileName string) iam.InstanceProfile
- func (env *Environment) EventuallyExpectRunInstances(instanceInput *ec2.RunInstancesInput) *ec2.Reservation
- func (env *Environment) ExpectAccountID() string
- func (env *Environment) ExpectExperimentTemplateDeleted(id string)
- func (env *Environment) ExpectIPv6ClusterDNS() string
- func (env *Environment) ExpectInstance(nodeName string) Assertion
- func (env *Environment) ExpectInstanceProfileCreated(instanceProfileName, roleName string)
- func (env *Environment) ExpectInstanceProfileDeleted(instanceProfileName, roleName string)
- func (env *Environment) ExpectInstanceStopped(nodeName string)
- func (env *Environment) ExpectInstanceTerminated(nodeName string)
- func (env *Environment) ExpectMessagesCreated(msgs ...interface{})
- func (env *Environment) ExpectMetric(name string, value float64, labels map[string]string)
- func (env *Environment) ExpectParsedProviderID(providerID string) string
- func (env *Environment) ExpectSpotInterruptionExperiment(instanceIDs ...string) *fis.Experiment
- func (env *Environment) ExpectSpotInterruptionRole() *iam.Role
- func (env *Environment) ExpectWindowsIPAMDisabled()
- func (env *Environment) ExpectWindowsIPAMEnabled()
- func (env *Environment) GetCustomAMI(amiPath string, versionOffset int) string
- func (env *Environment) GetInstance(nodeName string) ec2.Instance
- func (env *Environment) GetInstanceByID(instanceID string) ec2.Instance
- func (env *Environment) GetInstanceProfileName(nodeClass *v1beta1.EC2NodeClass) string
- func (env *Environment) GetK8sMinorVersion(offset int) (int, error)
- func (env *Environment) GetK8sVersion(offset int) string
- func (env *Environment) GetNetworkInterface(id *string) *ec2.NetworkInterface
- func (env *Environment) GetNetworkInterfaces(ids ...*string) []*ec2.NetworkInterface
- func (env *Environment) GetSecurityGroups(tags map[string]string) []SecurityGroup
- func (env *Environment) GetSpotInstanceRequest(id *string) *ec2.SpotInstanceRequest
- func (env *Environment) GetSubnetNameAndIds(tags map[string]string) []SubnetInfo
- func (env *Environment) GetSubnets(tags map[string]string) map[string][]string
- func (env *Environment) GetVolume(id *string) *ec2.Volume
- func (env *Environment) GetVolumes(ids ...*string) []*ec2.Volume
- func (env *Environment) GetZones() map[string]string
- func (env *Environment) MeasureDeprovisioningDurationFor(f func(), dimensions map[string]string)
- func (env *Environment) MeasureDurationFor(f func(), eventType EventType, dimensions map[string]string)
- func (env *Environment) MeasureProvisioningDurationFor(f func(), dimensions map[string]string)
- type EventType
- type NoOpTimeStreamAPI
- type SecurityGroup
- type SubnetInfo
Constants ¶
const ( TestCategoryDimension = "category" TestNameDimension = "name" GitRefDimension = "gitRef" ProvisionedNodeCountDimension = "provisionedNodeCount" DeprovisionedNodeCountDimension = "deprovisionedNodeCount" PodDensityDimension = "podDensity" )
const WindowsDefaultImage = "mcr.microsoft.com/oss/kubernetes/pause:3.9"
Variables ¶
var ( CleanableObjects = []client.Object{ &v1beta1.EC2NodeClass{}, } )
var ExcludedInstanceFamilies = []string{"m7a", "r7a", "c7a", "r7i"}
ExcludedInstanceFamilies denotes instance families that have issues during resource registration due to compatibility issues with versions of the VPR Resource Controller
Functions ¶
func GetTimeStreamAPI ¶
func GetTimeStreamAPI(session *session.Session) timestreamwriteiface.TimestreamWriteAPI
Types ¶
type Environment ¶
type Environment struct {
*common.Environment
Region string
STSAPI *sts.STS
EC2API *ec2.EC2
SSMAPI *ssm.SSM
IAMAPI *iam.IAM
FISAPI *fis.FIS
EKSAPI *eks.EKS
TimeStreamAPI timestreamwriteiface.TimestreamWriteAPI
SQSProvider *sqs.Provider
ClusterName string
ClusterEndpoint string
InterruptionQueue string
}
func NewEnvironment ¶
func NewEnvironment(t *testing.T) *Environment
func (*Environment) AfterEach ¶
func (env *Environment) AfterEach()
func (*Environment) BeforeEach ¶
func (env *Environment) BeforeEach()
func (*Environment) Cleanup ¶
func (env *Environment) Cleanup()
func (*Environment) DefaultEC2NodeClass ¶
func (env *Environment) DefaultEC2NodeClass() *v1beta1.EC2NodeClass
func (*Environment) EventuallyExpectInstanceProfileExists ¶
func (env *Environment) EventuallyExpectInstanceProfileExists(profileName string) iam.InstanceProfile
func (*Environment) EventuallyExpectRunInstances ¶
func (env *Environment) EventuallyExpectRunInstances(instanceInput *ec2.RunInstancesInput) *ec2.Reservation
func (*Environment) ExpectAccountID ¶
func (env *Environment) ExpectAccountID() string
func (*Environment) ExpectExperimentTemplateDeleted ¶
func (env *Environment) ExpectExperimentTemplateDeleted(id string)
func (*Environment) ExpectIPv6ClusterDNS ¶
func (env *Environment) ExpectIPv6ClusterDNS() string
func (*Environment) ExpectInstance ¶
func (env *Environment) ExpectInstance(nodeName string) Assertion
func (*Environment) ExpectInstanceProfileCreated ¶
func (env *Environment) ExpectInstanceProfileCreated(instanceProfileName, roleName string)
func (*Environment) ExpectInstanceProfileDeleted ¶
func (env *Environment) ExpectInstanceProfileDeleted(instanceProfileName, roleName string)
func (*Environment) ExpectInstanceStopped ¶
func (env *Environment) ExpectInstanceStopped(nodeName string)
func (*Environment) ExpectInstanceTerminated ¶
func (env *Environment) ExpectInstanceTerminated(nodeName string)
func (*Environment) ExpectMessagesCreated ¶
func (env *Environment) ExpectMessagesCreated(msgs ...interface{})
func (*Environment) ExpectMetric ¶
func (env *Environment) ExpectMetric(name string, value float64, labels map[string]string)
func (*Environment) ExpectParsedProviderID ¶
func (env *Environment) ExpectParsedProviderID(providerID string) string
func (*Environment) ExpectSpotInterruptionExperiment ¶
func (env *Environment) ExpectSpotInterruptionExperiment(instanceIDs ...string) *fis.Experiment
func (*Environment) ExpectSpotInterruptionRole ¶
func (env *Environment) ExpectSpotInterruptionRole() *iam.Role
func (*Environment) ExpectWindowsIPAMDisabled ¶
func (env *Environment) ExpectWindowsIPAMDisabled()
func (*Environment) ExpectWindowsIPAMEnabled ¶
func (env *Environment) ExpectWindowsIPAMEnabled()
func (*Environment) GetCustomAMI ¶
func (env *Environment) GetCustomAMI(amiPath string, versionOffset int) string
func (*Environment) GetInstance ¶
func (env *Environment) GetInstance(nodeName string) ec2.Instance
func (*Environment) GetInstanceByID ¶
func (env *Environment) GetInstanceByID(instanceID string) ec2.Instance
func (*Environment) GetInstanceProfileName ¶
func (env *Environment) GetInstanceProfileName(nodeClass *v1beta1.EC2NodeClass) string
GetInstanceProfileName gets the string for the profile name based on the cluster name, region and the NodeClass name. The length of this string can never exceed the maximum instance profile name limit of 128 characters.
func (*Environment) GetK8sMinorVersion ¶
func (env *Environment) GetK8sMinorVersion(offset int) (int, error)
func (*Environment) GetK8sVersion ¶
func (env *Environment) GetK8sVersion(offset int) string
func (*Environment) GetNetworkInterface ¶
func (env *Environment) GetNetworkInterface(id *string) *ec2.NetworkInterface
func (*Environment) GetNetworkInterfaces ¶
func (env *Environment) GetNetworkInterfaces(ids ...*string) []*ec2.NetworkInterface
func (*Environment) GetSecurityGroups ¶
func (env *Environment) GetSecurityGroups(tags map[string]string) []SecurityGroup
GetSecurityGroups returns all getSecurityGroups matching the label selector
func (*Environment) GetSpotInstanceRequest ¶
func (env *Environment) GetSpotInstanceRequest(id *string) *ec2.SpotInstanceRequest
func (*Environment) GetSubnetNameAndIds ¶
func (env *Environment) GetSubnetNameAndIds(tags map[string]string) []SubnetInfo
GetSubnetNameAndIds returns all subnets matching the label selector
func (*Environment) GetSubnets ¶
func (env *Environment) GetSubnets(tags map[string]string) map[string][]string
GetSubnets returns all subnets matching the label selector mapped from AZ -> {subnet-ids...}
func (*Environment) GetVolumes ¶
func (env *Environment) GetVolumes(ids ...*string) []*ec2.Volume
func (*Environment) GetZones ¶
func (env *Environment) GetZones() map[string]string
GetZones returns all available zones mapped from zone -> zone type
func (*Environment) MeasureDeprovisioningDurationFor ¶
func (env *Environment) MeasureDeprovisioningDurationFor(f func(), dimensions map[string]string)
func (*Environment) MeasureDurationFor ¶
func (env *Environment) MeasureDurationFor(f func(), eventType EventType, dimensions map[string]string)
MeasureDurationFor observes the duration between the beginning of the function f() and the end of the function f()
func (*Environment) MeasureProvisioningDurationFor ¶
func (env *Environment) MeasureProvisioningDurationFor(f func(), dimensions map[string]string)
type NoOpTimeStreamAPI ¶
type NoOpTimeStreamAPI struct {
timestreamwriteiface.TimestreamWriteAPI
}
func (NoOpTimeStreamAPI) WriteRecordsWithContext ¶
func (o NoOpTimeStreamAPI) WriteRecordsWithContext(_ context.Context, _ *timestreamwrite.WriteRecordsInput, _ ...request.Option) (*timestreamwrite.WriteRecordsOutput, error)
type SecurityGroup ¶
type SecurityGroup struct {
ec2.GroupIdentifier
Tags []*ec2.Tag
}
type SubnetInfo ¶
SubnetInfo is a simple struct for testing