Fix: Enable throttling parameters in BackupRepository repositoryConfig#9351
Open
kvaps wants to merge 1 commit intovmware-tanzu:mainfrom
Open
Fix: Enable throttling parameters in BackupRepository repositoryConfig#9351kvaps wants to merge 1 commit intovmware-tanzu:mainfrom
kvaps wants to merge 1 commit intovmware-tanzu:mainfrom
Conversation
469a1ec to
ff9e49c
Compare
kaovilai
previously approved these changes
Oct 22, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9351 +/- ##
==========================================
+ Coverage 59.67% 60.24% +0.57%
==========================================
Files 383 386 +3
Lines 44050 35942 -8108
==========================================
- Hits 26286 21653 -4633
+ Misses 16218 12715 -3503
- Partials 1546 1574 +28 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Lyndon-Li
reviewed
Nov 13, 2025
ff9e49c to
5e643a4
Compare
The `uploadBytes`, `downloadBytes`, and other throttling parameters specified in BackupRepository's `repositoryConfig` were being silently filtered out and not applied to Kopia repositories. This occurred because these parameters were missing from the whitelist in `getStorageVariables()`.
**Code:**
- Added throttling options to the valid parameters whitelist in `pkg/repository/provider/unified_repo.go`:
- `uploadBytes` - upload bandwidth throttling (bytes/sec)
- `downloadBytes` - download bandwidth throttling (bytes/sec)
- `readOPS` - read operations throttling (ops/sec)
- `writeOPS` - write operations throttling (ops/sec)
- `listOPS` - list operations throttling (ops/sec)
**Documentation:**
- Updated `site/content/docs/main/backup-repository-configuration.md` with throttling parameters descriptions and examples
**Tests:**
- Added test case in `pkg/repository/provider/unified_repo_test.go` to verify throttling parameters are properly passed through
```yaml
apiVersion: velero.io/v1
kind: BackupRepository
spec:
repositoryConfig:
uploadBytes: "838860800" # ~800 MB/s
downloadBytes: "838860800" # ~800 MB/s
```
These parameters are now properly applied to Kopia during file system backups performed by node-agent.
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Lyndon-Li
reviewed
Dec 11, 2025
| ThrottleOptionListOps = "listOPS" | ||
| ThrottleOptionUploadBytes = "uploadBytes" | ||
| ThrottleOptionDownloadBytes = "downloadBytes" | ||
| ThrottleOptionReadOps = "ThrottleReadOPS" |
Contributor
There was a problem hiding this comment.
Sorry for misleading of my previous comment. We add throttle for each of the options, but as the convention, we need to make the first word lowercase, like:
ThrottleOptionReadOps = "throttleReadOPS"
ThrottleOptionWriteOps = "throttleWriteOPS"
ThrottleOptionListOps = "throttleListOPS"
ThrottleOptionUploadBytes = "throttleUploadBytes"
ThrottleOptionDownloadBytes = "throttleDownloadBytes"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The throttling parameters specified in BackupRepository's
repositoryConfigwere being silently filtered out and not applied to Kopia repositories. This occurred because these parameters were missing from the whitelist ingetStorageVariables().Code:
Added throttling options to the valid parameters whitelist in
pkg/repository/provider/unified_repo.go:ThrottleUploadBytes- upload bandwidth throttling (bytes/sec)ThrottleDownloadBytes- download bandwidth throttling (bytes/sec)ThrottleReadOPS- read operations throttling (ops/sec)ThrottleWriteOPS- write operations throttling (ops/sec)ThrottleListOPS- list operations throttling (ops/sec)Updated parameter names in
pkg/repository/udmrepo/repo_options.goto use "Throttle" prefix for better clarity:readOPS→ThrottleReadOPSwriteOPS→ThrottleWriteOPSlistOPS→ThrottleListOPSuploadBytes→ThrottleUploadBytesdownloadBytes→ThrottleDownloadBytesDocumentation:
site/content/docs/main/backup-repository-configuration.mdwith throttling parameters descriptions and examples using the new parameter namesTests:
pkg/repository/provider/unified_repo_test.goto verify throttling parameters are properly passed throughExample Usage:
These parameters are now properly applied to Kopia during file system backups performed by node-agent.
Signed-off-by: Andrei Kvapil kvapss@gmail.com