From 832eea320c929220b3317cd328410af4014696eb Mon Sep 17 00:00:00 2001 From: Thibault Jamet Date: Fri, 29 Nov 2024 17:01:54 +0100 Subject: [PATCH] Prevent changing dnsEndpoint name and namespace attributes in createOrUpdate This is not permitted by controllerRuntime and should not be performed Change-Id: I5f01e93edd2b8c48689588a871905047d4fbed8f --- pkg/controllers/ingress_controller.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/controllers/ingress_controller.go b/pkg/controllers/ingress_controller.go index b2f4008..fe02ba3 100644 --- a/pkg/controllers/ingress_controller.go +++ b/pkg/controllers/ingress_controller.go @@ -175,8 +175,6 @@ func (r *IngressReconciler) newDnsEndpoint(ctx context.Context, dnsEndpoint *ext setOwnerRef(dnsEndpoint, &ingress) - dnsEndpoint.Name = ingress.ObjectMeta.Name - dnsEndpoint.Namespace = ingress.ObjectMeta.Namespace desiredWeight = uint(trafficweight.Store.DesiredWeight) if r.isIngressWeighted(ingress) { desiredWeight, err = r.calculateIngressWeight(ingress)