Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- (Feature) Allow configuration for securityContext.runAsUser value
- (Bugfix) Fix Satellite collections in Agency
- (Bugfix) Fix backup creation timeout

## [1.2.9](https://github.com/arangodb/kube-arangodb/tree/1.2.9) (2022-03-30)
- (Feature) Improve Kubernetes clientsets management
Expand Down
7 changes: 5 additions & 2 deletions pkg/handlers/backup/arango_client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ func (ac *arangoClientBackupImpl) List() (map[driver.BackupID]driver.BackupMeta,
}

func (ac *arangoClientBackupImpl) Create() (ArangoBackupCreateResponse, error) {
ctx, cancel := context.WithTimeout(context.Background(), defaultArangoClientTimeout)
defer cancel()
dt := defaultArangoClientTimeout

co := driver.BackupCreateOptions{}

Expand All @@ -86,9 +85,13 @@ func (ac *arangoClientBackupImpl) Create() (ArangoBackupCreateResponse, error) {
}
if timeout := opt.Timeout; timeout != nil {
co.Timeout = time.Duration(*timeout * float32(time.Second))
dt += co.Timeout
}
}

ctx, cancel := context.WithTimeout(context.Background(), dt)
defer cancel()

id, resp, err := ac.driver.Backup().Create(ctx, &co)
if err != nil {
return ArangoBackupCreateResponse{}, err
Expand Down