Cost-Center Label Required (Chargeback)
Every topic must carry metadata.labels.cost-center and metadata.labels.quota-tier in {bronze, silver, gold}.
“So far I don't see us adding cost here, but maybe I can look at limiting. We do could possibly use the limiting portals to manage how much data a client could consume instead of charging them back.”
Rationale
Chargeback without labels is folklore. A mandatory cost-center label makes FinOps joins (storage GB times $/GB by cost-center) deterministic, and a quota-tier label drives broker quota enforcement. Together these two labels turn Kafka storage from a cost black hole into an attributable line item.
Pattern
has(labels.cost-center) AND labels.quota-tier in ['bronze','silver','gold']
Examples
labels: { cost-center: cc-4421, quota-tier: silver, tenant-id: t-ab12cd }
labels: { tenant-id: t-ab12cd } (no cost-center)
labels: { cost-center: cc-4421, quota-tier: platinum } (tier not in allowlist)
Parameters
| Name | Default | Description |
|---|---|---|
cost_center_label |
"cost-center" |
Label key carrying the chargeback cost center. |
quota_tier_label |
"quota-tier" |
Label key carrying the quota tier. |
allowed_tiers |
["bronze","silver","gold"] |
Allowed values for the quota tier. |
Implementation
Drop this YAML into Conduktor Console as a ResourcePolicy, then link it from an ApplicationInstance, Application, or KafkaCluster.
# Conduktor self-service ResourcePolicy # Schema: https://docs.conduktor.io/platform/reference/resource-reference/self-service/#resourcepolicy # Cost-center value is intentionally not regex-checked — any non-empty string is # accepted so platform teams can plug in their own taxonomy. --- apiVersion: self-serve/v1 kind: ResourcePolicy metadata: name: tenant-cost-center-required spec: targetKind: Topic description: Every topic must carry cost-center and quota-tier labels (chargeback / FinOps) rules: - condition: '"cost-center" in metadata.labels && size(metadata.labels["cost-center"]) > 0' errorMessage: "metadata.labels.cost-center is required for chargeback attribution" - condition: '"quota-tier" in metadata.labels && metadata.labels["quota-tier"] in ["bronze", "silver", "gold"]' errorMessage: "metadata.labels.quota-tier must be one of bronze, silver, gold"
Related policies
Try Conduktor Console
Enforce policies like this across your team — central audit history, pre-commit guardrails, ApplicationInstance bindings. 5-min Docker install.
Get Started →