feat: auto disk usage limit mode - #56
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:08
d8f54d8 to
4557341
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:15
4557341 to
dd6f937
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:20
dd6f937 to
fce7a34
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:26
fce7a34 to
56fbfc1
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:42
56fbfc1 to
877cb8e
Compare
This comment has been minimized.
This comment has been minimized.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 06:50
877cb8e to
ffd604a
Compare
This comment has been minimized.
This comment has been minimized.
Add an automatic disk usage limit mode that dynamically calculates the maximum upload space based on 80% of total disk capacity. The limit value is now a string to support three modes: - auto → 80% of total disk capacity (default) - 0 → unlimited - N → fixed limit in GB Changes: - config.DiskUsageLimit: new custom type with JSON/koanf hooks - mapstructure decode hook for backward-compat with YAML numbers - backend factory: resolve auto limits via gopsutil/disk - handlers: validate incoming disk limit values - frontend: three-mode selector (auto / unlimited / custom) - gopsutil v4 dependency added No breaking changes: existing configs with numeric disk_usage_limit continue to work.
pcfreak30
force-pushed
the
feat/auto-disk-limit
branch
from
July 19, 2026 07:02
ffd604a to
fab142a
Compare
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Docker image for testingPull the image for this PR: docker pull ghcr.io/lumeweb/s3-server:sha-68f3c67Or use in docker-compose: services:
s3-server:
image: ghcr.io/lumeweb/s3-server:sha-68f3c67
|
pcfreak30
marked this pull request as ready for review
July 19, 2026 07:08
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.
What this does
Adds an automatic disk usage limit mode using real-time disk capacity via gopsutil. The setting is now a string with three modes:
Why a string type
The old uint64 type could only express a fixed byte limit or 0 (unlimited). Adding auto required a sentinel value or a separate flag. Using a string keeps the config surface minimal and self-describing.
Backward compatibility
Files changed