From 5cde3b48c76779ca19eeba9ca4512558925ade1c Mon Sep 17 00:00:00 2001 From: Patrick von Steht Date: Wed, 27 Mar 2024 09:08:24 +0100 Subject: [PATCH] Remove labels from ImageJob PodTemplateSpec Signed-off-by: Patrick von Steht --- controllers/imagecollector/imagecollector_controller.go | 8 -------- controllers/imagelist/imagelist_controller.go | 8 -------- 2 files changed, 16 deletions(-) diff --git a/controllers/imagecollector/imagecollector_controller.go b/controllers/imagecollector/imagecollector_controller.go index 5567288a25..400ba36f46 100644 --- a/controllers/imagecollector/imagecollector_controller.go +++ b/controllers/imagecollector/imagecollector_controller.go @@ -323,15 +323,7 @@ func (r *Reconciler) createImageJob(ctx context.Context) (ctrl.Result, error) { pullSecrets = append(pullSecrets, corev1.LocalObjectReference{Name: secret}) } - labels := map[string]string{} - for k, v := range mgrCfg.AdditionalPodLabels { - labels[k] = v - } - jobTemplate := corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ { diff --git a/controllers/imagelist/imagelist_controller.go b/controllers/imagelist/imagelist_controller.go index 59dd2935ea..940d8efc79 100644 --- a/controllers/imagelist/imagelist_controller.go +++ b/controllers/imagelist/imagelist_controller.go @@ -291,15 +291,7 @@ func (r *Reconciler) handleImageListEvent(ctx context.Context, imageList *eraser pullSecrets = append(pullSecrets, corev1.LocalObjectReference{Name: secret}) } - labels := map[string]string{} - for k, v := range eraserConfig.Manager.AdditionalPodLabels { - labels[k] = v - } - jobTemplate := corev1.PodTemplateSpec{ - ObjectMeta: metav1.ObjectMeta{ - Labels: labels, - }, Spec: corev1.PodSpec{ Volumes: []corev1.Volume{ {