Skip to content

Commit

Permalink
eksconfig: use Job for all remote tester
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
  • Loading branch information
gyuho committed Jun 26, 2020
1 parent 5169f24 commit d8bec15
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 36 deletions.
27 changes: 17 additions & 10 deletions eksconfig/add-on-configmaps-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,18 @@ type AddOnConfigmapsRemote struct {
// e.g. "latest" for image URI "[ACCOUNT_ID].dkr.ecr.[REGION].amazonaws.com/aws/aws-k8s-tester:latest"
RepositoryImageTag string `json:"repository-image-tag,omitempty"`

// DeploymentReplicas is the number of replicas to create for workers.
// The total number of objects to be created is "DeploymentReplicas" * "Objects".
DeploymentReplicas int32 `json:"deployment-replicas,omitempty"`
// Completes is the desired number of successfully finished pods.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
// The total number of objects to be created is "Completes" * "Objects".
Completes int `json:"completes"`
// Parallels is the the maximum desired number of pods the
// job should run at any given time.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
// The total number of objects to be created is "Completes" * "Objects".
Parallels int `json:"parallels"`

// Objects is the number of "ConfigMap" objects to create.
Objects int `json:"objects"`
// ObjectSize is the "ConfigMap" value size in bytes.
Expand Down Expand Up @@ -117,10 +126,11 @@ func (cfg *Config) IsEnabledAddOnConfigmapsRemote() bool {

func getDefaultAddOnConfigmapsRemote() *AddOnConfigmapsRemote {
return &AddOnConfigmapsRemote{
Enable: false,
DeploymentReplicas: 5,
Objects: 10,
ObjectSize: 10 * 1024, // 10 KB
Enable: false,
Completes: 5,
Parallels: 5,
Objects: 10,
ObjectSize: 10 * 1024, // 10 KB

// writes total 300 MB data to etcd
// Objects: 1000,
Expand Down Expand Up @@ -157,9 +167,6 @@ func (cfg *Config) validateAddOnConfigmapsRemote() error {
return errors.New("AddOnConfigmapsRemote.RepositoryImageTag empty")
}

if cfg.AddOnConfigmapsRemote.DeploymentReplicas == 0 {
cfg.AddOnConfigmapsRemote.DeploymentReplicas = 5
}
if cfg.AddOnConfigmapsRemote.Objects == 0 {
cfg.AddOnConfigmapsRemote.Objects = 10
}
Expand Down
19 changes: 12 additions & 7 deletions eksconfig/add-on-csrs-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ type AddOnCSRsRemote struct {
// e.g. "latest" for image URI "[ACCOUNT_ID].dkr.ecr.[REGION].amazonaws.com/aws/aws-k8s-tester:latest"
RepositoryImageTag string `json:"repository-image-tag,omitempty"`

// DeploymentReplicas is the number of replicas to create for workers.
// The total number of objects to be created is "DeploymentReplicas" * "Objects".
DeploymentReplicas int32 `json:"deployment-replicas,omitempty"`
// Completes is the desired number of successfully finished pods.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
Completes int `json:"completes"`
// Parallels is the the maximum desired number of pods the
// job should run at any given time.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
Parallels int `json:"parallels"`

// Objects is the number of "CertificateSigningRequest" objects to create.
Objects int `json:"objects"`

Expand Down Expand Up @@ -125,7 +132,8 @@ func (cfg *Config) IsEnabledAddOnCSRsRemote() bool {
func getDefaultAddOnCSRsRemote() *AddOnCSRsRemote {
return &AddOnCSRsRemote{
Enable: false,
DeploymentReplicas: 5,
Completes: 5,
Parallels: 5,
Objects: 10, // 1000 objects generates 5 MB data to etcd
InitialRequestConditionType: "",
RequestsSummaryWritesOutputNamePrefix: "csrs-writes-" + randutil.String(10),
Expand Down Expand Up @@ -159,9 +167,6 @@ func (cfg *Config) validateAddOnCSRsRemote() error {
return errors.New("AddOnCSRsRemote.RepositoryImageTag empty")
}

if cfg.AddOnCSRsRemote.DeploymentReplicas == 0 {
cfg.AddOnCSRsRemote.DeploymentReplicas = 5
}
if cfg.AddOnCSRsRemote.Objects == 0 {
cfg.AddOnCSRsRemote.Objects = 10
}
Expand Down
2 changes: 1 addition & 1 deletion eksconfig/add-on-jobs-echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (cfg *Config) validateAddOnJobsEcho() error {
return errors.New("AddOnJobsEcho.Enable true but no node group is enabled")
}
if cfg.AddOnJobsEcho.Namespace == "" {
cfg.AddOnJobsEcho.Namespace = cfg.Name + "-job-echo"
cfg.AddOnJobsEcho.Namespace = cfg.Name + "-jobs-echo"
}
if cfg.AddOnJobsEcho.EchoSize > 250000 {
return fmt.Errorf("echo size limit is 0.25 MB, got %d", cfg.AddOnJobsEcho.EchoSize)
Expand Down
4 changes: 2 additions & 2 deletions eksconfig/add-on-jobs-pi.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (cfg *Config) IsEnabledAddOnJobsPi() bool {
func getDefaultAddOnJobsPi() *AddOnJobsPi {
return &AddOnJobsPi{
Enable: false,
Completes: 30,
Completes: 10,
Parallels: 10,
}
}
Expand All @@ -59,7 +59,7 @@ func (cfg *Config) validateAddOnJobsPi() error {
return errors.New("AddOnJobsPi.Enable true but no node group is enabled")
}
if cfg.AddOnJobsPi.Namespace == "" {
cfg.AddOnJobsPi.Namespace = cfg.Name + "-job-perl"
cfg.AddOnJobsPi.Namespace = cfg.Name + "-jobs-pi"
}
return nil
}
25 changes: 15 additions & 10 deletions eksconfig/add-on-secrets-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,16 @@ type AddOnSecretsRemote struct {
// e.g. "latest" for image URI "[ACCOUNT_ID].dkr.ecr.[REGION].amazonaws.com/aws/aws-k8s-tester:latest"
RepositoryImageTag string `json:"repository-image-tag,omitempty"`

// DeploymentReplicas is the number of replicas to create for workers.
// The total number of objects to be created is "DeploymentReplicas" * "Objects".
DeploymentReplicas int32 `json:"deployment-replicas,omitempty"`
// Completes is the desired number of successfully finished pods.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
Completes int `json:"completes"`
// Parallels is the the maximum desired number of pods the
// job should run at any given time.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
Parallels int `json:"parallels"`

// Objects is the number of "Secret" objects to write/read.
Objects int `json:"objects"`
// ObjectSize is the "Secret" value size in bytes.
Expand Down Expand Up @@ -159,10 +166,11 @@ func (cfg *Config) IsEnabledAddOnSecretsRemote() bool {

func getDefaultAddOnSecretsRemote() *AddOnSecretsRemote {
return &AddOnSecretsRemote{
Enable: false,
DeploymentReplicas: 5,
Objects: 10,
ObjectSize: 10 * 1024, // 10 KB
Enable: false,
Completes: 5,
Parallels: 5,
Objects: 10,
ObjectSize: 10 * 1024, // 10 KB

// writes total 100 MB for "Secret" objects,
// plus "Pod" objects, writes total 330 MB to etcd
Expand Down Expand Up @@ -207,9 +215,6 @@ func (cfg *Config) validateAddOnSecretsRemote() error {
return errors.New("AddOnSecretsRemote.RepositoryImageTag empty")
}

if cfg.AddOnSecretsRemote.DeploymentReplicas == 0 {
cfg.AddOnSecretsRemote.DeploymentReplicas = 5
}
if cfg.AddOnSecretsRemote.Objects == 0 {
cfg.AddOnSecretsRemote.Objects = 10
}
Expand Down
16 changes: 10 additions & 6 deletions eksconfig/add-on-stresser-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,16 @@ type AddOnStresserRemote struct {
// e.g. "latest" for image URI "[ACCOUNT_ID].dkr.ecr.[REGION].amazonaws.com/aws/aws-k8s-tester:latest"
RepositoryImageTag string `json:"repository-image-tag,omitempty"`

// DeploymentReplicas is the number of replicas to create for workers.
// Completes is the desired number of successfully finished pods.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
DeploymentReplicas int32 `json:"deployment-replicas,omitempty"`
Completes int `json:"completes"`
// Parallels is the the maximum desired number of pods the
// job should run at any given time.
// Write QPS will be client QPS * replicas.
// Read QPS will be client QPS * replicas.
Parallels int `json:"parallels"`

// ObjectSize is the value size in bytes for write objects.
// If 0, do not write anything.
ObjectSize int `json:"object-size"`
Expand Down Expand Up @@ -162,7 +168,8 @@ func (cfg *Config) IsEnabledAddOnStresserRemote() bool {
func getDefaultAddOnStresserRemote() *AddOnStresserRemote {
return &AddOnStresserRemote{
Enable: false,
DeploymentReplicas: 5,
Completes: 5,
Parallels: 5,
ObjectSize: 0,
ListLimit: 0,
Duration: time.Minute,
Expand Down Expand Up @@ -194,9 +201,6 @@ func (cfg *Config) validateAddOnStresserRemote() error {
return errors.New("AddOnStresserRemote.RepositoryImageTag empty")
}

if cfg.AddOnStresserRemote.DeploymentReplicas == 0 {
cfg.AddOnStresserRemote.DeploymentReplicas = 5
}
if cfg.AddOnStresserRemote.Duration == time.Duration(0) {
cfg.AddOnStresserRemote.Duration = time.Minute
}
Expand Down

0 comments on commit d8bec15

Please sign in to comment.