Skip to content

Commit

Permalink
fix: node-collector resources (#317)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <[email protected]>
  • Loading branch information
chen-keinan authored Mar 19, 2024
1 parent fa3b568 commit f00b5e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/jobs/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ func (b *JobBuilder) build() (*batchv1.Job, error) {
job.Spec.Template.Spec.ImagePullSecrets = b.imagePullSecrets
}
if b.resourceRequirements != nil {
for _, c := range job.Spec.Template.Spec.Containers {
c.Resources = *b.resourceRequirements
}
job.Spec.Template.Spec.Containers[0].Resources = *b.resourceRequirements
}
if len(b.volumeMounts) > 0 {
job.Spec.Template.Spec.Containers[0].VolumeMounts = b.volumeMounts
Expand Down

0 comments on commit f00b5e8

Please sign in to comment.