Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion charts/vector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ helm install <RELEASE_NAME> \
| initContainers | list | `[]` | Init Containers to be added to the Vector Pods. This also supports template content, which will eventually be converted to yaml. |
| lifecycle | object | `{}` | Set lifecycle hooks for Vector containers. |
| livenessProbe | object | `{}` | Override default liveness probe settings. If customConfig is used, requires customConfig.api.enabled to be set to true. |
| logLevel | string | `"info"` | |
| logConfig.format | string | `"text"` | Set Vector's logging format |
| logConfig.level | string | `"info"` | Set Vector's log level |
| minReadySeconds | int | `0` | Specify the minimum number of seconds a newly spun up pod should wait to pass healthchecks before it is considered available. |
| nameOverride | string | `""` | Override the name of resources. |
| nodeSelector | object | `{}` | Configure a [nodeSelector](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector) for Vector Pods. |
Expand Down
4 changes: 3 additions & 1 deletion charts/vector/templates/_pod.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ containers:
{{- end }}
env:
- name: VECTOR_LOG
value: "{{ .Values.logLevel | default "info" }}"
value: "{{ .Values.logConfig.level | default "info" }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve legacy logLevel override during upgrade

Reading VECTOR_LOG only from .Values.logConfig.level causes existing installations that still set logLevel in their override files to silently fall back to info after upgrade, because Helm keeps old keys but this template no longer consumes them. That changes runtime log verbosity unexpectedly in production; this should keep a compatibility fallback to logLevel (or explicitly fail with a migration error) instead of ignoring prior user configuration.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lazam what do you think about this?

- name: VECTOR_LOG_FORMAT
value: "{{ .Values.logConfig.format | default "text" }}"
{{- if .Values.env }}
{{- with .Values.env }}
{{- toYaml . | nindent 6 }}
Expand Down
8 changes: 6 additions & 2 deletions charts/vector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,12 @@ podMonitor:
# podMonitor.honorTimestamps -- If true, honor_timestamps is set to true in the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config).
honorTimestamps: true

# Log level for Vector.
logLevel: "info"
# Log configuration for Vector
logConfig:
# logConfig.level -- Set Vector's log level
level: "info"
# logConfig.format -- Set Vector's logging format
format: "text"

# Optional built-in HAProxy load balancer.
haproxy:
Expand Down