mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-30 04:06:34 +09:00
BucketClass and BucketAccessClass are cluster-scoped and every SeaweedFS instance names its classes after its own namespace. The bucket chart builds class names from the resolved SeaweedFS namespace and the free-form storagePool, and a child tenant's namespace is its parent's namespace plus its name, so a storagePool could produce the name of a class that belongs to a different tenant's instance and provision the bucket there. Before rendering, the chart now looks up every class the release will reference and refuses the render when a class exists with a driver other than the resolved instance's, or when storagePool is set and the class does not exist. The driver, not the name, identifies the instance, and requiring the pool class to exist keeps a claim from waiting for a matching class to appear later. The check fails a release that already references such a class on its next upgrade; a bucket with a pool of its own instance, or with no pool, renders unchanged. Offline renders, where the release namespace is not found, skip the check. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>