diff --git a/pkg/kds/context/context.go b/pkg/kds/context/context.go index 3a00753f2595..fc7a24a70da0 100644 --- a/pkg/kds/context/context.go +++ b/pkg/kds/context/context.go @@ -222,8 +222,12 @@ func HashSuffixMapper(checkKDSFeature bool, labelsToUse ...string) reconcile.Res func UpdateResourceMeta(fs ...util.CloneResourceMetaOpt) reconcile.ResourceMapper { return func(_ kds.Features, r core_model.Resource) (core_model.Resource, error) { - r.SetMeta(util.CloneResourceMeta(r.GetMeta(), fs...)) - return r, nil + newObj := r.Descriptor().NewObject() + newMeta := util.CloneResourceMeta(r.GetMeta(), fs...) + newObj.SetMeta(newMeta) + _ = newObj.SetSpec(r.GetSpec()) + + return newObj, nil } }