diff --git a/pkg/kds/context/context.go b/pkg/kds/context/context.go index 54f57933072d..be20ae021d10 100644 --- a/pkg/kds/context/context.go +++ b/pkg/kds/context/context.go @@ -218,9 +218,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) { - newRes := util.CloneResource(r) - newRes.SetMeta(util.CloneResourceMeta(r.GetMeta(), fs...)) - return newRes, nil + newObj := r.Descriptor().NewObject() + newMeta := util.CloneResourceMeta(r.GetMeta(), fs...) + newObj.SetMeta(newMeta) + _ = newObj.SetSpec(r.GetSpec()) + + return newObj, nil } }