From 7a3c3a02c8caef1370651fd1616f04073787f6d9 Mon Sep 17 00:00:00 2001 From: EricoGR Date: Thu, 15 Oct 2020 00:11:45 -0300 Subject: [PATCH] fix bug when updating objecttemplateparams --- controllers/template.ericogr.github.com/commons.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/template.ericogr.github.com/commons.go b/controllers/template.ericogr.github.com/commons.go index 0c1f1c8..9dc7737 100644 --- a/controllers/template.ericogr.github.com/commons.go +++ b/controllers/template.ericogr.github.com/commons.go @@ -77,7 +77,7 @@ func (c *Common) UpdateSingleObjectByTemplate(obj otv1.Object, owners []metav1.O } } else { if err == nil { - findObj.Object["spec"] = newObj.Object["spec"] + findObj.Object = newObj.Object findObj.SetLabels(newObj.GetLabels()) findObj.SetAnnotations(newObj.GetAnnotations()) err := c.Client.Update(ctx, &findObj)