Skip to content

Commit

Permalink
topology-updater: Set APIVersion, Kind in the OwnerReference explicitly
Browse files Browse the repository at this point in the history
APIVersion and Kind are empty in the returned namespace object
and need to be set explicitly.

Signed-off-by: Oleg Zhurakivskyy <[email protected]>
  • Loading branch information
ozhuraki committed Mar 20, 2024
1 parent 0ad5e50 commit 7bd27c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/nfd-topology-updater/nfd-topology-updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",

Check warning on line 241 in pkg/nfd-topology-updater/nfd-topology-updater.go

View check run for this annotation

Codecov / codecov/patch

pkg/nfd-topology-updater/nfd-topology-updater.go#L240-L241

Added lines #L240 - L241 were not covered by tests
Name: ns.Name,
UID: types.UID(ns.UID),
},
Expand Down

0 comments on commit 7bd27c7

Please sign in to comment.