From 7bd27c757ae68f6530f9dca431f10581236179ef Mon Sep 17 00:00:00 2001 From: Oleg Zhurakivskyy Date: Wed, 20 Mar 2024 19:54:03 +0200 Subject: [PATCH] topology-updater: Set APIVersion, Kind in the OwnerReference explicitly APIVersion and Kind are empty in the returned namespace object and need to be set explicitly. Signed-off-by: Oleg Zhurakivskyy --- pkg/nfd-topology-updater/nfd-topology-updater.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/nfd-topology-updater/nfd-topology-updater.go b/pkg/nfd-topology-updater/nfd-topology-updater.go index 29de2102e7..131547b873 100644 --- a/pkg/nfd-topology-updater/nfd-topology-updater.go +++ b/pkg/nfd-topology-updater/nfd-topology-updater.go @@ -237,8 +237,8 @@ func (w *nfdTopologyUpdater) updateNodeResourceTopology(zoneInfo v1alpha2.ZoneLi } else { w.ownerRefs = []metav1.OwnerReference{ { - APIVersion: ns.APIVersion, - Kind: ns.Kind, + APIVersion: "v1", + Kind: "Namespace", Name: ns.Name, UID: types.UID(ns.UID), },