Files
cozystack/packages/apps/harbor
Aleksei Sviridkin 06c2be9745 fix(platform): stop handing tenants a root S3 the root tenant does not run (#5097)
## 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 -->
2026-12-02 15:46:00 +03:00
..

Managed Harbor Container Registry

Harbor is an open-source trusted cloud-native registry project that stores, signs, and scans content.

Prerequisites

The Cozystack Harbor app stores its registry data exclusively in S3-compatible object storage: the chart pins the registry backend to S3 and exposes no filesystem option. That bucket is provisioned through COSI (objectstorage.k8s.io) from a SeaweedFS deployment, so before deploying Harbor the tenant must have SeaweedFS available — enabled on the same tenant or inherited from a parent tenant (the resolved class is propagated down the tenant tree, surfaced as the namespace.cozystack.io/seaweedfs namespace label).

Enable it by setting seaweedfs: true on the tenant (or a parent tenant):

seaweedfs: true

Without object storage in the tenant chain, Harbor cannot provision its registry bucket: the <release>-registry BucketClaim/BucketAccess never produces the <release>-registry-bucket credentials secret, so the Harbor HelmRelease stays unreconciled, waiting on BucketInfo.

storageClass is annotated as immutable in the chart schema — see storageClass immutability for the contract and which consumers enforce it.

Parameters

Common parameters

Name Description Type Value
host Hostname for external access to Harbor (defaults to 'harbor' subdomain for the tenant host). string ""
managementWhitelist IP addresses or CIDR ranges allowed to reach the Harbor web portal and API. /v2/ and /service/token, which docker login, image pulls and pushes use, are not restricted by this list. For the portal and API it replaces the tenant ingress whitelist rather than narrowing it, and it is matched against the client address the ingress controller sees, which is a proxy or a forwarded header rather than the real client when something in front of the controller rewrites it. Empty allows every address. Requires Ingress publishing; rejected when the tenant publishes through Gateway API. []string []
storageClass StorageClass used to store the data. string ""

Component configuration

Name Description Type Value
nginx Entry-point proxy configuration. object {}
nginx.replicas Number of replicas of the proxy every docker login, pull and push goes through. Above 1, adds a PodDisruptionBudget and spreads the replicas by the platform's globalAppTopologySpreadConstraints, or softly across zones and nodes when it is unset. int 1
portal Web portal configuration. object {}
portal.replicas Number of web portal replicas. Above 1, adds a PodDisruptionBudget and spreads the replicas by the platform's globalAppTopologySpreadConstraints, or softly across zones and nodes when it is unset. int 1
core Core API server configuration. object {}
core.replicas Number of core replicas, which issue the token every pull and push needs. Above 1, adds a PodDisruptionBudget and spreads the replicas by the platform's globalAppTopologySpreadConstraints, or softly across zones and nodes when it is unset. int 1
core.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
core.resources.cpu Number of CPU cores allocated. quantity ""
core.resources.memory Amount of memory allocated. quantity ""
core.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
registry Container image registry configuration. object {}
registry.replicas Number of registry replicas; they share the S3 bucket and no local state. Above 1, adds a PodDisruptionBudget and spreads the replicas by the platform's globalAppTopologySpreadConstraints, or softly across zones and nodes when it is unset. int 1
registry.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
registry.resources.cpu Number of CPU cores allocated. quantity ""
registry.resources.memory Amount of memory allocated. quantity ""
registry.resourcesPreset Default sizing preset used when resources is omitted. string t1.small
jobservice Background job service configuration. object {}
jobservice.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
jobservice.resources.cpu Number of CPU cores allocated. quantity ""
jobservice.resources.memory Amount of memory allocated. quantity ""
jobservice.resourcesPreset Default sizing preset used when resources is omitted. string t1.nano
trivy Trivy vulnerability scanner configuration. object {}
trivy.enabled Enable or disable the vulnerability scanner. bool true
trivy.size Persistent Volume size for vulnerability database cache. quantity 5Gi
trivy.resources Explicit CPU and memory configuration. When omitted, the preset defined in resourcesPreset is applied. object {}
trivy.resources.cpu Number of CPU cores allocated. quantity ""
trivy.resources.memory Amount of memory allocated. quantity ""
trivy.resourcesPreset Default sizing preset used when resources is omitted. string t1.nano
database PostgreSQL database configuration. object {}
database.size Persistent Volume size for database storage. quantity 5Gi
database.replicas Number of database instances. Above 1, they are spread by the platform's globalAppTopologySpreadConstraints, or softly across zones when it is unset. int 2
redis Redis cache configuration. object {}
redis.size Persistent Volume size for cache storage. quantity 1Gi
redis.replicas Number of Redis replicas. Above 1, they are spread by the platform's globalAppTopologySpreadConstraints, or softly across zones when it is unset; the three sentinels always are. int 2

Scheduling parameters

Name Description Type Value
schedulingClass Name of a SchedulingClass CR (cluster-scoped, group cozystack.io) used in place of the tenant's for this application's pods. A pod gets its class when it is created, so running pods keep theirs until they are recreated. Must be the tenant's own class or one listed in the tenant's allowedSchedulingClasses. Setting any other value is refused, and the pods of an application whose class is not, or no longer, in that list get the tenant's class. Empty means inherit from the tenant. string ""