Skip to content

Commit 2fc8638

Browse files
authored
[Bugfix] Change Accepted Spec Propagation (#1642)
1 parent 1d86f4e commit 2fc8638

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- (Feature) Object Checksum
2222
- (Bugfix) Use Rendered Spec in case of scheduling compare
2323
- (Feature) Parametrize Scheduling Graceful Duration
24+
- (Bugfix) Change Accepted Spec Propagation
2425

2526
## [1.2.39](https://github.com/arangodb/kube-arangodb/tree/1.2.39) (2024-03-11)
2627
- (Feature) Extract Scheduler API

pkg/deployment/deployment.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,12 @@ func (d *Deployment) acceptNewSpec(ctx context.Context, depl *api.ArangoDeployme
498498
}
499499

500500
func (d *Deployment) patchAcceptedSpec(ctx context.Context, spec *api.DeploymentSpec, checksum string) error {
501-
return d.ApplyPatch(ctx, patch.ItemReplace(patch.NewPath("status", "accepted-spec"), spec),
502-
patch.ItemReplace(patch.NewPath("status", "acceptedSpecVersion"), checksum))
501+
s := d.GetStatus()
502+
503+
s.AcceptedSpecVersion = util.NewType(checksum)
504+
s.AcceptedSpec = spec.DeepCopy()
505+
506+
return d.updateCRStatus(ctx, s)
503507
}
504508

505509
// handleArangoDeploymentUpdatedEvent is called when the deployment is updated by the user.

0 commit comments

Comments
 (0)