From 23537c8bdce8f2480394eaf15e87af4c648c7124 Mon Sep 17 00:00:00 2001 From: Eguzki Astiz Lezaun Date: Thu, 11 Apr 2024 17:43:43 +0200 Subject: [PATCH] fix kuadrant CR finalizer --- controllers/kuadrant_controller.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/controllers/kuadrant_controller.go b/controllers/kuadrant_controller.go index 3b2abd79e..8298ad37a 100644 --- a/controllers/kuadrant_controller.go +++ b/controllers/kuadrant_controller.go @@ -338,10 +338,13 @@ func (r *KuadrantReconciler) getIstioConfigObjects(ctx context.Context, logger l istioConfigMap := &corev1.ConfigMap{} if err := r.GetResource(ctx, client.ObjectKey{Name: controlPlaneConfigMapName(), Namespace: controlPlaneProviderNamespace()}, istioConfigMap); err != nil { - logger.V(1).Info("failed to get istio configMap", "key", istKey, "err", err) - return configsToUpdate, err + if !apierrors.IsNotFound(err) { + logger.V(1).Info("failed to get istio configMap", "key", istKey, "err", err) + return configsToUpdate, err + } + } else { + configsToUpdate = append(configsToUpdate, istio.NewConfigMapWrapper(istioConfigMap)) } - configsToUpdate = append(configsToUpdate, istio.NewConfigMapWrapper(istioConfigMap)) return configsToUpdate, nil }