From f7fc53e275d0144a70f2454825ee406f82fad220 Mon Sep 17 00:00:00 2001 From: ajanikow <12255597+ajanikow@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:30:52 +0000 Subject: [PATCH] [Bugfix] Change Accepted Spec Propagation --- CHANGELOG.md | 1 + pkg/deployment/deployment.go | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 046c24af3..1f8dd5a5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - (Maintenance) Update Go to 1.22.2 - (Feature) Object Checksum - (Bugfix) Use Rendered Spec in case of scheduling compare +- (Bugfix) Change Accepted Spec Propagation ## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11) - (Feature) Extract Scheduler API diff --git a/pkg/deployment/deployment.go b/pkg/deployment/deployment.go index 6edbdd13b..50700765c 100644 --- a/pkg/deployment/deployment.go +++ b/pkg/deployment/deployment.go @@ -498,8 +498,12 @@ func (d *Deployment) acceptNewSpec(ctx context.Context, depl *api.ArangoDeployme } func (d *Deployment) patchAcceptedSpec(ctx context.Context, spec *api.DeploymentSpec, checksum string) error { - return d.ApplyPatch(ctx, patch.ItemReplace(patch.NewPath("status", "accepted-spec"), spec), - patch.ItemReplace(patch.NewPath("status", "acceptedSpecVersion"), checksum)) + s := d.GetStatus() + + s.AcceptedSpecVersion = util.NewType(checksum) + s.AcceptedSpec = spec.DeepCopy() + + return d.updateCRStatus(ctx, s) } // handleArangoDeploymentUpdatedEvent is called when the deployment is updated by the user.