Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
docs: #164 add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Feb 20, 2022
1 parent cfadd83 commit a6d4fc0
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions server-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,48 @@ func (c Collection) CanUploadToMe(user *users.User) bool {
return false
}
```

Quota
-----

System is fully multi-tenant. `System administrator` can create a collection with specified storage limits on single file, whole collection, select a rotation strategy.
Concept is simple - there ca be stored X versions of Y size in given collection. Additionally, there is such thing as `extra space` which allows to upload a file that exceeds the limit to not break
the backup pipeline. Such situation is immediately reported in a collection health check as a warning.

```yaml
---
apiVersion: backups.riotkit.org/v1alpha1
kind: BackupCollection
# ...
spec:
# ...
maxBackupsCount: 5
maxOneVersionSize: 1M
maxCollectionSize: 5M
```

#### Extra space

The following example allows uploading files of 1 MB size normally, but optionally allows uploading larger files that could in summary take additional 5MB.
For example one of uploaded versions can be a 5MB file, or there could be two versions of 2,5MB file each - both exceeding the soft limit of `maxOneVersionSize`. The `maxCollectionSize` is a hard limit.

```bash
maxBackupsCount = 5
maxOneVersionSize = 1MB
maxCollectionSize = 10MB
estimatedCollectionSize = maxBackupsCount * maxOneVersionSize = 5 * 1MB = 5MB
extraSpace = maxCollectionSize - estimatedCollectionSize = 10MB - 5MB
```

```yaml
---
apiVersion: backups.riotkit.org/v1alpha1
kind: BackupCollection
# ...
spec:
# ...
maxBackupsCount: 5
maxOneVersionSize: 1M
maxCollectionSize: 10M
```

0 comments on commit a6d4fc0

Please sign in to comment.