From 17ab07d31ecf0cac0b535353f506e73c405e4ea8 Mon Sep 17 00:00:00 2001 From: IvanHunters Date: Wed, 22 Jul 2026 22:14:42 +0300 Subject: [PATCH] fix(talos-log-collector): correct cpu resource description and add value constraints cpu is a request only (the DaemonSet sets no cpu limit), so the annotation now reads "CPU request." instead of "CPU request and limit.". Add an enum for logLevel and a 1-65535 range for listenPort so an invalid value is rejected at schema validation instead of rendering a broken DaemonSet. Signed-off-by: IvanHunters --- .../system/talos-log-collector/values.schema.json | 15 ++++++++++++--- packages/system/talos-log-collector/values.yaml | 13 +++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/system/talos-log-collector/values.schema.json b/packages/system/talos-log-collector/values.schema.json index 7b7bd28f5..7ca6e513b 100644 --- a/packages/system/talos-log-collector/values.schema.json +++ b/packages/system/talos-log-collector/values.schema.json @@ -5,12 +5,21 @@ "logLevel": { "description": "Vector log verbosity (trace, debug, info, warn, error).", "type": "string", - "default": "warn" + "default": "warn", + "enum": [ + "trace", + "debug", + "info", + "warn", + "error" + ] }, "listenPort": { "description": "TCP port bound on the node loopback (127.0.0.1) where Talos machine.logging pushes logs.", "type": "integer", - "default": 5170 + "default": 5170, + "maximum": 65535, + "minimum": 1 }, "image": { "description": "Vector container image.", @@ -40,7 +49,7 @@ "default": {}, "properties": { "cpu": { - "description": "CPU request and limit.", + "description": "CPU request.", "default": "100m", "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$", "anyOf": [ diff --git a/packages/system/talos-log-collector/values.yaml b/packages/system/talos-log-collector/values.yaml index 46da77f51..f1c369801 100644 --- a/packages/system/talos-log-collector/values.yaml +++ b/packages/system/talos-log-collector/values.yaml @@ -2,10 +2,19 @@ ## @section Common parameters ## -## @param {string} [logLevel] - Vector log verbosity (trace, debug, info, warn, error). +## @enum {string} LogLevel - Vector log verbosity. +## @value trace +## @value debug +## @value info +## @value warn +## @value error + +## @param {LogLevel} [logLevel] - Vector log verbosity (trace, debug, info, warn, error). logLevel: warn ## @param {int} [listenPort] - TCP port bound on the node loopback (127.0.0.1) where Talos machine.logging pushes logs. +## @minimum 1 +## @maximum 65535 listenPort: 5170 ## @typedef {struct} Image - Vector container image. @@ -20,7 +29,7 @@ image: pullPolicy: IfNotPresent ## @typedef {struct} Resources - Compute resources for the collector. -## @field {quantity} [cpu] - CPU request and limit. +## @field {quantity} [cpu] - CPU request. ## @field {quantity} [memory] - Memory request and limit. ## @param {Resources} [resources] - Compute resources for the collector.