Skip to content

Commit

Permalink
[Bugfix] Change Accepted Spec Propagation (#1642)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajanikow authored Apr 8, 2024
1 parent 1d86f4e commit 2fc8638
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- (Feature) Object Checksum
- (Bugfix) Use Rendered Spec in case of scheduling compare
- (Feature) Parametrize Scheduling Graceful Duration
- (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
Expand Down
8 changes: 6 additions & 2 deletions pkg/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 2fc8638

Please sign in to comment.