Skip to content

Commit 00ff19e

Browse files
committed
fix(monitoring): default tracing off and defer fail-on-empty guard
tracingStorages had two defaults (extra + system), so 'tracingStorages: null' silently backfilled the inner default and a VTCluster rendered anyway, while 'tracingStorages: []' aborted the whole monitoring release. There was no clean 'off', and the default shipped a 6-pod VTCluster per tenant for a pipeline that nothing writes spans into yet. - Default tracingStorages to [] in both packages/system/monitoring/values.yaml and packages/extra/monitoring/values.yaml, so absence has nothing to fall through to and the generated schema advertises the shipped (off) state. - Drop the fail-on-empty guard in templates/vtraces/vtraces.yaml. Nothing produces spans without a collector, so an absent backend drops no data. The guard belongs with the collector, where it becomes correct: an enabled producer with no backend really would drop spans, the logsStorages #3181 rationale. - healthCheckExprs stay unconditional (Flux evaluates them only against CRs present in the inventory, so they are inert when nothing renders). - Tests: replace the empty-fails case with off-by-default (renders nothing); set tracingStorages explicitly where cases relied on the old default. Signed-off-by: Alexey Artamonov <[email protected]> Assisted-by: LLM
1 parent b24c3e1 commit 00ff19e

8 files changed

Lines changed: 69 additions & 59 deletions

File tree

‎packages/extra/monitoring/README.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555

5656
### Traces storage configuration
5757

58-
| Name | Description | Type | Value |
59-
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------- | ------------ |
60-
| `tracingStorages` | Configuration of traces storage instances. | `[]object` | `[...]` |
61-
| `tracingStorages[i].name` | Name of the storage instance. | `string` | `""` |
62-
| `tracingStorages[i].mode` | Deployment mode: "cluster" renders a VTCluster; "single" renders a single-binary VTSingle for edge/dev/small clusters. | `string` | `cluster` |
63-
| `tracingStorages[i].retentionPeriod` | Retention period for traces. | `string` | `14d` |
64-
| `tracingStorages[i].storage` | Persistent volume size. | `string` | `10Gi` |
65-
| `tracingStorages[i].storageClassName` | StorageClass used to store the data. | `string` | `replicated` |
66-
| `tracingStorages[i].retentionDiskUsageBytes` | Optional disk-usage cap as a byte quantity (e.g. "8GB"); bounds disk in addition to the age-based retentionPeriod. | `string` | `""` |
58+
| Name | Description | Type | Value |
59+
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ------------ |
60+
| `tracingStorages` | Configuration of traces storage instances. Empty by default (tracing off): nothing writes spans until the trace collector ships, so no backend is provisioned. Add an entry to enable a VictoriaTraces backend. | `[]object` | `[]` |
61+
| `tracingStorages[i].name` | Name of the storage instance. | `string` | `""` |
62+
| `tracingStorages[i].mode` | Deployment mode: "cluster" renders a VTCluster; "single" renders a single-binary VTSingle for edge/dev/small clusters. | `string` | `cluster` |
63+
| `tracingStorages[i].retentionPeriod` | Retention period for traces. | `string` | `14d` |
64+
| `tracingStorages[i].storage` | Persistent volume size. | `string` | `10Gi` |
65+
| `tracingStorages[i].storageClassName` | StorageClass used to store the data. | `string` | `replicated` |
66+
| `tracingStorages[i].retentionDiskUsageBytes` | Optional disk-usage cap as a byte quantity (e.g. "8GB"); bounds disk in addition to the age-based retentionPeriod. | `string` | `""` |
6767

6868

6969
### Alerta configuration

‎packages/extra/monitoring/values.schema.json‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,17 +324,9 @@
324324
}
325325
},
326326
"tracingStorages": {
327-
"description": "Configuration of traces storage instances.",
327+
"description": "Configuration of traces storage instances. Empty by default (tracing off): nothing writes spans until the trace collector ships, so no backend is provisioned. Add an entry to enable a VictoriaTraces backend.",
328328
"type": "array",
329-
"default": [
330-
{
331-
"mode": "cluster",
332-
"name": "generic",
333-
"retentionPeriod": "14d",
334-
"storage": "10Gi",
335-
"storageClassName": "replicated"
336-
}
337-
],
329+
"default": [],
338330
"items": {
339331
"type": "object",
340332
"required": [

‎packages/extra/monitoring/values.yaml‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,8 @@ logsStorages:
108108
## @field {string} storageClassName="replicated" - StorageClass used to store the data.
109109
## @field {string} [retentionDiskUsageBytes] - Optional disk-usage cap as a byte quantity (e.g. "8GB"); bounds disk in addition to the age-based retentionPeriod.
110110

111-
## @param {[]TracingStorage} tracingStorages - Configuration of traces storage instances.
112-
tracingStorages:
113-
- name: generic
114-
mode: cluster
115-
retentionPeriod: "14d"
116-
storage: 10Gi
117-
storageClassName: replicated
111+
## @param {[]TracingStorage} tracingStorages - Configuration of traces storage instances. Empty by default (tracing off): nothing writes spans until the trace collector ships, so no backend is provisioned. Add an entry to enable a VictoriaTraces backend.
112+
tracingStorages: []
118113

119114
##
120115
## @section Alerta configuration

0 commit comments

Comments
 (0)