Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions config/components/service-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ API-surface repo.
| Kind | Name | What it declares |
| ---------------------- | ----------------------------- | --------------------------------------------------------------------------- |
| `Service` | `dns-networking-miloapis-com` | `serviceName`, display metadata, producer owner. |
| `ServiceConfiguration` | `dns-networking-miloapis-com` | DNS MonitoredResourceTypes, metrics, and billing routing. _(Phase 2 — TBD)_ |
| `ServiceConfiguration` | `dns-networking-miloapis-com` | DNS MonitoredResourceTypes, metrics, and billing routing. |

Ships in `phase: Published`.

Expand All @@ -40,10 +40,11 @@ objects stamped `app.kubernetes.io/managed-by: services-operator`.
Producers must not author those downstream CRDs directly — edit the
`ServiceConfiguration` and let the fan-out catch up.

The DNS `ServiceConfiguration` is tracked as Phase 2 of the catalog
registration (metering): query volume, hosted zones, and record-set
inventory. See the
[catalog registration issue](https://github.com/datum-cloud/dns-operator/issues/44).
The DNS `ServiceConfiguration` meters three signals: authoritative
query volume (`zone/queries`), hosted-zone footprint (`zone/hosted`),
and record-set inventory (`recordset/active`). Declaring `zone/queries`
is the metering contract; emitting those query events from the PowerDNS
data plane is the remaining usage-pipeline work.

## Immutability after `Published`

Expand Down
7 changes: 3 additions & 4 deletions config/components/service-catalog/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ kind: Kustomization
#
# 1. The `Service` itself (`dns-networking-miloapis-com`), which carries
# identity (`serviceName`), display metadata, and producer owner.
# (Phase 1 — service registration.)
# 2. A single `ServiceConfiguration` (same name, different Kind) that
# will declare the DNS MonitoredResourceTypes, metrics, and billing
# routing. (Phase 2 — metering; not yet authored.)
# declares the DNS MonitoredResourceTypes, metrics, and billing
# routing.
#
# Per billing's `emitting-usage.md`, the `ServiceConfiguration` is the
# *only* document a producer authors for billing: the services-operator
Expand All @@ -27,4 +26,4 @@ kind: Kustomization
# repo, the same way other services publish their catalog entries.
resources:
- services_v1alpha1_service_dns.yaml
# - services_v1alpha1_serviceconfiguration_dns.yaml # added in Phase 2
- services_v1alpha1_serviceconfiguration_dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# SPDX-License-Identifier: AGPL-3.0-only

# DNS metering. The services-operator fans this out into billing
# MeterDefinition/MonitoredResourceType objects; don't author those directly.
apiVersion: services.miloapis.com/v1alpha1
kind: ServiceConfiguration
metadata:
labels:
app.kubernetes.io/name: dns-operator
app.kubernetes.io/managed-by: kustomize
name: dns-networking-miloapis-com
spec:
serviceRef:
name: dns-networking-miloapis-com
phase: Published
version: v1
monitoredResourceTypes:
- type: dns.networking.miloapis.com/DNSZone
displayName: DNS Zone
description: |
An authoritative DNS zone, billed on per-zone footprint (zones),
authoritative query volume (zone/queries), and total record inventory
(records/active via Status.RecordCount).
gvk:
group: dns.networking.miloapis.com
kind: DNSZone
labels:
- name: location
description: Datum point-of-presence / region serving the zone or query.
- name: rcode
description: DNS response code for answered queries (NOERROR, NXDOMAIN, SERVFAIL).
- name: record_type
description: Queried record type (A, AAAA, CNAME, TXT, MX, ...).
metrics:
- name: dns.networking.miloapis.com/zone/queries
displayName: DNS Queries
description: Authoritative queries answered for a zone (primary consumption signal).
kind: Delta
unit: "{query}"
dimensions:
- rcode
- record_type
- location
- name: dns.networking.miloapis.com/zones
displayName: Hosted DNS Zones
description: Active hosted-zone footprint (gauge, 1 per active DNSZone).
kind: Gauge
unit: "{zone}"
dimensions:
- location
- name: dns.networking.miloapis.com/records/active
displayName: Active DNS Records
description: Individual DNS records under management (gauge, counted across all record sets).
kind: Gauge
unit: "{record}"
dimensions:
- record_type
- location
billing:
consumerDestinations:
- monitoredResourceType: dns.networking.miloapis.com/DNSZone
metrics:
- dns.networking.miloapis.com/zone/queries
- dns.networking.miloapis.com/zones
- dns.networking.miloapis.com/records/active
Loading