Skip to content

Commit

Permalink
fix: random annotation created in primary resource.
Browse files Browse the repository at this point in the history
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) <sam.wang@suse.com>
  • Loading branch information
holyspectral committed Dec 4, 2024
1 parent 819984d commit 2bd92d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/helm/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 2bd92d1

Please sign in to comment.