Documentation ¶
Overview ¶
Package in_cluster implements stress tester in remote worker nodes which runs workloads against its Kubernetes control plane, thus "in cluster". See "Dockerfile.k8s-tester-stress" for an example docker image. Replace https://github.com/aws/aws-k8s-tester/tree/v1.5.9/eks/stresser/remote.
Index ¶
Constants ¶
View Source
const ( DefaultMinimumNodes int = 1 DefaultCompletes int32 = 10 DefaultParallels int32 = 10 DefaultSchedule string = "*/10 * * * *" // every 10-min DefaultSuccessfulJobsHistoryLimit int32 = 10 DefaultFailedJobsHistoryLimit int32 = 10 DefaultRunTimeout = time.Minute DefaultObjects int = -1 DefaultObjectSize int = 10 * 1024 // 10 KB DefaultUpdateConcurrency int = 10 DefaultListBatchLimit int64 = 1000 )
Variables ¶
This section is empty.
Functions ¶
func DefaultObjectKeyPrefix ¶
func DefaultObjectKeyPrefix() string
func EnvK8sTesterStressCLI ¶
func EnvK8sTesterStressCLI() string
func EnvK8sTesterStressCLIBusyboxRepository ¶
func EnvK8sTesterStressCLIBusyboxRepository() string
func EnvK8sTesterStressRepository ¶
func EnvK8sTesterStressRepository() string
func New ¶
func New(cfg *Config) k8s_tester.Tester
Types ¶
type Config ¶
type Config struct { Enable bool `json:"enable"` Prompt bool `json:"-"` Stopc chan struct{} `json:"-"` Logger *zap.Logger `json:"-"` LogWriter io.Writer `json:"-"` Client client.Client `json:"-"` // MinimumNodes is the minimum number of Kubernetes nodes required for installing this addon. MinimumNodes int `json:"minimum_nodes"` // Namespace to create test resources. Namespace string `json:"namespace"` // K8sTesterStressRepository defines a custom ECR image repository. // For "k8s-tester-stress". K8sTesterStressRepository *aws_v1_ecr.Repository `json:"k8s_tester_stress_repository,omitempty"` // Completes is the desired number of successfully finished pods. Completes int32 `json:"completes"` // Parallels is the the maximum desired number of pods the // job should run at any given time. Parallels int32 `json:"parallels"` // Schedule is the CronJob schedule. Schedule string `json:"schedule"` // SuccessfulJobsHistoryLimit is the number of successful finished CronJobs to retain. SuccessfulJobsHistoryLimit int32 `json:"successful_jobs_history_limit"` // FailedJobsHistoryLimit is the number of failed finished CronJobs to retain. FailedJobsHistoryLimit int32 `json:"failed_jobs_history_limit"` // K8sTesterStressCLI defines flags for "k8s-tester-stress". K8sTesterStressCLI *K8sTesterStressCLI `json:"k8s_tester_stress_cli"` }
func NewDefault ¶
func NewDefault() *Config
func (*Config) ValidateAndSetDefaults ¶
type K8sTesterStressCLI ¶
type K8sTesterStressCLI struct { // BusyboxRepository defines a custom ECR image repository. // For "busybox". BusyboxRepository *aws_v1_ecr.Repository `json:"busybox_repository,omitempty"` // RunTimeout is the duration of stress runs. // After timeout, it stops all stress requests. RunTimeout time.Duration `json:"run_timeout"` RunTimeoutString string `json:"run_timeout_string" read-only:"true"` // ObjectKeyPrefix is the key prefix for "Pod" objects. ObjectKeyPrefix string `json:"object_key_prefix"` // Objects is the desired number of objects to create and update. // This doesn't apply to reads. // If negative, it creates until timeout. Objects int `json:"objects"` // ObjectSize is the size in bytes per object. ObjectSize int `json:"object_size"` // UpdateConcurrency is the number of concurrent routines to issue update requests. // Do not set too high, instead distribute this tester as distributed workers to maximize concurrency. UpdateConcurrency int `json:"update_concurrency"` // ListBatchLimit is the number of objects to return for each list response. // If negative, the tester disables list calls (only runs mutable requests). ListBatchLimit int64 `json:"list_batch_limit"` }
K8sTesterStressCLI defines flags for "k8s-tester-stress".
func NewDefaultK8sTesterStressCLI ¶
func NewDefaultK8sTesterStressCLI() *K8sTesterStressCLI
Click to show internal directories.
Click to hide internal directories.