From 8fcbc85c53add38a62e1a6f216619a0420a8f680 Mon Sep 17 00:00:00 2001 From: "Sam Wang (holyspectral)" Date: Tue, 3 Dec 2024 22:46:42 -0500 Subject: [PATCH] fix: random annotation created in primary resource. When deployed with helm-operator, the primary custom resource would randomly get assigned "operator-sdk/primary-resource" and "operator-sdk/primary-resource-type" annotations. This commit fixes the issue. Signed-off-by: Sam Wang (holyspectral) --- internal/helm/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/helm/client/client.go b/internal/helm/client/client.go index 8cfebe2b029..6ea4d1138ae 100644 --- a/internal/helm/client/client.go +++ b/internal/helm/client/client.go @@ -81,7 +81,7 @@ func (c *ownerRefInjectingClient) Build(reader io.Reader, validate bool) (kube.R ownerRef := metav1.NewControllerRef(c.owner, c.owner.GetObjectKind().GroupVersionKind()) u.SetOwnerReferences([]metav1.OwnerReference{*ownerRef}) } else { - err := handler.SetOwnerAnnotations(u, c.owner) + err := handler.SetOwnerAnnotations(c.owner, u) if err != nil { return err }