Skip to content

feat(monitoring): switch VLogs to cluster mode for secure tenant log isolation #2000

Closed

Description

Problem

PR #1971 proposes adding NetworkPolicy egress to VLogs pods so that nested cluster Fluent Bit instances can forward logs to the parent tenant's VLogs. However, VLogs in single-node mode exposes both write (/insert/*) and read (/select/*) endpoints on the same port (9428). If we open NetworkPolicy egress to VLogs, a child tenant would be able to query /select/* and read ALL logs stored in the parent tenant's VLogs — including logs from other tenants.

This is why PR #1971 cannot be merged as-is (see kvaps' comment about the security concern).

Note on metrics: vminsert is architecturally write-only — it has no query endpoints. The existing NetworkPolicy egress to vminsert is secure. This issue is VLogs-specific.

Current State

  • VLogs is deployed via the deprecated VLogs CRD (operator.victoriametrics.com/v1beta1) in single-node mode
  • victoria-metrics-operator is at v0.55.0
  • VictoriaLogs image is v1.17.0
  • The VLogs CRD will become read-only after operator v0.61.0

Proposed Solution

Switch VLogs from single-node to cluster mode using the VLCluster CRD (introduced in operator v0.59.0):

  • vlinsert — write-only component, accepts logs from tenants
  • vlselect — read-only component, handles log queries
  • vlstorage — storage backend

With this architecture, tenant NetworkPolicy egress would target only vlinsert pods (write-only by design, with -select.disable flag). Tenants can ingest logs but cannot read them. This mirrors the existing vminsert/vmselect separation for metrics.

Prerequisites

  1. Upgrade victoria-metrics-operator from v0.55.0 to v0.59.0+ (current stable: v0.67.0)
  2. Migrate from deprecated VLogs CRD (v1beta1) to VLCluster CRD (v1)
  3. Update VictoriaLogs image to a cluster-capable version

This also addresses the upcoming VLogs CRD deprecation.

Alternative

Deploy vmauth (VictoriaMetrics auth proxy) in front of single-node VLogs, routing only /insert/* paths to tenants. Simpler but adds an extra component without solving the CRD deprecation.

References

Activity

  1. github-actions commented on May 2, 2026

    @github-actions

    This issue has had no activity for 60 days and was marked lifecycle/stale.
    It will be closed in 14 days unless commented or labelled lifecycle/frozen.

  2. added
    lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale
    on May 2, 2026
  3. dosubot commented on Aug 1, 2026

    @dosubot

    Hi, Aleksei Sviridkin (@lexfrei). I'm Dosu, and I'm helping the cozystack team manage their backlog and am marking this issue as stale.

    Recap

    • You reported that the current single-node VLogs deployment is not safe for tenant isolation if NetworkPolicy egress is opened.
    • The concern is that child tenants could access /select/* and read parent logs.
    • The proposed direction is to move to VLCluster in cluster mode, using write-only vlinsert for tenant ingestion and separate read/query components.
    • This also aligns with the planned deprecation of the legacy VLogs CRD.
    • The only follow-up recorded so far is an automated stale notice from github-actions.

    Next Steps

    • If this is still relevant on the latest version of the cozystack repository, please comment here to keep the discussion open.
    • Otherwise, this issue will be automatically closed in 7 days.

    Thanks for your understanding and contribution.

  4. added
    kind/featureCategorizes issue or PR as related to a new feature
    area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)
    triage/not-reproducibleIndicates an issue can not be reproduced as described
    and removed
    triage/needs-triageIndicates an issue needs triage by a maintainer
    on Sep 23, 2026
  5. lexfrei commented on Sep 23, 2026

    @lexfrei
    ContributorAuthor

    #2153 moved VictoriaLogs to VLCluster, so the write-only vlinsert exists now. Tenant egress to the parent's vlinsert is still missing and is tracked in #1970.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/monitoringIssues or PRs related to the monitoring stack (vlogs, vmstack, grafana, workloadmonitor)kind/featureCategorizes issue or PR as related to a new featurelifecycle/staleDenotes an issue or PR has remained open with no activity and has become stalesecuritySecurity-related issues and featurestriage/not-reproducibleIndicates an issue can not be reproduced as described

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions