Skip to content

Commit

Permalink
Ensure label map is not nil (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
tardieu authored Jun 17, 2024
1 parent 70cdf06 commit d123c5e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/webhook/appwrapper_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (w *AppWrapperWebhook) Default(ctx context.Context, obj runtime.Object) err
// Queue name and Suspend
if w.Config.EnableKueueIntegrations {
if w.Config.QueueName != "" && aw.Annotations[QueueNameLabel] == "" && aw.Labels[QueueNameLabel] == "" {
if aw.Labels == nil {
aw.Labels = map[string]string{}
}
aw.Labels[QueueNameLabel] = w.Config.QueueName
}
jobframework.ApplyDefaultForSuspend((*wlc.AppWrapper)(aw), w.Config.ManageJobsWithoutQueueName)
Expand Down

0 comments on commit d123c5e

Please sign in to comment.