diff --git a/README.md b/README.md index ef57f50..a70dbc4 100644 --- a/README.md +++ b/README.md @@ -446,7 +446,7 @@ func (r *DeploymentResource) Mutate(current client.Object) error { // 4. Update internal desired state with the mutated current object. // This ensures that subsequent calls to ConvergingStatus and ExtractData // use the fully mutated state, including status. - r.desired = currentDeployment.DeepCopy() + r.desired = currentDeployment return nil } @@ -835,6 +835,8 @@ func (r *DeploymentResource) Mutate(current client.Object) error { return err } } + + r.deployment = currentDeployment return nil } diff --git a/examples/component-architecture-basics/resources/deployment_resource.go b/examples/component-architecture-basics/resources/deployment_resource.go index 61f409d..512bfe3 100644 --- a/examples/component-architecture-basics/resources/deployment_resource.go +++ b/examples/component-architecture-basics/resources/deployment_resource.go @@ -93,7 +93,7 @@ func (r *DeploymentResource) Mutate(current client.Object) error { // 4. Update internal desired state with the mutated current object. // This ensures that subsequent calls to ConvergingStatus and ExtractData // use the fully mutated state, including status. - r.deployment = currentDeployment.DeepCopy() + r.deployment = currentDeployment return nil }