Skip to content

Commit

Permalink
fix: add annotation node-collector job template spec (#321)
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan authored Apr 3, 2024
1 parent 8bba3fa commit a349232
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/jobs/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ func (b *JobBuilder) build() (*batchv1.Job, error) {
// append annotation
for key, val := range b.annotations {
if job.Annotations == nil {
job.Annotations = make(map[string]string)
job.Spec.Template.Annotations = make(map[string]string)
}
job.Annotations[key] = val
job.Spec.Template.Annotations[key] = val
}
if len(b.serviceAccount) > 0 {
job.Spec.Template.Spec.ServiceAccountName = b.serviceAccount
Expand Down

0 comments on commit a349232

Please sign in to comment.