mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-05 14:42:05 +09:00
## What this PR does `cozystack-basics` writes `seaweedfs: tenant-root` into the `cozystack-values` Secret of the root tenant unconditionally, so every tenant without its own SeaweedFS inherits `tenant-root` as its S3, even when `Tenant/root` has `spec.seaweedfs: false`. On a v1.6.5 cluster whose root tenant runs no SeaweedFS, a tenant created a Bucket, its BucketClaim asked for bucket class `tenant-root`, and the objectstorage controller logged `bucketclasses.objectstorage.k8s.io "tenant-root" not found` 8796 times over three days while the app stayed Ready. #5096 makes that state visible in WorkloadsReady, this PR removes its cause. The new platform value `seaweedfs.rootEnabled` reaches cozystack-basics as `_cluster.seaweedfs-enabled`, the same way `monitoring.rootEnabled` reaches it as `_cluster.monitoring-enabled` for #3181, and `_namespace.seaweedfs: tenant-root` is written only when it is true. The default `true` keeps today's behaviour. The slim variants, which do not install SeaweedFS for the root tenant, set it to `false` next to `monitoring.rootEnabled`. Without S3 up the tenant chain the bucket and harbor charts now fail to render with a message that names the problem, instead of creating a claim for a class that never appears. A lookup of the live Tenant is not used, for the reason `monitoring-external-services.yaml` gives for the monitoring gate. An existing Bucket or Harbor in a tenant without S3 up its chain fails its next upgrade with that message once the flag is false. Its BucketClaim was never provisioned, so nothing that worked stops working. The platform tests cover propagation of seaweedfs.rootEnabled. Rendering the root Secret with a missing flag keeps S3 enabled for older installations. For a present key, only true or the string "true" enables it. The bucket and harbor tests also cover the error when the tenant has no S3. All 546 Helm tests across the four charts passed locally. ### Screenshots Not a UI change. ### Downstream repositories `packages/core/platform/values.yaml` gains `seaweedfs.rootEnabled`, which the trigger map routes to `platform-package.md` on the website. The variants page lists what the slim variants need for SeaweedFS, so it gets the same note as monitoring. No app schema, values default or other contract changes. - [ ] No downstream repository is affected by this change - [x] [cozystack/website](https://github.com/cozystack/website) - follow-up: https://github.com/cozystack/website/pull/774 - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(platform): new platform value seaweedfs.rootEnabled. Set it to false when the root tenant runs no SeaweedFS, so tenants stop inheriting tenant-root as their S3 and a Bucket or Harbor without S3 up its tenant chain fails to render with a clear message instead of waiting on a bucket class that does not exist. The slim variants set it to false, so a slim cluster that runs SeaweedFS on Tenant/root must set seaweedfs.rootEnabled: true before the upgrade, or its Buckets and Harbors stop rendering. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * Added a setting to control whether the root tenant provides SeaweedFS for S3. It is enabled by default and disabled in slim ISP configurations. * Tenant configuration now includes SeaweedFS when root provision is enabled or the setting is unspecified, and omits it when disabled. * **Bug Fixes** * Bucket and Harbor deployments now report a clear error when neither the tenant nor an ancestor provides SeaweedFS, rather than rendering an unusable S3 bucket claim. <!-- end of auto-generated comment: release notes by coderabbit.ai -->