Documentation
¶
Index ¶
- Constants
- Variables
- func CreateCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, maxRepl int32)
- func GetResourceConsumerImage() string
- type KubeletManagedHostConfig
- type PrivilegedPodTestConfig
- type ResourceConsumer
- func (rc *ResourceConsumer) CleanUp()
- func (rc *ResourceConsumer) ConsumeCPU(millicores int)
- func (rc *ResourceConsumer) ConsumeCustomMetric(amount int)
- func (rc *ResourceConsumer) ConsumeMem(megabytes int)
- func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)
- func (rc *ResourceConsumer) GetReplicas() int
- func (rc *ResourceConsumer) Pause()
- func (rc *ResourceConsumer) Resume()
- func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)
- type Suite
- type VolumeTestConfig
Constants ¶
const ( KindRC = "replicationController" KindDeployment = "deployment" KindReplicaSet = "replicaset" )
Variables ¶
var CommonImageWhiteList = sets.NewString(
"gcr.io/google_containers/busybox:1.24",
"gcr.io/google_containers/eptest:0.1",
"gcr.io/google_containers/liveness:e2e",
"gcr.io/google_containers/mounttest:0.8",
"gcr.io/google_containers/mounttest-user:0.5",
"gcr.io/google_containers/netexec:1.4",
"gcr.io/google_containers/netexec:1.5",
"gcr.io/google_containers/nginx-slim:0.7",
"gcr.io/google_containers/serve_hostname:v1.4",
"gcr.io/google_containers/test-webserver:e2e",
"gcr.io/google_containers/hostexec:1.2",
"gcr.io/google_containers/volume-nfs:0.8",
"gcr.io/google_containers/volume-gluster:0.2",
)
CommonImageWhiteList is the list of images used in common test. These images should be prepulled before a tests starts, so that the tests won't fail due image pulling flakes. Currently, this is only used by node e2e test. TODO(random-liu): Change the image puller pod to use similar mechanism.
Functions ¶
func CreateCPUHorizontalPodAutoscaler ¶ added in v1.6.1
func CreateCPUHorizontalPodAutoscaler(rc *ResourceConsumer, cpu, minReplicas, maxRepl int32)
func GetResourceConsumerImage ¶ added in v1.6.1
func GetResourceConsumerImage() string
Types ¶
type KubeletManagedHostConfig ¶
type KubeletManagedHostConfig struct {
// contains filtered or unexported fields
}
type PrivilegedPodTestConfig ¶
type PrivilegedPodTestConfig struct {
// contains filtered or unexported fields
}
type ResourceConsumer ¶ added in v1.6.1
type ResourceConsumer struct {
// contains filtered or unexported fields
}
ResourceConsumer is a tool for testing. It helps create specified usage of CPU or memory (Warning: memory not supported) typical use case: rc.ConsumeCPU(600) // ... check your assumption here rc.ConsumeCPU(300) // ... check your assumption here
func NewDynamicResourceConsumer ¶ added in v1.6.1
func NewStaticResourceConsumer ¶ added in v1.6.1
func NewStaticResourceConsumer(name string, replicas, initCPUTotal, initMemoryTotal, initCustomMetric int, cpuLimit, memLimit int64, f *framework.Framework) *ResourceConsumer
TODO this still defaults to replication controller
func (*ResourceConsumer) CleanUp ¶ added in v1.6.1
func (rc *ResourceConsumer) CleanUp()
func (*ResourceConsumer) ConsumeCPU ¶ added in v1.6.1
func (rc *ResourceConsumer) ConsumeCPU(millicores int)
ConsumeCPU consumes given number of CPU
func (*ResourceConsumer) ConsumeCustomMetric ¶ added in v1.6.1
func (rc *ResourceConsumer) ConsumeCustomMetric(amount int)
ConsumeMem consumes given number of custom metric
func (*ResourceConsumer) ConsumeMem ¶ added in v1.6.1
func (rc *ResourceConsumer) ConsumeMem(megabytes int)
ConsumeMem consumes given number of Mem
func (*ResourceConsumer) EnsureDesiredReplicas ¶ added in v1.6.1
func (rc *ResourceConsumer) EnsureDesiredReplicas(desiredReplicas int, timeout time.Duration)
func (*ResourceConsumer) GetReplicas ¶ added in v1.6.1
func (rc *ResourceConsumer) GetReplicas() int
func (*ResourceConsumer) Pause ¶ added in v1.6.1
func (rc *ResourceConsumer) Pause()
Pause stops background goroutines responsible for consuming resources.
func (*ResourceConsumer) Resume ¶ added in v1.6.1
func (rc *ResourceConsumer) Resume()
Pause starts background goroutines responsible for consuming resources.
func (*ResourceConsumer) WaitForReplicas ¶ added in v1.6.1
func (rc *ResourceConsumer) WaitForReplicas(desiredReplicas int)
type VolumeTestConfig ¶ added in v1.5.0
type VolumeTestConfig struct {
// contains filtered or unexported fields
}
Configuration of one tests. The test consist of: - server pod - runs serverImage, exports ports[] - client pod - does not need any special configuration