Skip to content

feat(tenant): model the Tenant tracingCentral field #64

Closed

Description

@scooby87

cozystack/cozystack#3775 adds a field to the Tenant application, so cozystack_tenant needs it modelled.

The field. tracingCentral (boolean, default false) in packages/apps/tenant/values.schema.json: it sends the tenant's traces to the shared VictoriaTraces store in tenant-root instead of a per-tenant backend. It takes effect only together with monitoring: true on the same tenant, and only once tenant-root hosts the store; without that, the tenant's monitoring render fails with a message naming the prerequisite.

What the provider needs, following the existing monitoring attribute:

  • a tracing_central attribute (Boolean, Optional) on the cozystack_tenant resource and data source, in internal/provider/tenant_model.go, tenant_resource.go and tenant_data_source.go, with its expand/flatten and tests;
  • the api/apps/v1alpha1 pin bumped once #3775 is merged, so the top-level field guard sees it.

Not needed. cozystack/cozystack#4648 adds tracingCentralTenantBytesPerSecond to the Monitoring module, and #3775 adds tracingCentralHost there; cozystack_tenant_module is a marker without values, so neither needs a change here.

Activity

  1. scooby87 commented on Oct 6, 2026

    @scooby87
    CollaboratorAuthor

    Status update: the upstream side is merged, but this cannot land yet.

    Upstream. cozystack/cozystack#3775 added tracingCentral to the Tenant (TracingCentral bool with +kubebuilder:default:=false, schema {"type": "boolean", "default": false}), and cozystack/cozystack#4648 changed only its description. The field works only together with monitoring: true on the same tenant and with tenant-root hosting the shared store; otherwise the chart fails the tenant's monitoring render with a message naming the prerequisite, so the provider has nothing to validate here.

    Blocker. The provider pins github.com/cozystack/cozystack/api/apps/v1alpha1 to a released tag, and no tag contains the field yet: the latest is api/apps/v1alpha1/v1.6.4. Pinning to a main pseudo-version instead is not a small change either: httpcache was renamed to valkey in the module, so the provider's tests no longer build, and the bump also brings gatewayClass and computeplane on the Tenant plus new fields on other kinds, which the spec-coverage guards then require. So this waits for the first api/apps/v1alpha1 v1.7 tag and will most likely go in together with the rest of the v1.7 sync.

    Correction to "Not needed". As merged, cozystack/cozystack#4648 did not add tracingCentralTenantBytesPerSecond to the Monitoring module: it is a platform key, monitoring.tracingCentralTenantBytesPerSecond in packages/core/platform/values.yaml, carried to tenants through _cluster. The conclusion still holds, because the platform package is outside the provider's typed surface and cozystack_tenant_module is a marker without values.

    Planned change once the tag exists. A tracing_central attribute modelled exactly like monitoring: Optional + Computed with booldefault.StaticBool(false) to match the schema default, expand/flatten, the data source attribute, and tests.

  2. scooby87 commented on Oct 8, 2026

    @scooby87
    CollaboratorAuthor

    Implemented in #67. The pin goes to the cozystack main commit that merged cozystack/cozystack#4648, so the PR also carries the adaptations that commit forces on the provider; the PR description explains why.

  3. scooby87 commented on Oct 14, 2026

    @scooby87
    CollaboratorAuthor

    Done in #67.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions