feat(talos-log-collector): add talos-log-collector package - #3260
feat(talos-log-collector): add talos-log-collector package#3260IvanHunters wants to merge 12 commits into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds a Talos log collector system package using a Vector DaemonSet. It includes Helm resources, configurable values and schema, rendered-template tests, documentation, a mirrored image, and platform/build integration. ChangesTalos Log Collector Package
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Talos
participant Vector
participant VictoriaLogs
Talos->>Vector: Send JSON logs to 127.0.0.1:5170
Vector->>VictoriaLogs: POST compressed NDJSON to vlinsert-generic
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
bddc1d5 to
cf184fe
Compare
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request adds the Highlights
New Features🧠 You can now enable Memory (public preview) to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on Gemini (@gemini-code-assist) comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/system/talos-log-collector/tests/talos-log-collector_test.yaml (1)
88-102: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding test coverage for ServiceAccount and CiliumNetworkPolicy.
The suite covers the receive/forward wiring well, but the ServiceAccount (disabled token automount) and CiliumNetworkPolicy (ingress restricted to host entity) are security-relevant templates with no test coverage. A separate test suite or expanded suite-level
templates:list would guard these against regression.💡 Suggested additional test cases
+ - it: "ServiceAccount has token automount disabled" + template: templates/serviceaccount.yaml + asserts: + - equal: + path: automountServiceAccountToken + value: false + + - it: "CiliumNetworkPolicy restricts ingress to host entity on listen port" + template: templates/networkpolicy.yaml + asserts: + - hasDocuments: + count: 1 + - matchRegex: + path: spec.ingresss[0].toPorts[0].ports[0].port + pattern: "5170"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml` around lines 88 - 102, Add test coverage for the security-relevant templates that are currently untested: the ServiceAccount should assert token automount is disabled, and the CiliumNetworkPolicy should assert ingress is restricted to the host entity. Update the talos-log-collector test suite in talos-log-collector_test.yaml by either expanding the suite-level templates list or adding a separate suite that targets the ServiceAccount and CiliumNetworkPolicy templates, using their template names to keep the checks stable against refactors.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/system/talos-log-collector/README.md`:
- Around line 65-66: Update the resources table in README so the `resources.cpu`
entry matches `daemonset.yaml`: it is request-only, not request-and-limit. Keep
the `resources.memory` description unchanged, and make sure the wording for
`resources.cpu` reflects the actual behavior of the `resources` settings in
`packages/system/talos-log-collector/templates/daemonset.yaml`.
---
Nitpick comments:
In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml`:
- Around line 88-102: Add test coverage for the security-relevant templates that
are currently untested: the ServiceAccount should assert token automount is
disabled, and the CiliumNetworkPolicy should assert ingress is restricted to the
host entity. Update the talos-log-collector test suite in
talos-log-collector_test.yaml by either expanding the suite-level templates list
or adding a separate suite that targets the ServiceAccount and
CiliumNetworkPolicy templates, using their template names to keep the checks
stable against refactors.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 35325edd-dd66-4e0f-9c52-c7e9ab51d4f9
📒 Files selected for processing (15)
Makefilepackages/core/platform/sources/talos-log-collector.yamlpackages/core/platform/templates/bundles/system.yamlpackages/system/talos-log-collector/Chart.yamlpackages/system/talos-log-collector/Makefilepackages/system/talos-log-collector/README.mdpackages/system/talos-log-collector/images/vector/Dockerfilepackages/system/talos-log-collector/templates/_helpers.tplpackages/system/talos-log-collector/templates/configmap.yamlpackages/system/talos-log-collector/templates/daemonset.yamlpackages/system/talos-log-collector/templates/networkpolicy.yamlpackages/system/talos-log-collector/templates/serviceaccount.yamlpackages/system/talos-log-collector/tests/talos-log-collector_test.yamlpackages/system/talos-log-collector/values.schema.jsonpackages/system/talos-log-collector/values.yaml
There was a problem hiding this comment.
Code Review
This pull request introduces the talos-log-collector package, which deploys a node-local Vector DaemonSet to collect Talos machine and kernel logs and forward them to VictoriaLogs. The feedback suggests using the dig function in the ConfigMap template to safely access .Values.global.target and avoid nil pointer errors, updating the PR scope to comply with the repository's conventional commit guidelines, and adding the CriticalAddonsOnly toleration to the DaemonSet to ensure proper scheduling on control-plane nodes.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| victorialogs: | ||
| type: http | ||
| inputs: [tag] | ||
| uri: "http://vlinsert-generic.{{ .Values.global.target }}.svc:9481/insert/jsonline?_stream_fields=node,log_source,talos-service,facility&_msg_field=msg&_time_field=talos-time" |
There was a problem hiding this comment.
Directly accessing .Values.global.target can cause a nil pointer evaluation error if .Values.global is overridden or not defined in the parent chart or values. Using the Sprig dig function provides a safe fallback and prevents template rendering failures.
uri: "http://vlinsert-generic.{{ dig \"global\" \"target\" \"tenant-root\" .Values }}.svc:9481/insert/jsonline?_stream_fields=node,log_source,talos-service,facility&_msg_field=msg&_time_field=talos-time"| --- | ||
| apiVersion: cozystack.io/v1alpha1 | ||
| kind: PackageSource | ||
| metadata: | ||
| name: cozystack.talos-log-collector |
There was a problem hiding this comment.
The PR title and release note block use the scope system (e.g., feat(system): ...). According to the Cozystack Review Guidelines, system is not a valid scope. Please update the PR title and release note to use a valid scope, such as the package-specific scope talos-log-collector or platform.
References
- Each commit must follow Conventional Commits format:
type(scope): brief description. Valid scopes include package-specific scopes matching a directory underpackages/. (link)
| tolerations: | ||
| - effect: NoSchedule | ||
| operator: Exists | ||
| - effect: NoExecute | ||
| operator: Exists |
There was a problem hiding this comment.
For system-critical DaemonSets running on all nodes, it is recommended to explicitly tolerate the CriticalAddonsOnly taint. This ensures the log collector can schedule and run on control-plane nodes that have this taint applied.
tolerations:
- effect: NoSchedule
operator: Exists
- effect: NoExecute
operator: Exists
- key: CriticalAddonsOnly
operator: Existscf184fe to
0513194
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/system/talos-log-collector/templates/daemonset.yaml (1)
35-69: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winConsider adding a liveness probe for the system-node-critical DaemonSet.
Without a
livenessProbe, Kubernetes cannot detect a hung Vector process. A TCP probe on the listen port is a minimal safeguard; enabling Vector's internal API for an HTTP health check would be more thorough.♻️ Suggested liveness probe
args: ["--config", "/etc/vector/vector.yaml"] + livenessProbe: + tcpSocket: + port: talos + initialDelaySeconds: 10 + periodSeconds: 30 env:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/templates/daemonset.yaml` around lines 35 - 69, Add a livenessProbe to the DaemonSet container in the vector template so Kubernetes can detect a hung Vector process. Use the existing VECTOR listener port on the vector container (the same listenPort/hostPort target) and wire it into the containers spec near the current ports/resources settings. If you choose a more thorough check later, enable Vector’s internal API and switch to an HTTP health probe, but for now a TCP probe is the minimal fix.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/system/talos-log-collector/templates/daemonset.yaml`:
- Around line 35-69: Add a livenessProbe to the DaemonSet container in the
vector template so Kubernetes can detect a hung Vector process. Use the existing
VECTOR listener port on the vector container (the same listenPort/hostPort
target) and wire it into the containers spec near the current ports/resources
settings. If you choose a more thorough check later, enable Vector’s internal
API and switch to an HTTP health probe, but for now a TCP probe is the minimal
fix.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ac821759-03db-45f1-81ad-6c592bafb079
📒 Files selected for processing (15)
Makefilepackages/core/platform/sources/talos-log-collector.yamlpackages/core/platform/templates/bundles/system.yamlpackages/system/talos-log-collector/Chart.yamlpackages/system/talos-log-collector/Makefilepackages/system/talos-log-collector/README.mdpackages/system/talos-log-collector/images/vector/Dockerfilepackages/system/talos-log-collector/templates/_helpers.tplpackages/system/talos-log-collector/templates/configmap.yamlpackages/system/talos-log-collector/templates/daemonset.yamlpackages/system/talos-log-collector/templates/networkpolicy.yamlpackages/system/talos-log-collector/templates/serviceaccount.yamlpackages/system/talos-log-collector/tests/talos-log-collector_test.yamlpackages/system/talos-log-collector/values.schema.jsonpackages/system/talos-log-collector/values.yaml
✅ Files skipped from review due to trivial changes (3)
- packages/system/talos-log-collector/templates/_helpers.tpl
- packages/system/talos-log-collector/values.yaml
- packages/system/talos-log-collector/README.md
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/core/platform/sources/talos-log-collector.yaml
- packages/system/talos-log-collector/Chart.yaml
- packages/system/talos-log-collector/values.schema.json
- Makefile
- packages/system/talos-log-collector/images/vector/Dockerfile
- packages/core/platform/templates/bundles/system.yaml
- packages/system/talos-log-collector/tests/talos-log-collector_test.yaml
|
I think we should use already existing package monitoring-agents and add opt-in (default disabled) parameter to enable enpoints for accepting talos jsonlines logs. Additionaly, I don't think using vector is justified. It's another technology and possible new problems. On the other hand, using fluent-bit would be more straight-forward and we'd know what to expect. |
Add a node-local Vector DaemonSet that receives Talos machine and kernel logs (pushed via machine.logging over the node loopback) and forwards them to the tenant VictoriaLogs. Talos keeps its system and kernel logs inside the OS and does not expose them as host files, so the tail-based Fluent Bit in monitoring-agents never collects them. The receiver stays on the pod network so cluster DNS resolves the vlinsert service, and accepts Talos logs via a hostPort bound to hostIP 127.0.0.1, avoiding the host-network DNS breakage a hostNetwork receiver would hit. Shipped as an optional system package. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
0513194 to
1fb4bcf
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (3)
packages/system/talos-log-collector/tests/talos-log-collector_test.yaml (2)
41-51: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTolerations test only covers NoSchedule; NoExecute is unverified.
The suite comment states "runs on every node (tolerate everything)" but the assertion only checks the
NoScheduletoleration. The DaemonSet template also includes aNoExecutetoleration. Adding an assertion for it would complete the coverage claim.♻️ Suggested additional assertion
- contains: path: spec.template.spec.tolerations content: effect: NoSchedule operator: Exists + - contains: + path: spec.template.spec.tolerations + content: + effect: NoExecute + operator: Exists🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml` around lines 41 - 51, Add an assertion to the “runs on every node and is node-critical” test verifying that the DaemonSet tolerations also include effect: NoExecute with operator: Exists, alongside the existing NoSchedule assertion.
20-27: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding a digest-pinning assertion for the image.
The regex verifies the first-party repository but doesn't assert that the image is digest-pinned (
sha256:). Other system packages in the repo use patterns likevector:.+sha256:to enforce immutability without coupling to a specific digest. A separate assertion would guard against accidental non-pinned tags.Based on learnings, in the cozystack/cozystack repo it is acceptable and intentional for image-pin assertions to use tag/digest-agnostic regexes that verify digest pinning (e.g.,
:.+sha256:) rather than a specific full digest value.♻️ Suggested additional assertion
- it: "DaemonSet pulls the first-party vector image from the cozystack registry" template: templates/daemonset.yaml asserts: - isKind: of: DaemonSet - matchRegex: path: spec.template.spec.containers[0].image pattern: "^ghcr\\.io/cozystack/cozystack/vector:" + - matchRegex: + path: spec.template.spec.containers[0].image + pattern: "sha256:"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml` around lines 20 - 27, Add a separate matchRegex assertion for spec.template.spec.containers[0].image in the DaemonSet test, using a pattern such as `:.+sha256:` to require a digest-pinned image while remaining independent of the specific digest.Source: Learnings
packages/system/talos-log-collector/templates/daemonset.yaml (1)
35-69: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winConsider adding a liveness probe for hang detection.
No liveness probe is configured. If Vector hangs (e.g., deadlock or resource exhaustion), the pod stays
Runningbut silently stops collecting logs — particularly impactful for asystem-node-criticalDaemonSet. Enabling Vector's built-in health endpoint and adding an HTTP liveness probe is a small change with significant reliability benefit.💡 Proposed liveness probe addition
In
configmap.yaml, enable the Vector API (bound to loopback so it's not exposed to other pods):data_dir: /vector-data + api: + enabled: true + address: 127.0.0.1:52000 sources:In
daemonset.yaml, add the probe:args: ["--config", "/etc/vector/vector.yaml"] + livenessProbe: + httpGet: + path: /health + port: 52000 + host: 127.0.0.1 + initialDelaySeconds: 10 + periodSeconds: 30 env:🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/templates/daemonset.yaml` around lines 35 - 69, Add Vector’s built-in health API configuration to the chart’s configmap and add an HTTP liveness probe to the vector container in the DaemonSet, targeting the loopback API health endpoint and the configured listen port. Ensure the probe uses appropriate delay, timeout, and failure thresholds without exposing the API beyond the node.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/system/talos-log-collector/templates/daemonset.yaml`:
- Around line 35-69: Add Vector’s built-in health API configuration to the
chart’s configmap and add an HTTP liveness probe to the vector container in the
DaemonSet, targeting the loopback API health endpoint and the configured listen
port. Ensure the probe uses appropriate delay, timeout, and failure thresholds
without exposing the API beyond the node.
In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml`:
- Around line 41-51: Add an assertion to the “runs on every node and is
node-critical” test verifying that the DaemonSet tolerations also include
effect: NoExecute with operator: Exists, alongside the existing NoSchedule
assertion.
- Around line 20-27: Add a separate matchRegex assertion for
spec.template.spec.containers[0].image in the DaemonSet test, using a pattern
such as `:.+sha256:` to require a digest-pinned image while remaining
independent of the specific digest.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4f6d193b-785b-41b2-99cd-1df5f125107f
📒 Files selected for processing (15)
Makefilepackages/core/platform/sources/talos-log-collector.yamlpackages/core/platform/templates/bundles/system.yamlpackages/system/talos-log-collector/Chart.yamlpackages/system/talos-log-collector/Makefilepackages/system/talos-log-collector/README.mdpackages/system/talos-log-collector/images/vector/Dockerfilepackages/system/talos-log-collector/templates/_helpers.tplpackages/system/talos-log-collector/templates/configmap.yamlpackages/system/talos-log-collector/templates/daemonset.yamlpackages/system/talos-log-collector/templates/networkpolicy.yamlpackages/system/talos-log-collector/templates/serviceaccount.yamlpackages/system/talos-log-collector/tests/talos-log-collector_test.yamlpackages/system/talos-log-collector/values.schema.jsonpackages/system/talos-log-collector/values.yaml
✅ Files skipped from review due to trivial changes (6)
- packages/system/talos-log-collector/values.yaml
- packages/system/talos-log-collector/Chart.yaml
- packages/system/talos-log-collector/templates/_helpers.tpl
- Makefile
- packages/system/talos-log-collector/images/vector/Dockerfile
- packages/system/talos-log-collector/README.md
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/system/talos-log-collector/values.schema.json
- packages/core/platform/templates/bundles/system.yaml
- packages/core/platform/sources/talos-log-collector.yaml
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
NOT LGTM — the documented Talos config does not deliver kernel logs (the package's headline promise), and the CiliumNetworkPolicy that the comment calls optional is in fact the only thing preventing log injection from any pod in the cluster.
Business context: Talos keeps machine and kernel logs inside the OS, where the existing file-tail collector cannot reach them, so this package adds a node-local receiver that Talos pushes into and that forwards to the platform's VictoriaLogs.
Blockers
B1: The required Talos config delivers service logs only — kernel/kmsg logs never arrive
File: packages/system/talos-log-collector/README.md:20-22 (and the config block at :29-35)
Issue: The README states that machine.logging "already forwards the runtime kernel (kmsg) stream as the kernel service ... so no separate KmsgLogConfig is needed". Talos does not work that way.
Evidence: Checked against Talos v1.12.0 and v1.13.0 source (v1.13.6 is what this platform ships, packages/apps/kubernetes/values.yaml:291). KmsgLogConfigController builds its destination list from exactly two sources — the talos.logging.kernel kernel command-line parameter, and cfg.Config().Runtime().KmsgLogURLs() (internal/app/machined/pkg/controllers/runtime/kmsg_log_config.go). KmsgLogURLs() is aggregated across config documents, and the only document returning a non-empty list is KmsgLogV1Alpha1, i.e. the KmsgLogConfig document (pkg/machinery/config/types/runtime/kmsg_log.go); EventSinkV1Alpha1 and WatchdogTimerV1Alpha1 both return nil. The v1alpha1 config type that owns machine.logging.destinations does not implement KmsgLogURLs at all — grepping it across pkg/machinery/config/types/v1alpha1/ returns nothing on both tags. machine.logging.destinations feeds only updateLoggingConfig → the JSON-lines service-log senders (internal/app/machined/pkg/runtime/v1alpha2/v1alpha2_controller.go:586), and the string kernel does not appear anywhere under internal/app/machined/pkg/runtime/logging/. The chart itself assumes both streams share the socket: facility is a kmsg-only field, and it is listed in _stream_fields (templates/configmap.yaml:29).
Impact: An operator applying exactly the "Talos configuration (required)" block gets service logs and nothing else. Kernel logs — including the DRBD kmsg case named in the PR description, which is the operationally interesting one here — silently never arrive, while Chart.yaml:3, the README opening, the package name and the PR title all promise them. If kernel logs did show up on the dev cluster, that node almost certainly also carried talos.logging.kernel= in its kernel args, or a KmsgLogConfig document from earlier setup; the README snippet alone cannot produce them.
Fix: Add the kmsg destination to the required-config section — a KmsgLogConfig document, or talos.logging.kernel=tcp://127.0.0.1:5170/ in the kernel args, either of which can point at the same port — or drop the kernel-log claim from the README, Chart.yaml and _stream_fields.
B2: The comment calls the network policy optional; it is the only thing preventing any pod from injecting logs
File: packages/system/talos-log-collector/templates/networkpolicy.yaml:5-8
Issue: "even without this policy the loopback hostPort is not reachable from the pod network, so its absence is safe" is false, and it contradicts the sentence three lines above it.
Evidence: Vector binds every address inside the pod network namespace — address: 0.0.0.0:{{ .Values.listenPort }} (templates/configmap.yaml:15), exposed as containerPort (templates/daemonset.yaml:49). The pod's own IP is routable from every pod in the cluster; the hostPort is irrelevant to that path. Any workload can open a TCP connection to <podIP>:5170 and push JSON lines, which the tag transform stamps with .log_source = "talos_system" and the real .node name (templates/configmap.yaml:22-24) before inserting them into the platform's VictoriaLogs. The policy is load-bearing, not defence-in-depth. It is also conditional — {{- if .Capabilities.APIVersions.Has "cilium.io/v2/CiliumNetworkPolicy" }} (networkpolicy.yaml:1); helm template with default capabilities renders only ServiceAccount, ConfigMap and DaemonSet. The isp-hosted system-bundle variant installs the noop networking variant (packages/core/platform/templates/bundles/system.yaml:32) — no Cilium, hence no cilium.io/v2 CRD — and the optional-package line this PR adds (system.yaml:229) sits in the variant-agnostic tail of that file, so the package is offerable there with no ingress protection whatsoever.
Impact: Forged log records attributed to a trusted source label and a real node name in the platform's log store — an audit and forensic integrity problem, reachable from any tenant workload wherever the policy does not render.
Fix: Correct the comment, and ship a CNI-agnostic networking.k8s.io/v1 NetworkPolicy as a fallback so the socket is never unprotected — or make Cilium a hard requirement of the package and fail rendering without it.
B3: resources.cpu is documented as a request and a limit; only a request is set
File: packages/system/talos-log-collector/values.yaml:23
Issue: ## @field {quantity} [cpu] - CPU request and limit. — but the DaemonSet sets requests.cpu with no CPU limit (templates/daemonset.yaml:53-58); only memory is request-and-limit. The wrong description propagates into values.schema.json:43 and README.md:65.
Evidence: templates/daemonset.yaml:53-58 — the limits: block contains memory only.
Impact: The generated user-facing docs and the values schema describe behaviour the chart does not implement.
Fix: Reword the annotation to "CPU request." and regenerate (make generate in the package). Omitting the CPU limit is the right call; only the description is wrong.
The package ships a helm-unittest suite, so each of the three needs a case that fails without the fix — a resources assertion for B3, and for B2 an assertion pinning what renders when the Cilium CRD is absent.
Non-blocking follow-ups
-
The loopback
hostIPworks only because the platform chains theportmapCNI plugin ahead of Cilium (packages/system/cilium/templates/cni.yaml:"type": "portmap", "snat": true, pulled in viavalues-kubeovn.yamlon thekubeovn-cilium*variants). Cilium's own eBPF hostPort implementation does not support binding a hostPort to the loopback address. Thecilium,cilium-genericandcilium-kilovariants inpackages/core/platform/sources/networking.yamlare not selected by any bundle today, but if one ever is, this receiver silently stops receiving. Worth stating in the DaemonSet comment. -
Every record from the existing node agent carries
tenantandcluster(packages/system/monitoring-agents/values.yaml:440-444); records from this pipeline carry neither. Same log store, two schemas — operators filtering on those fields will not see Talos logs. -
No liveness probe on a
system-node-criticalDaemonSet with a hard 128Mi limit. A wedged or OOM-looping Vector is invisible and never restarted. Enabling Vector's health endpoint and probing it would let the DaemonSet self-heal. -
values.schema.jsoncarries no constraints:logLevellists its valid values in prose but has noenum, andlistenPorthas nominimum/maximum, so0or70000validate and then render an invalid DaemonSet. -
make update(Makefile:10-12) rewrites the Dockerfile'sARG VERSIONbut leavesChart.yaml'sappVersion: "0.56.0"untouched, so the two drift on the next bump. -
The README never says why the existing node-level agent was not extended instead. The answer looks legitimate — the vendored fluent-bit chart renders only
name/containerPort/protocolforextraPorts(charts/fluent-bit/templates/_pod.tpl:72-78), so a loopback receiver there would need a chart patch — but every reader will ask, and one sentence in the README would preempt it.
For what it is worth, the parts that are right are right: registration matches the hetzner-robotlb precedent exactly, install.privileged: true is genuinely required (PSA baseline forbids a non-zero hostPort), the generated schema and README are free of codegen drift, and the chart lints and its unit tests pass.
| network, the outbound path to vlinsert keeps working; the inbound loopback | ||
| socket is provided by the hostPort. `machine.logging` already forwards the | ||
| runtime kernel (kmsg) stream as the `kernel` service (verified on Talos v1.12), | ||
| so no separate `KmsgLogConfig` is needed for runtime kernel logs. |
There was a problem hiding this comment.
This is not how Talos delivers kmsg. In Talos v1.12/v1.13, KmsgLogConfigController takes its destinations only from the talos.logging.kernel kernel parameter and from Runtime().KmsgLogURLs() — and the only config document that returns a URL there is KmsgLogConfig (KmsgLogV1Alpha1). The v1alpha1 type that owns machine.logging.destinations does not implement KmsgLogURLs at all; that setting feeds only the JSON-lines service-log senders.
So an operator who applies exactly the config block below gets service logs and no kernel logs — including the DRBD kmsg case the PR description calls out. Note the chart already assumes otherwise: facility is a kmsg-only field and it is in _stream_fields (templates/configmap.yaml:29).
Either add the kmsg destination to the required config (a KmsgLogConfig document, or talos.logging.kernel=tcp://127.0.0.1:5170/ — it can point at the same port), or drop the kernel-log claim from the README, Chart.yaml:3 and _stream_fields. If kernel logs did arrive on your dev cluster, that node very likely already had one of those two in place.
| # the "host" entity. Restrict ingress on the listen port to host only, so other | ||
| # pods on the pod network cannot inject spoofed talos_system log lines. | ||
| # Defense-in-depth and Cilium-only: even without this policy the loopback | ||
| # hostPort is not reachable from the pod network, so its absence is safe. |
There was a problem hiding this comment.
"its absence is safe" is not true, and it contradicts the sentence three lines up.
Vector binds 0.0.0.0 inside the pod netns (templates/configmap.yaml:15) and it is exposed as containerPort (templates/daemonset.yaml:49). The pod IP is routable from every pod in the cluster — the hostPort is irrelevant to that path. Any workload can connect to <podIP>:5170 and push JSON lines that the tag transform stamps with .log_source = "talos_system" and the real node name, straight into VictoriaLogs.
This policy is load-bearing, not defence-in-depth — and it is gated on the Cilium CRD being present (line 1). The isp-hosted bundle variant runs the noop networking variant (bundles/system.yaml:32, no Cilium), while the optional-package line this PR adds sits in the variant-agnostic tail of the same file — so the package can ship there with no ingress protection at all.
Please fix the comment and add a CNI-agnostic networking.k8s.io/v1 NetworkPolicy fallback, or make Cilium a hard requirement and fail rendering without it.
| pullPolicy: IfNotPresent | ||
|
|
||
| ## @typedef {struct} Resources - Compute resources for the collector. | ||
| ## @field {quantity} [cpu] - CPU request and limit. |
There was a problem hiding this comment.
cpu is a request only — templates/daemonset.yaml:53-58 puts just memory under limits:. (Only memory is genuinely request-and-limit.) This description propagates into values.schema.json:43 and README.md:65, so both currently document behaviour the chart does not implement.
Not setting a CPU limit is the right call; just reword to "CPU request." and re-run make generate.
…lue 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 <xorokhotnikov@gmail.com>
…el logs machine.logging.destinations only carries the JSON-lines service logs; Talos builds its kmsg destination list solely from KmsgLogConfig documents and the talos.logging.kernel= kernel argument. The previous README claimed machine.logging alone forwarded the kernel stream, so an operator following it collected service logs only and the kernel (kmsg) logs, including the DRBD messages this package targets, silently never arrived. Add the required KmsgLogConfig document to the node configuration and explain both paths. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Vector binds 0.0.0.0 inside the pod netns and exposes it as a containerPort, so any pod could reach <podIP>:<listenPort> and inject forged talos_system log lines. The ingress restriction is therefore load-bearing, not defence-in-depth as the comment claimed. The CiliumNetworkPolicy only rendered when the Cilium CRD was present, leaving the receiver unprotected on non-Cilium variants (e.g. isp-hosted / noop networking). Correct the comment and, when the Cilium CRD is absent, fall back to a default-deny-ingress networking.k8s.io/v1 NetworkPolicy so the socket is never offered without protection. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
Records from monitoring-agents carry tenant and cluster fields; records from this pipeline carried neither, so operators filtering the shared log store on those fields did not see Talos logs. Stamp .tenant (the destination tenant) and .cluster (root-cluster, matching monitoring-agents) and add both to the vlinsert _stream_fields. Guard the target lookup with a default so a missing global.target does not break rendering. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
…pendency Without a liveness probe a wedged Vector on this system-node-critical DaemonSet is never restarted. Add a tcpSocket probe on the listen port, which the ingress policy already permits from the node. Document that the loopback hostPort depends on the portmap CNI plugin chained ahead of Cilium: the plain cilium/cilium-generic/cilium-kilo variants cannot bind a hostPort to 127.0.0.1. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
make update bumped the Dockerfile ARG VERSION but left Chart.yaml appVersion untouched, so the two drifted on every upstream bump. Update appVersion in the same target. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
…nd probe Add cases that fail without the accompanying fixes: the default-deny networking.k8s.io/v1 NetworkPolicy rendered when the Cilium CRD is absent, cpu being request-only while memory is request-and-limit, the tcpSocket liveness probe, the tenant/cluster stream fields, and the NoExecute toleration. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
packages/system/talos-log-collector/tests/talos-log-collector_test.yaml (1)
78-86: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAssert the tenant label alongside the destination override.
This test verifies that
global.targetchanges the vlinsert hostname, but not that Vector stamps records with the same tenant. Add an assertion for.tenant = "tenant-ktj"to prevent routing and stream-label mismatches.Suggested assertion
- matchRegex: path: data["vector.yaml"] pattern: "vlinsert-generic\\.tenant-ktj\\.svc:9481" + - matchRegex: + path: data["vector.yaml"] + pattern: '\.tenant = "tenant-ktj"'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml` around lines 78 - 86, Add a second assertion to the “destination tenant is overridable via global.target” test that verifies Vector’s generated configuration sets the tenant label to “tenant-ktj” alongside the existing vlinsert hostname assertion. Keep the current destination override assertion unchanged.packages/system/talos-log-collector/README.md (1)
8-14: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep ordinary Markdown prose on one physical line.
The changed prose paragraphs are wrapped across multiple source lines. Reflow these paragraphs while retaining meaningful breaks in lists, blockquotes, tables, and fenced code.
As per coding guidelines, Markdown prose paragraphs must use one continuous line.
Also applies to: 18-22, 24-25, 38-40
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/system/talos-log-collector/README.md` around lines 8 - 14, Reflow the ordinary Markdown prose paragraphs in the README, including the paragraphs at the referenced sections, so each paragraph occupies one physical source line. Preserve meaningful line breaks in lists, blockquotes, tables, and fenced code blocks, and do not alter the prose content.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/system/talos-log-collector/README.md`:
- Around line 55-57: Remove the blank line within the blockquote warning in the
KmsgLogConfig documentation so the service-log and kernel-log statements remain
one continuous blockquote and satisfy markdownlint MD028.
In `@packages/system/talos-log-collector/templates/networkpolicy.yaml`:
- Around line 11-13: Replace the .Capabilities.APIVersions.Has gate in the
network policy template with an explicit prerequisite that verifies Cilium
policy enforcement is active, not merely that its CRD is installed. Ensure
unsupported, NOOP, or BYO networking configurations do not render an unprotected
listener; fail closed or select only a known-enforcing network path before
allowing the Cilium-specific policy.
---
Nitpick comments:
In `@packages/system/talos-log-collector/README.md`:
- Around line 8-14: Reflow the ordinary Markdown prose paragraphs in the README,
including the paragraphs at the referenced sections, so each paragraph occupies
one physical source line. Preserve meaningful line breaks in lists, blockquotes,
tables, and fenced code blocks, and do not alter the prose content.
In `@packages/system/talos-log-collector/tests/talos-log-collector_test.yaml`:
- Around line 78-86: Add a second assertion to the “destination tenant is
overridable via global.target” test that verifies Vector’s generated
configuration sets the tenant label to “tenant-ktj” alongside the existing
vlinsert hostname assertion. Keep the current destination override assertion
unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0f25d9ef-7118-47de-a580-9224bac3b0e9
📒 Files selected for processing (8)
packages/system/talos-log-collector/Makefilepackages/system/talos-log-collector/README.mdpackages/system/talos-log-collector/templates/configmap.yamlpackages/system/talos-log-collector/templates/daemonset.yamlpackages/system/talos-log-collector/templates/networkpolicy.yamlpackages/system/talos-log-collector/tests/talos-log-collector_test.yamlpackages/system/talos-log-collector/values.schema.jsonpackages/system/talos-log-collector/values.yaml
🚧 Files skipped from review as they are similar to previous changes (5)
- packages/system/talos-log-collector/values.yaml
- packages/system/talos-log-collector/templates/configmap.yaml
- packages/system/talos-log-collector/values.schema.json
- packages/system/talos-log-collector/Makefile
- packages/system/talos-log-collector/templates/daemonset.yaml
| {{- if .Capabilities.APIVersions.Has "cilium.io/v2/CiliumNetworkPolicy" }} | ||
| # Cilium is present: restrict ingress on the listen port to the host entity, so | ||
| # only the node-local push path is allowed and other pods are denied. |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
kubectl api-resources --api-group=cilium.io
kubectl get pods --all-namespaces -l k8s-app=ciliumRepository: cozystack/cozystack
Length of output: 202
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== candidate files =="
fd -a 'networkpolicy\.yaml$|.*cilium.*|.*network.*|.*talos-log-collector.*|README\.md|.*docs.*' . | sed 's#^\./##' | head -200
echo
echo "== target file outline/size =="
wc -l packages/system/talos-log-collector/templates/networkpolicy.yaml 2>/dev/null || true
sed -n '1,120p' packages/system/talos-log-collector/templates/networkpolicy.yaml 2>/dev/null || trueRepository: cozystack/cozystack
Length of output: 16196
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== docs relevant =="
fd -a 'README\.md$|.*docs.*|contributing\.md$|overview\.md$|releasing\.md$|changelog\.md$|e2e-testing\.md$' docs packages README.md | sed 's#^\./##' | while read -r f; do
if rg -n "Talos|talos-log-collector|NetworkPolicy|Cilium|noop|CNI|BYO|networking|VictoriaLogs|vector" "$f" >/dev/null 2>&1; then
echo "--- $f"
rg -n "Talos|talos-log-collector|NetworkPolicy|Cilium|noop|CNI|BYO|networking|VictoriaLogs|vector" "$f"
fi
done
echo
echo "== talos-log-collector package =="
sed -n '1,220p' packages/system/talos-log-collector/README.md
python3 - <<'PY'
from pathlib import Path
for p in Path('packages/system/talos-log-collector').rglob('*.yaml'):
print(f'--- {p}')
text = p.read_text()
for i,line in enumerate(text.splitlines(),1):
if 'cilium' in line.lower() or 'networkpolicy' in line.lower() or 'capabilities' in line.lower() or 'talos' in line.lower() or 'noop' in line.lower():
print(f'{i}: {line}')
PY
echo
echo "== supported talos docs mentions =="
rg -n --glob 'README\.md' --glob '*.md' 'packages/system/talos-log-collector|talos-log-collector|talos.*network|networking\.yaml|cilium' packages docs README.md | head -300Repository: cozystack/cozystack
Length of output: 50376
Gate on policy enforcement, not API discovery.
.Capabilities.APIVersions.Has only proves that the Cilium CRDs are installed; it does not prove that Cilium’s control/data planes are active. The fallback still depends on the CNI enforcing Kubernetes NetworkPolicy; as the template notes, unsupported/NOOP/BYO networking paths leave the 0.0.0.0 listener reachable. Fail closed or add an explicit supported-networking prerequisite so “never offered without protection” is guaranteed.
🧰 Tools
🪛 YAMLlint (1.37.1)
[error] 11-11: syntax error: expected the node content, but found '-'
(syntax)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/system/talos-log-collector/templates/networkpolicy.yaml` around
lines 11 - 13, Replace the .Capabilities.APIVersions.Has gate in the network
policy template with an explicit prerequisite that verifies Cilium policy
enforcement is active, not merely that its CRD is installed. Ensure unsupported,
NOOP, or BYO networking configurations do not render an unprotected listener;
fail closed or select only a known-enforcing network path before allowing the
Cilium-specific policy.
… kmsg time global.target is not platform-injected for this optional package (the bundle emits a Package CR with no component values), it comes from the chart default tenant-root; reword the misleading "platform-injected" description. Also note that kernel (kmsg) records carry no wall-clock timestamp, so VictoriaLogs uses the ingest time rather than talos-time for them. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
…I-specific The fallback NetworkPolicy comment presented node-local traffic bypassing a default-deny policy as a universal guarantee; it is CNI-specific behaviour. Reword to state the dependency explicitly and note that the only non-Cilium variant shipped today (noop) does not enforce NetworkPolicy, so the fallback is inert there. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
|
Thanks for the thorough review. All three blockers are fixed, plus the non-blocking follow-ups. B1 (kernel logs): The required-config section now ships a B2 (network policy): Corrected the misleading comment and added a CNI-agnostic B3 (cpu request-only): Reworded to "CPU request." in Non-blocking follow-ups also addressed:
|
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
NOT LGTM — every blocker from the previous review is resolved, but the generated values.schema.json now carries a first-party image reference that the image-ref enumeration guard rejects, so the required "Unit & controller tests" check is red and the branch cannot merge as-is.
Disposition of the previous review's blockers (all resolved on f96d0ec):
- B1 (kernel/kmsg logs never arrive): resolved. The README now documents that
machine.logging.destinationscarries only service logs and that a separateKmsgLogConfigdocument is required for the kmsg stream, and the required-config block ships both (README.md:24-56). This matches how Talos builds its kmsg destination list. - B2 (network policy wrongly called optional): resolved. The comment is corrected to state the policy is load-bearing (
networkpolicy.yaml:1-10), and a CNI-agnostic default-denynetworking.k8s.io/v1fallback now renders whenever the Cilium CRD is absent —helm templatewith default capabilities emits it. See non-blocking note 1 for the residualnoopcase. - B3 (
resources.cpudocumented as request-and-limit): resolved. The annotation, schema and README now read "CPU request." and a test pins that only memory carries a limit (values.yaml:32,values.schema.json:52,README.md:90, testcpu is a request only).
All six non-blocking follow-ups from the previous review are also addressed: portmap dependency documented (daemonset.yaml:28-32), tenant/cluster labels stamped with the same convention as the existing node agent (configmap.yaml:25-26; tenant=global.target, cluster=root-cluster, matching monitoring-agents/values.yaml:440,444), liveness probe added (daemonset.yaml:45-49), schema constraints added (logLevel enum, listenPort min/max), Chart.yaml appVersion synced on make update (Makefile:13), and the README explains why the existing node agent was not extended.
Blockers
B1: values.schema.json carries a first-party image ref that the enumeration guard rejects
File: packages/system/talos-log-collector/values.schema.json:34-43 (root cause in values.yaml:20-29)
Issue: The required "Unit & controller tests" check is failing. The image-ref enumeration guard greps packages/** for ghcr.io/cozystack/cozystack/ and requires every match to be either enumerated by the promote-retag rewriter or allowlisted with a reason; values.schema.json is neither, so the check exits non-zero.
Evidence: The failing job ends with files carry a first-party image ref but are neither enumerated nor allowlisted: packages/system/talos-log-collector/values.schema.json then make: *** [Makefile:167: bats-unit-tests] Error 1. This schema is the only system-package values.schema.json in the tree containing ghcr.io/cozystack/cozystack/. It lands there because values.yaml annotates the image struct (@typedef Image + @field repository/tag), so the schema generator bakes the ref into the generated default; metallb and every other package leave the image block un-annotated, so their schema never carries the ref. The guard was added to main after this branch's merge-base, which is why a local helm unittest passes while the merge check fails.
Impact: A required check is red; the branch is not mergeable until it goes green.
Fix: Drop the @typedef Image / @field annotations from the image block in values.yaml and regenerate, so the schema no longer carries the ref — this matches every other package and needs no change on main. Alternatively, add packages/system/talos-log-collector/values.schema.json to the guard's allowlist with a reason (the schema default is not a runtime ref; the runtime ref lives in values.yaml, which the rewriter already handles). Rebasing onto current main first surfaces the failure locally.
Non-blocking follow-ups
- On the
noopnetworking variant — the only non-Cilium variant shipped, and the one the template comment itself names — the fallback NetworkPolicy is inert, becausenoopenforces no NetworkPolicy at all. An operator who opts the package in there gets the log-injection socket with no protection. The template documents this honestly (networkpolicy.yaml:9-10,32-41). If protecting that path matters, make a policy-enforcing CNI a hard requirement of the package or don't offer it onnoop; otherwise the current documented posture is defensible, sincenoopis a deliberately policy-free environment where nothing is netpol-protected. - The new README prose is hard-wrapped (
README.md:3-14,24-34, and the other prose paragraphs); the repository convention is one continuous line per prose paragraph. Not CI-enforced, but worth reflowing while the file is new. There is also an MD028 blank-line-in-blockquote run atREADME.md:55-63. - The
tcpSocketliveness probe detects only a dead listener, not a Vector process that is alive but has stopped forwarding (for example a wedged HTTP sink). Vector's health endpoint over an HTTP probe would catch more; the current probe is an acceptable minimum.
The rest of the package is sound: registration mirrors the hetzner-robotlb opt-in precedent, install.privileged: true is genuinely required for the loopback hostPort under PSA baseline, the helm-unittest suite is substantive (14 cases pinning both NetworkPolicy branches, the resources split, the liveness probe and the tenant override), and the generated schema and README are free of codegen drift.
| ## @maximum 65535 | ||
| listenPort: 5170 | ||
|
|
||
| ## @typedef {struct} Image - Vector container image. |
There was a problem hiding this comment.
Annotating the image struct here makes the schema generator emit ghcr.io/cozystack/cozystack/vector as a default into values.schema.json, which is the only system-package schema in the tree carrying a first-party image ref. That trips the image-ref enumeration guard on main and turns the required "Unit & controller tests" check red. Every other package (e.g. metallb) leaves image un-annotated so the ref stays out of the schema. Dropping these @typedef/@field annotations and regenerating fixes the check without touching the guard on main.
The first-party image-ref guard rejects values.schema.json: the annotated image struct baked ghcr.io/cozystack/cozystack/vector into the generated schema default, an unenumerated second copy of the runtime ref that the promote and mirror tooling never touches. Move the reference into images/vector.tag (the enumerated .tag storage shape, read via .Files.Get) so the schema no longer carries it, matching every other package. Stamp the tag from make image and regenerate schema and README. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
…kPolicy port The Cilium NetworkPolicy suite asserted the ingress port only at the default 5170, so a regression hard-coding the port would still pass. Add a listenPort-override case mirroring the DaemonSet host/containerPort test, pinning that the override flows into spec.ingress[0].toPorts. Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
What this PR does
Adds
talos-log-collector, an optional system package: a node-local VectorDaemonSet that receives Talos machine and kernel logs and forwards them to the
tenant VictoriaLogs (vlinsert), alongside the container/audit/event logs
already collected by monitoring-agents.
Talos keeps system and kernel (kmsg) logs inside the OS and does not write them
to a host file the Fluent Bit
tailinput could read, so these logs arecurrently never collected. Vector receives them over the node loopback
(Talos pushes to 127.0.0.1:5170). Talos exposes the two streams through
independent config paths, and both must point at the loopback socket:
machine.logging.destinationsforwards the JSON-lines service logs, and aKmsgLogConfigdocument forwards the kernel (kmsg) stream (including DRBDkmsg). The node-side setup for both is in the README.
Design notes:
extra config. Talos pushes to 127.0.0.1:5170; a
hostPortbound tohostIP: 127.0.0.1publishes that loopback socket into the pod via portmap,keeping the receiver off the host network (no node-wide pod exposure).
a CiliumNetworkPolicy restricts ingress to the host entity when Cilium is
present, otherwise a default-deny-ingress
networking.k8s.io/v1fallbackkeeps the socket protected on non-Cilium variants.
bundles.enabledPackages): inert until eachTalos node is configured to push logs. Node-side setup is in the README.
Verified end-to-end on a Talos v1.12 dev cluster: service and kernel logs
(including DRBD kmsg) reach VictoriaLogs; pods run non-root with 0 restarts.
Release note
Summary by CodeRabbit