From 099c358a1e0a9954551f1e2ca43894a5acea9e1a Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 14:27:05 -0400 Subject: [PATCH 1/4] fix: set the defaultVolumeMounts instead of using extraVolumeMounts Without this, the daemonset will inject customConfig.data_dir as a default mount, which will collide with extraVolumeMounts. --- .../templates/helm-config/vector.yaml | 37 ++++++++++++++++--- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/plugins/scheduler-k3s/templates/helm-config/vector.yaml b/plugins/scheduler-k3s/templates/helm-config/vector.yaml index 956b55ce5..f56f95274 100644 --- a/plugins/scheduler-k3s/templates/helm-config/vector.yaml +++ b/plugins/scheduler-k3s/templates/helm-config/vector.yaml @@ -28,16 +28,43 @@ readinessProbe: path: /health port: api -extraVolumes: - - name: vector-data-dir +# Replace the chart's defaults so /vector-data-dir is backed by a host directory +# instead of the chart-managed emptyDir. Other defaults (var-log, var-lib, procfs, +# sysfs) are preserved as the chart ships them. +defaultVolumes: + - name: data hostPath: path: /var/lib/vector type: DirectoryOrCreate + - name: var-log + hostPath: + path: /var/log/ + - name: var-lib + hostPath: + path: /var/lib/ + - name: procfs + hostPath: + path: /proc + - name: sysfs + hostPath: + path: /sys -extraVolumeMounts: - - name: vector-data-dir +defaultVolumeMounts: + - name: data mountPath: /vector-data-dir readOnly: false + - name: var-log + mountPath: /var/log/ + readOnly: true + - name: var-lib + mountPath: /var/lib + readOnly: true + - name: procfs + mountPath: /host/proc + readOnly: true + - name: sysfs + mountPath: /host/sys + readOnly: true customConfig: data_dir: /vector-data-dir @@ -61,7 +88,7 @@ customConfig: - kubernetes_logs source: | .container = .kubernetes.container_name - .pod = .kubernetes.pod_name + .pod = .kubernetes.pod_name .namespace = .kubernetes.pod_namespace sinks: From 5dcefe7ffa9664990ec6b0f99dbfd5e5993b5ff4 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 16:06:07 -0400 Subject: [PATCH 2/4] fix: use extraVolumeMount just for the vector state --- .../templates/helm-config/vector.yaml | 47 ++++--------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/plugins/scheduler-k3s/templates/helm-config/vector.yaml b/plugins/scheduler-k3s/templates/helm-config/vector.yaml index f56f95274..6c841d7eb 100644 --- a/plugins/scheduler-k3s/templates/helm-config/vector.yaml +++ b/plugins/scheduler-k3s/templates/helm-config/vector.yaml @@ -28,46 +28,18 @@ readinessProbe: path: /health port: api -# Replace the chart's defaults so /vector-data-dir is backed by a host directory -# instead of the chart-managed emptyDir. Other defaults (var-log, var-lib, procfs, -# sysfs) are preserved as the chart ships them. -defaultVolumes: - - name: data +extraVolumes: + - name: vector-state hostPath: path: /var/lib/vector type: DirectoryOrCreate - - name: var-log - hostPath: - path: /var/log/ - - name: var-lib - hostPath: - path: /var/lib/ - - name: procfs - hostPath: - path: /proc - - name: sysfs - hostPath: - path: /sys -defaultVolumeMounts: - - name: data - mountPath: /vector-data-dir - readOnly: false - - name: var-log - mountPath: /var/log/ - readOnly: true - - name: var-lib - mountPath: /var/lib - readOnly: true - - name: procfs - mountPath: /host/proc - readOnly: true - - name: sysfs - mountPath: /host/sys - readOnly: true +extraVolumeMounts: + - name: vector-state + mountPath: /var/lib/vector-state customConfig: - data_dir: /vector-data-dir + data_dir: /var/lib/vector-state api: enabled: true @@ -87,9 +59,10 @@ customConfig: inputs: - kubernetes_logs source: | - .container = .kubernetes.container_name - .pod = .kubernetes.pod_name - .namespace = .kubernetes.pod_namespace + .container = del(.kubernetes.container_name) + .pod = del(.kubernetes.pod_name) + .namespace = del(.kubernetes.pod_namespace) + del(.kubernetes) sinks: default_global_sink: From 8e7d158ac2d0446fde857d0db754f28a82961671 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 16:06:45 -0400 Subject: [PATCH 3/4] chore: revert transforms changes --- plugins/scheduler-k3s/templates/helm-config/vector.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/scheduler-k3s/templates/helm-config/vector.yaml b/plugins/scheduler-k3s/templates/helm-config/vector.yaml index 6c841d7eb..805ab589e 100644 --- a/plugins/scheduler-k3s/templates/helm-config/vector.yaml +++ b/plugins/scheduler-k3s/templates/helm-config/vector.yaml @@ -59,10 +59,9 @@ customConfig: inputs: - kubernetes_logs source: | - .container = del(.kubernetes.container_name) - .pod = del(.kubernetes.pod_name) - .namespace = del(.kubernetes.pod_namespace) - del(.kubernetes) + .container = .kubernetes.container_name + .pod = .kubernetes.pod_name + .namespace = .kubernetes.pod_namespace sinks: default_global_sink: From c0f23528af626a606851510a59c3ea575907c16d Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Mon, 27 Apr 2026 17:53:23 -0400 Subject: [PATCH 4/4] fix: just use an emptyDir Let vector decide how to handle the directory. --- .../scheduler-k3s/templates/helm-config/vector.yaml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/plugins/scheduler-k3s/templates/helm-config/vector.yaml b/plugins/scheduler-k3s/templates/helm-config/vector.yaml index 805ab589e..a6460eeec 100644 --- a/plugins/scheduler-k3s/templates/helm-config/vector.yaml +++ b/plugins/scheduler-k3s/templates/helm-config/vector.yaml @@ -28,18 +28,8 @@ readinessProbe: path: /health port: api -extraVolumes: - - name: vector-state - hostPath: - path: /var/lib/vector - type: DirectoryOrCreate - -extraVolumeMounts: - - name: vector-state - mountPath: /var/lib/vector-state - customConfig: - data_dir: /var/lib/vector-state + data_dir: /vector-data-dir api: enabled: true