Skip to content

Custom volumes and volumeMounts in Vector CR override defaults #200

@banschikovde

Description

@banschikovde

Description

When custom volumes or volumeMounts are defined in the Vector custom resource (.spec.agent.volumes or .spec.agent.volumeMounts), the operator fully overrides the default set of volumes and mounts used by the Vector Agent DaemonSet.

As a result, all default hostPath mounts such as:

  • /var/log
  • /var/log/journal
  • /var/lib
  • /host/proc
  • /host/sys

are removed from the resulting PodSpec.

This breaks the default log collection logic — Vector loses access to system and container logs.

Example

apiVersion: observability.kaasops.io/v1alpha1
kind: Vector
metadata:
  name: vector
  namespace: vector
spec:
  agent:
    image: timberio/vector:0.50.0-distroless-libc
    volumes:
      - name: kube-audit
        hostPath:
          path: /var/lib/rancher/rke2/server/logs
          type: DirectoryOrCreate
    volumeMounts:
      - name: kube-audit
        mountPath: /var/log/kubernetes/audit
        readOnly: true

After applying this manifest, the resulting DaemonSet no longer includes the default mounts (e.g. /var/log, /var/lib, /host/sys, /host/proc).

Impact

Vector Agent loses access to container and system log paths,
which causes log collection from pods to stop working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions