diff --git a/internal/client/domain/types.go b/internal/client/domain/types.go index 69d644065cd..50ca3675bf1 100644 --- a/internal/client/domain/types.go +++ b/internal/client/domain/types.go @@ -20,9 +20,10 @@ type SubmissionDescription struct { } type JobSubmissionDescription struct { - Name string - Count int - Spec *v1.PodSpec + Name string + Count int + Namespace string + Spec *v1.PodSpec } type OpenIdConnectClientDetails struct { diff --git a/internal/client/load-test.go b/internal/client/load-test.go index d5ca98e886c..1cbe9fae8f7 100644 --- a/internal/client/load-test.go +++ b/internal/client/load-test.go @@ -8,7 +8,6 @@ import ( log "github.com/sirupsen/logrus" "google.golang.org/grpc" - v1 "k8s.io/api/core/v1" "github.com/G-Research/armada/internal/armada/api" "github.com/G-Research/armada/internal/client/domain" @@ -107,7 +106,7 @@ func (apiLoadTester ArmadaLoadTester) runSubmission(submission *domain.Submissio log.Infof("Queue %s created.\n", queue) for _, job := range jobs { - jobRequestItems := createJobSubmitRequestItems(job.Spec, job.Count) + jobRequestItems := createJobSubmitRequestItems(job) requests := CreateChunkedSubmitRequests(queue, jobSetId, jobRequestItems) for _, request := range requests { @@ -169,13 +168,14 @@ func (apiLoadTester ArmadaLoadTester) monitorJobsUntilCompletion(jobSetId string }) } -func createJobSubmitRequestItems(spec *v1.PodSpec, count int) []*api.JobSubmitRequestItem { - requestItems := make([]*api.JobSubmitRequestItem, 0, count) +func createJobSubmitRequestItems(jobDesc *domain.JobSubmissionDescription) []*api.JobSubmitRequestItem { + requestItems := make([]*api.JobSubmitRequestItem, 0, jobDesc.Count) job := api.JobSubmitRequestItem{ - Priority: 1, - PodSpec: spec, + Priority: 1, + Namespace: jobDesc.Namespace, + PodSpec: jobDesc.Spec, } - for i := 0; i < count; i++ { + for i := 0; i < jobDesc.Count; i++ { requestItems = append(requestItems, &job) }