Files
cozystack/packages/extra/seaweedfs
Aleksei Sviridkin 045f1a9bbc fix(seaweedfs): remove identities left behind by deleted BucketAccesses
Since SeaweedFS 4.08 the S3 gateways move every identity from
/etc/iam/identity.json into /etc/iam/identities/<name>.json, and the
COSI driver up to v0.3.1 revokes only from identity.json. Every
BucketAccess deleted on such a filer left its identity file behind,
with its keys still accepted (seaweedfs/seaweedfs-cosi-driver#11). A
driver that deletes the file on revoke does nothing for the files
already left.

A post-install/post-upgrade hook removes a ba-<uid>.json file when no
BucketAccess in any namespace names it, by uid or by
status.accountID. The uid covers a BucketAccess still being granted,
the accountID one restored with its status. The identity directory is
listed before the BucketAccesses: a BucketAccess exists before its
grant writes a file, so a file seen in the first listing whose
BucketAccess still exists is always named by the second. File ages are
not used, because grants and gateway migrations rewrite left-over
files as well. A failed or empty listing removes nothing. Each removal
is logged and recorded as an Event on the HelmRelease. The hook runs
before the Object Lock hook, so in delete mode a left-over identity is
removed before that hook grants it anything.

A filer published for Client-topology clusters holds identities whose
BucketAccesses live in those clusters, so cosi.orphanIdentities
defaults to auto: report there, delete otherwise. An operator can
force either.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-17 22:07:25 +03:00
..
2024-08-12 14:47:11 +02:00
2024-08-12 14:33:48 +02:00
2025-09-24 12:32:37 +02:00

Managed SeaweedFS Service

Parameters

Common parameters

Name Description Type Value
host The hostname used to access SeaweedFS externally (defaults to 's3' subdomain for the tenant host). string ""
topology The topology of the SeaweedFS cluster. string Simple
replicationFactor Replication factor: number of replicas for each volume in the SeaweedFS cluster. int 2

SeaweedFS Components Configuration

Name Description Type Value
db Database configuration. object {}
db.replicas Number of database replicas. int 2
db.size Persistent Volume size. quantity 10Gi
db.storageClass StorageClass used to store the data. string ""
db.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
db.resources.cpu Number of CPU cores allocated. quantity ""
db.resources.memory Amount of memory allocated. quantity ""
db.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
master Master service configuration. object {}
master.replicas Number of master replicas. int 3
master.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
master.resources.cpu Number of CPU cores allocated. quantity ""
master.resources.memory Amount of memory allocated. quantity ""
master.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
master.volumeSizeLimitMB Size in MB at which a volume stops taking writes, and the divisor that sets how many buckets a volume server can serve. Lower it to fit more buckets on the same disk, at the cost of more volume files for the same stored data; on a large volume it is worth raising instead. Changing it on an instance that already holds data costs something either way: lowering it stops writes to every bucket whose volumes all reach the new value until that bucket can grow, and raising it takes the room new buckets grow into, so run the check in docs/operations/seaweedfs-lowering-the-volume-size-limit.md first. Must be between 1 and 30000. A value close to or above volume.size leaves each volume server a single slot rather than failing, since the server floors its slot count at one. int 400
filer Filer service configuration. object {}
filer.replicas Number of filer replicas. int 2
filer.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
filer.resources.cpu Number of CPU cores allocated. quantity ""
filer.resources.memory Amount of memory allocated. quantity ""
filer.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
filer.grpcHost The hostname used to expose or access the filer service externally. string ""
filer.grpcPort The port used to access the filer service externally. int 443
filer.whitelist A list of IP addresses or CIDR ranges that are allowed to access the filer service. []string []
volume Volume service configuration. object {}
volume.replicas Number of volume replicas. int 2
volume.size Persistent Volume size. quantity 10Gi
volume.storageClass StorageClass used to store the data. string ""
volume.diskType SeaweedFS disk type tag for the default volume servers (e.g., "hdd", "ssd"). string ""
volume.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
volume.resources.cpu Number of CPU cores allocated. quantity ""
volume.resources.memory Amount of memory allocated. quantity ""
volume.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
volume.zones A map of zones for MultiZone topology. Each zone can have its own number of replicas and size. map[string]object {}
volume.zones[name].replicas Number of replicas in the zone. int 0
volume.zones[name].size Zone storage size. quantity ""
volume.zones[name].dataCenter SeaweedFS data center name for this zone. Defaults to the zone name. string ""
volume.zones[name].nodeSelector YAML nodeSelector for this zone (default: topology.kubernetes.io/zone: ). string ""
volume.zones[name].storageClass StorageClass used to store zone data. Defaults to volume.storageClass. string ""
volume.zones[name].pools A map of storage pools for this zone. Each pool creates a separate Volume StatefulSet per zone. map[string]object {}
volume.zones[name].pools[name].diskType SeaweedFS disk type tag (e.g., "ssd", "hdd", "nvme"). string ""
volume.zones[name].pools[name].replicas Number of volume replicas. Defaults to volume.replicas (Simple) or zone.replicas/volume.replicas (MultiZone). int 0
volume.zones[name].pools[name].size Persistent Volume size. Defaults to volume.size (Simple) or zone.size/volume.size (MultiZone). quantity ""
volume.zones[name].pools[name].storageClass Kubernetes StorageClass for the pool. Defaults to volume.storageClass. string ""
volume.zones[name].pools[name].resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
volume.zones[name].pools[name].resources.cpu Number of CPU cores allocated. quantity ""
volume.zones[name].pools[name].resources.memory Amount of memory allocated. quantity ""
volume.zones[name].pools[name].resourcesPreset Default sizing preset used when resources is omitted. Defaults to volume.resourcesPreset. string {}
volume.pools A map of storage pools. Each pool creates a separate Volume StatefulSet with its own disk type. map[string]object {}
volume.pools[name].diskType SeaweedFS disk type tag (e.g., "ssd", "hdd", "nvme"). string ""
volume.pools[name].replicas Number of volume replicas. Defaults to volume.replicas (Simple) or zone.replicas/volume.replicas (MultiZone). int 0
volume.pools[name].size Persistent Volume size. Defaults to volume.size (Simple) or zone.size/volume.size (MultiZone). quantity ""
volume.pools[name].storageClass Kubernetes StorageClass for the pool. Defaults to volume.storageClass. string ""
volume.pools[name].resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
volume.pools[name].resources.cpu Number of CPU cores allocated. quantity ""
volume.pools[name].resources.memory Amount of memory allocated. quantity ""
volume.pools[name].resourcesPreset Default sizing preset used when resources is omitted. Defaults to volume.resourcesPreset. string {}
s3 S3 service configuration. object {}
s3.replicas Number of S3 replicas. int 2
s3.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
s3.resources.cpu Number of CPU cores allocated. quantity ""
s3.resources.memory Amount of memory allocated. quantity ""
s3.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
lifecycle S3 bucket lifecycle configuration. object {}
lifecycle.enabled Run the SeaweedFS admin server and a worker that applies bucket lifecycle rules, once a day. When disabled, rules are still accepted and stored, but not applied. Ignored with the Client topology, whose rules are enforced by the instance it connects to. Rules stored before enabling are applied on the first pass, minutes after the switch. While on, in a bucket without versioning enabled, an object overwritten between the daily listing and its expiry delete can be deleted although it is new. bool false
lifecycle.storageClass StorageClass of the admin server's 1Gi job-state volume. Empty uses the cluster default; volume.storageClass is not used, because in MultiZone it can be local to one zone. Prefer a replicated class: on a node-local one, losing the node stops lifecycle enforcement. Set it before enabling lifecycle: the class is part of the admin StatefulSet's volume claim template, which cannot change, so changing it while lifecycle is on makes every upgrade of the instance fail until it is reverted. To move the volume, disable lifecycle, delete the admin-data-seaweedfs-admin-0 PVC of the instance, change the class and enable lifecycle again. string ""
cosi Bucket provisioning configuration. object {}
cosi.orphanIdentities What installs and upgrades do with S3 identities left behind by deleted BucketAccesses: delete removes them, report only lists them in an Event, auto reports when filer.grpcHost is set (other clusters may use this filer) and removes them otherwise. Set report if the filer is reachable from other clusters some other way. Ignored with the Client topology, whose identities live on the filer of the instance it connects to. string auto