Skip to content
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
79b41b7
added emptyConfig and configSidecar parameter
jusch23 Dec 1, 2025
7b21bb1
Merge branch 'develop' into feature/empty-config-and-reload-sidecar
pront Apr 3, 2026
3e8bd0f
updated k8s-sidecar version and re-run helm-docs
jusch23 Apr 7, 2026
42410fe
added improvements from codex review
jusch23 Apr 7, 2026
3a78586
add rbac create variable for config sidecar
jusch23 Apr 7, 2026
57a020b
handle empty argument list
jusch23 Apr 8, 2026
0e45332
normalize sha for config sidecar image
jusch23 Apr 8, 2026
a920ee2
add description for existingConfigMaps with configSidecar enabled
jusch23 Apr 9, 2026
b6992cb
omit tag when rendering sidecar digest image
jusch23 Apr 10, 2026
55a0b1d
Merge branch 'develop' into feature/empty-config-and-reload-sidecar
jusch23 Apr 14, 2026
607dfc6
disable auto readiness probe in emptyConfig mode
jusch23 Apr 16, 2026
19b0841
append --config-dir when sidecar mode enabled
jusch23 Apr 20, 2026
cde92eb
append --config-dir as separate argv tokens
jusch23 Apr 20, 2026
1eaace5
fix helm list syntax error
jusch23 Apr 20, 2026
2d80d16
keep vector args as flat string list
jusch23 Apr 20, 2026
9f422cb
add --config-dir when args empty and emptyConfig or sidecar mode enabled
jusch23 Apr 20, 2026
2ac77d9
hardcode sidecar mode folder to /etc/vector/
jusch23 Apr 24, 2026
8a4eb36
Merge remote-tracking branch 'upstream/develop' into feature/empty-co…
jusch23 Apr 27, 2026
920b2ca
set unique filenames for config sidecar by default
jusch23 Apr 27, 2026
39fe39d
merge changes from develop branch
jusch23 May 18, 2026
74d4287
re-run helm-docs
jusch23 May 18, 2026
5048cc0
merge changes from upstream
jusch23 Jun 8, 2026
5ed661e
ignore existingConfigMaps in sidecar service port logic
jusch23 Jun 8, 2026
037c7ae
Merge remote-tracking branch 'upstream/develop' into feature/empty-co…
jusch23 Jun 23, 2026
ca3f10c
fixed sidecar label scope, default service ports with existingConfigM…
jusch23 Jun 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions charts/vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ helm repo update

Kubernetes: `>=1.28.0-0`



## Quick start

By default, Vector runs as a `StatefulSet` in the "Aggregator" role. It can alternatively run as a `Deployment` for the "Stateless-Aggregator" role or a `DaemonSet` for the "Agent" role.
Expand Down Expand Up @@ -108,7 +110,7 @@ customConfig:

### API exposure and health probes

When using chart-managed default configuration (without `customConfig` and `existingConfigMaps`),
When using chart-managed default configuration (without `customConfig`, `existingConfigMaps` and `emptyConfig`),
Vector's API listens on `0.0.0.0:8686`, and the chart applies a default readiness probe
(`grpc` on port `8686`).

Expand Down Expand Up @@ -147,6 +149,22 @@ helm install <RELEASE_NAME> \
| autoscaling.targetMemoryUtilizationPercentage | int | `nil` | Target memory utilization for Vector's HPA. |
| command | list | `[]` | Override Vector's default command. |
| commonLabels | object | `{}` | Add additional labels to all created resources. |
| configSidecar | object | `{"enabled":false,"ignoreAlreadyProcessed":false,"image":{"registry":"quay.io","repository":"kiwigrid/k8s-sidecar","sha":"","tag":"2.5.4"},"imagePullPolicy":"IfNotPresent","label":"vector-config","labelValue":"true","logLevel":"INFO","rbac":{"create":true},"uniqueFilenames":false,"watchMethod":"WATCH"}` | Sidecar container collects the configmaps with specified label and stores the included files into the respective folders. If existingConfigMaps parameter is used and configSidecar is enabled, ensure that the configmaps are marked with the appropriate label. |
| configSidecar.enabled | bool | `false` | If true, create and use a sidecar container to manage vector configuration. |
| configSidecar.ignoreAlreadyProcessed | bool | `false` | If true, already processed ConfigMaps are ignored on subsequent runs. |
| configSidecar.image | object | `{"registry":"quay.io","repository":"kiwigrid/k8s-sidecar","sha":"","tag":"2.5.4"}` | Define the sidecar image to use. |
| configSidecar.image.registry | string | `"quay.io"` | Override default registry for the sidecar image. |
| configSidecar.image.repository | string | `"kiwigrid/k8s-sidecar"` | Override default repository and name for the sidecar image. |
| configSidecar.image.sha | string | `""` | The SHA to use for the sidecar image. |
| configSidecar.image.tag | string | `"2.5.4"` | The tag to use for the sidecar image. |
| configSidecar.imagePullPolicy | string | `"IfNotPresent"` | sidecar image pull policy. |
| configSidecar.label | string | `"vector-config"` | Label that the configmaps have to be marked with to be collected by the sidecar. |
| configSidecar.labelValue | string | `"true"` | Value of the label that the configmaps are set to. |
| configSidecar.logLevel | string | `"INFO"` | Log level for the sidecar container. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL. |
| configSidecar.rbac | object | `{"create":true}` | RBAC settings for config sidecar |
| configSidecar.rbac.create | bool | `true` | Create Role and RoleBinding for config sidecar |
| configSidecar.uniqueFilenames | bool | `false` | If true, the sidecar will ensure that filenames are unique where duplicate data keys exist. |
| configSidecar.watchMethod | string | `"WATCH"` | Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds. |
| containerPorts | list | `[]` | Manually define Vector's containerPorts, overriding automated generation of containerPorts. |
| customConfig | object | `{}` | Override Vector's default configs, if used **all** options need to be specified. This section supports using helm templates to populate dynamic values. See Vector's [configuration documentation](https://vector.dev/docs/reference/configuration/) for all options. |
| daemonSet.apiVersion | string | `""` | Override the DaemonSet apiVersion. Valid for the "Agent" role. |
Expand All @@ -155,9 +173,10 @@ helm install <RELEASE_NAME> \
| defaultVolumes | list | See `values.yaml` | Default volumes that are mounted into pods. In most cases, these should not be changed. Use `extraVolumes`/`extraVolumeMounts` for additional custom volumes. |
| dnsConfig | object | `{}` | Specify the [dnsConfig](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config) options for Vector Pods. |
| dnsPolicy | string | `"ClusterFirst"` | Specify the [dnsPolicy](https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy) for Vector Pods. |
| emptyConfig | bool | `false` | Provide an empty config directory. Requires args to include flag to allow empty config (https://vector.dev/docs/reference/cli/). If set, this parameter takes precedence over existingConfigMaps, customConfig and the chart's default configs. |
| env | list | `[]` | Set environment variables for Vector containers. |
| envFrom | list | `[]` | Define environment variables from Secrets or ConfigMaps. |
| existingConfigMaps | list | `[]` | List of existing ConfigMaps for Vector's configuration instead of creating a new one. Requires dataDir to be set. Additionally, containerPorts, service.ports, and serviceHeadless.ports should be specified based on your supplied configuration. If set, this parameter takes precedence over customConfig and the chart's default configs. |
| existingConfigMaps | list | `[]` | List of existing ConfigMaps for Vector's configuration instead of creating a new one. Requires dataDir to be set. Additionally, containerPorts, service.ports, and serviceHeadless.ports should be specified based on your supplied configuration. If set, this parameter takes precedence over customConfig and the chart's default configs. This parameter is not considered with configSidecar enabled. Ensure the correct label key (configSidecar.label) and value (configSidecar.labelValue) to load existing ConfigMaps with configSidecar enabled. |
| extraContainers | list | `[]` | Extra Containers to be added to the Vector Pods. This also supports template content, which will eventually be converted to yaml. |
| extraObjects | list | `[]` | Create extra manifests via values. Would be passed through `tpl` for templating. |
| extraVolumeMounts | list | `[]` | Additional Volume to mount into Vector Containers. |
Expand Down
2 changes: 1 addition & 1 deletion charts/vector/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ customConfig:

### API exposure and health probes

When using chart-managed default configuration (without `customConfig` and `existingConfigMaps`),
When using chart-managed default configuration (without `customConfig`, `existingConfigMaps` and `emptyConfig`),
Vector's API listens on `0.0.0.0:8686`, and the chart applies a default readiness probe
(`grpc` on port `8686`).

Expand Down
73 changes: 69 additions & 4 deletions charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,46 @@ initContainers:
{{- tpl (toYaml .Values.initContainers) . | nindent 2 }}
{{- end }}
containers:
{{- if .Values.configSidecar.enabled }}
- name: config-sidecar
Comment thread
jusch23 marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require an API token for the config sidecar

When an Aggregator install has hardened the shared service account with serviceAccount.automountToken: false, enabling this new sidecar still renders the container and RBAC but the pod will not get a service-account token, so k8s-sidecar cannot authenticate to the Kubernetes API to list/watch ConfigMaps and Vector stays on an empty config. Either force/validate token automount for sidecar mode or document a separate service account path for this configuration.

Useful? React with 👍 / 👎.

{{- $sidecarSha := .Values.configSidecar.image.sha | trimPrefix "sha256:" | default "" -}}
{{- if and .Values.configSidecar.image.tag $sidecarSha }}
image: "{{ .Values.configSidecar.image.registry }}/{{ .Values.configSidecar.image.repository }}:{{ .Values.configSidecar.image.tag }}@sha256:{{ $sidecarSha }}"
{{- else if and (not .Values.configSidecar.image.tag) $sidecarSha }}
image: "{{ .Values.configSidecar.image.registry }}/{{ .Values.configSidecar.image.repository }}@sha256:{{ $sidecarSha }}"
{{- else }}
image: "{{ .Values.configSidecar.image.registry }}/{{ .Values.configSidecar.image.repository }}:{{ .Values.configSidecar.image.tag | default "latest" }}"
{{- end }}
imagePullPolicy: {{ .Values.configSidecar.imagePullPolicy }}
env:
{{- if .Values.configSidecar.ignoreAlreadyProcessed }}
- name: IGNORE_ALREADY_PROCESSED
value: "true"
{{- end }}
- name: METHOD
value: {{ .Values.configSidecar.watchMethod }}
- name: LABEL
value: "{{ .Values.configSidecar.label }}"
{{- with .Values.configSidecar.labelValue }}
- name: LABEL_VALUE
value: {{ quote . }}
{{- end }}
{{- with .Values.configSidecar.logLevel }}
- name: LOG_LEVEL
value: "{{ . }}"
{{- end }}
- name: FOLDER
value: "/etc/vector/"
- name: RESOURCE
value: "configmap"
{{- if .Values.configSidecar.uniqueFilenames }}
- name: UNIQUE_FILENAMES
value: "true"
{{- end }}
volumeMounts:
- name: config
mountPath: "/etc/vector/"
{{- end }}
- name: vector
{{- with .Values.securityContext }}
securityContext:
Expand All @@ -47,9 +87,26 @@ containers:
command:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- with .Values.args }}
{{- $args := list }}
{{- if .Values.args }}
{{- $args = .Values.args }}
{{- end }}
{{- if or $.Values.emptyConfig $.Values.configSidecar.enabled }}
{{- if not (has "--allow-empty-config" $args) }}
{{ $args = append $args "--allow-empty-config" }}
Comment thread
jusch23 marked this conversation as resolved.
{{- end }}
{{- if not (has "--config-dir" $args) }}
{{ $args = concat $args (list "--config-dir" "/etc/vector/") }}
Comment thread
jusch23 marked this conversation as resolved.
Outdated
{{- end }}
Comment thread
jusch23 marked this conversation as resolved.
Outdated
{{- end }}
{{- if $.Values.configSidecar.enabled }}
Comment thread
jusch23 marked this conversation as resolved.
{{- if not (has "--watch-config" $args) }}
{{ $args = append $args "--watch-config" }}
Comment thread
jusch23 marked this conversation as resolved.
{{- end }}
{{- end }}
{{- if $args }}
args:
{{- toYaml . | nindent 6 }}
{{- toYaml $args | nindent 6 }}
{{- end }}
env:
- name: VECTOR_LOG
Expand Down Expand Up @@ -125,7 +182,7 @@ containers:
{{- if .Values.readinessProbe }}
readinessProbe:
{{- toYaml .Values.readinessProbe | trim | nindent 6 }}
{{- else if and (not .Values.existingConfigMaps) (not .Values.customConfig) }}
{{- else if and (not .Values.existingConfigMaps) (not .Values.customConfig) (not .Values.emptyConfig) }}
readinessProbe:
httpGet:
path: /health
Expand All @@ -145,14 +202,18 @@ containers:
{{- end }}
volumeMounts:
- name: data
{{- if .Values.existingConfigMaps }}
{{- if or .Values.emptyConfig .Values.configSidecar.enabled }}
mountPath: "/var/lib/vector/"
Comment thread
jusch23 marked this conversation as resolved.
{{- else if .Values.existingConfigMaps }}
mountPath: "{{ if .Values.dataDir }}{{ .Values.dataDir }}{{ else }}{{ fail "Specify `dataDir` if you're using `existingConfigMaps`" }}{{ end }}"
Comment thread
jusch23 marked this conversation as resolved.
{{- else }}
mountPath: "{{ .Values.customConfig.data_dir | default "/vector-data-dir" }}"
{{- end }}
- name: config
mountPath: "/etc/vector/"
{{- if not .Values.configSidecar.enabled }}
readOnly: true
{{- end }}
{{- if (eq .Values.role "Agent") }}
{{- with .Values.defaultVolumeMounts }}
{{- toYaml . | nindent 6 }}
Expand Down Expand Up @@ -193,6 +254,9 @@ volumes:
emptyDir: {}
{{- end }}
- name: config
{{- if or .Values.emptyConfig .Values.configSidecar.enabled }}
emptyDir: {}
{{- else }}
projected:
sources:
{{- if .Values.existingConfigMaps }}
Expand All @@ -204,6 +268,7 @@ volumes:
- configMap:
name: {{ template "vector.fullname" . }}
{{- end }}
{{- end }}
{{- if (eq .Values.role "Agent") }}
- name: data
{{- if .Values.persistence.hostPath.enabled }}
Expand Down
15 changes: 14 additions & 1 deletion charts/vector/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
{{- if not .Values.existingConfigMaps }}
{{- if not (or .Values.emptyConfig .Values.existingConfigMaps) }}
Comment thread
jusch23 marked this conversation as resolved.
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "vector.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "vector.labels" . | nindent 4 }}
{{- if .Values.configSidecar.enabled}}
{{ .Values.configSidecar.label }}: {{ quote .Values.configSidecar.labelValue }}
Comment thread
jusch23 marked this conversation as resolved.
Outdated
{{- end }}
data:
{{- if .Values.customConfig }}
{{- if and .Values.configSidecar.enabled .Values.customConfig.data_dir }}
{{- $msg := "When configSidecar is enabled, customConfig.data_dir must not be set. " }}
{{- $msg = printf "%sVector uses /var/lib/vector before loading custom config and does not allow overrides. " $msg }}
{{- $msg = printf "%sRemove customConfig.data_dir or disable configSidecar." $msg }}
{{- fail $msg }}
{{- end }}
vector.yaml: |
{{ tpl (toYaml .Values.customConfig) . | indent 4 }}
{{- else if or (eq .Values.role "Aggregator") (eq .Values.role "Stateless-Aggregator") }}
aggregator.yaml: |
{{- if not .Values.configSidecar.enabled}}
data_dir: /vector-data-dir
{{- end }}
api:
enabled: true
address: 0.0.0.0:8686
Expand Down Expand Up @@ -55,7 +66,9 @@ data:
codec: json
{{- else if (eq .Values.role "Agent") }}
agent.yaml: |
{{- if not .Values.configSidecar.enabled}}
data_dir: /vector-data-dir
{{- end }}
api:
enabled: true
address: 0.0.0.0:8686
Expand Down
36 changes: 36 additions & 0 deletions charts/vector/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,39 @@ subjects:
name: {{ include "vector.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
{{- if and .Values.configSidecar.rbac.create .Values.configSidecar.enabled }}
---
# Permissions for the config sidecar to read ConfigMaps.
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "vector.fullname" . }}-config-sidecar
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "vector.labels" . | nindent 4 }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "vector.fullname" . }}-config-sidecar
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "vector.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "vector.fullname" . }}-config-sidecar
subjects:
- kind: ServiceAccount
name: {{ include "vector.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
42 changes: 40 additions & 2 deletions charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ hostAliases: []
# - "foo.local"
# - "bar.local"


# podManagementPolicy -- Specify the [podManagementPolicy](https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#pod-management-policies)
# for the StatefulSet. Valid for the "Aggregator" role.
podManagementPolicy: OrderedReady
Expand Down Expand Up @@ -228,7 +227,6 @@ lifecycle: {}
# - /bin/sleep
# - "10"


# minReadySeconds -- Specify the minimum number of seconds a newly spun up pod should wait to
# pass healthchecks before it is considered available.
minReadySeconds: 0
Expand Down Expand Up @@ -334,6 +332,8 @@ ingress:
# existingConfigMaps -- List of existing ConfigMaps for Vector's configuration instead of creating a new one. Requires
# dataDir to be set. Additionally, containerPorts, service.ports, and serviceHeadless.ports should be specified based on
# your supplied configuration. If set, this parameter takes precedence over customConfig and the chart's default configs.
# This parameter is not considered with configSidecar enabled. Ensure the correct label key (configSidecar.label) and
# value (configSidecar.labelValue) to load existing ConfigMaps with configSidecar enabled.
Comment thread
jusch23 marked this conversation as resolved.
existingConfigMaps: []

# dataDir -- Specify the path for Vector's data, only used when existingConfigMaps are used.
Expand All @@ -359,6 +359,44 @@ customConfig: {}
# encoding:
# codec: json

# emptyConfig -- Provide an empty config directory. Requires args to include flag to allow empty config (https://vector.dev/docs/reference/cli/).
# If set, this parameter takes precedence over existingConfigMaps, customConfig and the chart's default configs.
emptyConfig: false

# configSidecar -- Sidecar container collects the configmaps with specified label and stores the included files into the respective folders.
# If existingConfigMaps parameter is used and configSidecar is enabled, ensure that the configmaps are marked with the appropriate label.
configSidecar:
# configSidecar.enabled -- If true, create and use a sidecar container to manage vector configuration.
enabled: false
# configSidecar.image -- Define the sidecar image to use.
image:
# configSidecar.image.registry -- Override default registry for the sidecar image.
registry: quay.io
# configSidecar.image.repository -- Override default repository and name for the sidecar image.
repository: kiwigrid/k8s-sidecar
# configSidecar.image.tag -- The tag to use for the sidecar image.
tag: "2.5.4"
# configSidecar.image.sha -- The SHA to use for the sidecar image.
sha: ""
# configSidecar.imagePullPolicy -- sidecar image pull policy.
imagePullPolicy: IfNotPresent
# configSidecar.label -- Label that the configmaps have to be marked with to be collected by the sidecar.
label: "vector-config"
# configSidecar.labelValue -- Value of the label that the configmaps are set to.
labelValue: "true"
Comment thread
jusch23 marked this conversation as resolved.
Outdated
# configSidecar.watchMethod -- Method to use to detect ConfigMap changes. With WATCH the sidecar will do a WATCH requests, with SLEEP it will list all ConfigMaps, then sleep for 60 seconds.
watchMethod: "WATCH"
# configSidecar.ignoreAlreadyProcessed -- If true, already processed ConfigMaps are ignored on subsequent runs.
ignoreAlreadyProcessed: false
# configSidecar.logLevel -- Log level for the sidecar container. Can be one of: DEBUG, INFO, WARN, ERROR, CRITICAL.
logLevel: "INFO"
# configSidecar.uniqueFilenames -- If true, the sidecar will ensure that filenames are unique where duplicate data keys exist.
uniqueFilenames: false
# configSidecar.rbac -- RBAC settings for config sidecar
rbac:
# configSidecar.rbac.create -- Create Role and RoleBinding for config sidecar
create: true

# defaultVolumes -- Default volumes that are mounted into pods. In most cases, these should not be changed.
# Use `extraVolumes`/`extraVolumeMounts` for additional custom volumes.
# @default -- See `values.yaml`
Expand Down