Skip to content

Commit d123c5e

Browse files
authored
Ensure label map is not nil (#154)
1 parent 70cdf06 commit d123c5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/webhook/appwrapper_webhook.go

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func (w *AppWrapperWebhook) Default(ctx context.Context, obj runtime.Object) err
7373
// Queue name and Suspend
7474
if w.Config.EnableKueueIntegrations {
7575
if w.Config.QueueName != "" && aw.Annotations[QueueNameLabel] == "" && aw.Labels[QueueNameLabel] == "" {
76+
if aw.Labels == nil {
77+
aw.Labels = map[string]string{}
78+
}
7679
aw.Labels[QueueNameLabel] = w.Config.QueueName
7780
}
7881
jobframework.ApplyDefaultForSuspend((*wlc.AppWrapper)(aw), w.Config.ManageJobsWithoutQueueName)

0 commit comments

Comments
 (0)