Skip to content

Commit

Permalink
[orchestration] fix resourcerequirements field (#11272)
Browse files Browse the repository at this point in the history
* [orchestration] fix rr place with new release
  • Loading branch information
Nam Nguyen authored Mar 14, 2022
1 parent 29460fc commit ac3dfce
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ require (
code.cloudfoundry.org/bbs v0.0.0-20200403215808-d7bc971db0db
code.cloudfoundry.org/garden v0.0.0-20210208153517-580cadd489d2
code.cloudfoundry.org/lager v2.0.0+incompatible
github.com/DataDog/agent-payload/v5 v5.0.17
github.com/DataDog/agent-payload/v5 v5.0.18
github.com/DataDog/datadog-agent/pkg/obfuscate v0.35.0-rc.4
github.com/DataDog/datadog-agent/pkg/otlp/model v0.35.0-rc.4
github.com/DataDog/datadog-agent/pkg/quantile v0.35.0-rc.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func ExtractCronJob(cj *batchv1beta1.CronJob) *model.CronJob {
})
}

cronJob.ResourceRequirements = ExtractPodTemplateResourceRequirements(cj.Spec.JobTemplate.Spec.Template)
cronJob.Spec.ResourceRequirements = ExtractPodTemplateResourceRequirements(cj.Spec.JobTemplate.Spec.Template)

return &cronJob
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ func TestExtractCronJob(t *testing.T) {
},
},
expected: model.CronJob{
Metadata: &model.Metadata{},
Spec: &model.CronJobSpec{},
Status: &model.CronJobStatus{},
ResourceRequirements: getExpectedModelResourceRequirements(),
Metadata: &model.Metadata{},
Spec: &model.CronJobSpec{
ResourceRequirements: getExpectedModelResourceRequirements(),
},
Status: &model.CronJobStatus{},
},
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func ExtractJob(j *batchv1.Job) *model.Job {
job.Status.CompletionTime = j.Status.CompletionTime.Unix()
}

job.ResourceRequirements = ExtractPodTemplateResourceRequirements(j.Spec.Template)
job.Spec.ResourceRequirements = ExtractPodTemplateResourceRequirements(j.Spec.Template)

return &job
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,11 @@ func TestExtractJob(t *testing.T) {
},
},
expected: model.Job{
Metadata: &model.Metadata{},
Spec: &model.JobSpec{},
Status: &model.JobStatus{},
ResourceRequirements: getExpectedModelResourceRequirements(),
Metadata: &model.Metadata{},
Spec: &model.JobSpec{
ResourceRequirements: getExpectedModelResourceRequirements(),
},
Status: &model.JobStatus{},
},
},
}
Expand Down

0 comments on commit ac3dfce

Please sign in to comment.