Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Modify load test to not create too may services/endpoints" #41550

Merged
merged 1 commit into from
Feb 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions test/e2e/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,7 @@ var _ = framework.KubeDescribe("Load capacity", func() {
configs, secretConfigs = generateConfigs(totalPods, itArg.image, itArg.command, namespaces, itArg.kind, itArg.secretsPerPod)
if itArg.services {
framework.Logf("Creating services")
// If <totalPods> is large, we generate services only for every second
// config. Since those are sorted by the size, we will have both small,
// medium and large services, but only for half of pods.
onlyHalfServices := totalPods > 60000
services := generateServicesForConfigs(configs, onlyHalfServices)
services := generateServicesForConfigs(configs)
for _, service := range services {
_, err := clientset.Core().Services(service.Namespace).Create(service)
framework.ExpectNoError(err)
Expand Down Expand Up @@ -422,12 +418,9 @@ func generateConfigsForGroup(
return configs, secretConfigs
}

func generateServicesForConfigs(configs []testutils.RunObjectConfig, onlyHalfServices bool) []*v1.Service {
func generateServicesForConfigs(configs []testutils.RunObjectConfig) []*v1.Service {
services := make([]*v1.Service, 0, len(configs))
for i, config := range configs {
if onlyHalfServices && i%2 == 1 {
continue
}
for _, config := range configs {
serviceName := config.GetName() + "-svc"
labels := map[string]string{"name": config.GetName()}
service := &v1.Service{
Expand Down