Declaring what is billed
apiVersion: libra.helmetica.io/v1
kind: BillingData
metadata:
name: sample
spec:
metadata:
sla: besteffort
items:
- name: replicas
value: "1"
- name: storage
value: 10Gi
An empty spec is valid: it builds a record with no items.
| Field | Default | Meaning |
|---|---|---|
|
none |
Free text that applies to every item, such as the SLA. |
|
none |
At most 64 entries. |
|
required |
What is billed. Each name may appear once. |
|
required |
How much, as a Kubernetes quantity: |
|
|
Holds the object at |
The result is reported back on the object:
| Status field | Meaning |
|---|---|
|
|
|
What happened. For |
|
The claim the record is billed to. |
|
The record libra is about to write. A retry uses the same key. |
|
The last record written to S3. |
Where the BillingData comes from
The service chart renders it from its own values, so the chart author decides what is billable and the values are final before they reach the cluster. Making them easier to trace and debug.
Where the claim comes from
Libra never reads the claim. Chrysopoeia provides annotations to every instance namespace with the claim it belongs to, and libra reads it from there:
chrysopoeia.io/claim-apiVersion, claim-kind, claim-namespace,
claim-name, claim-uid.
If one is missing or empty, the BillingData goes Failed and the message
names the missing ones. Libra watches namespaces, so it turns Ready on its
own once the annotations appear.