vectordotdev / helm-charts

Helm charts for Vector.
https://vector.dev
Mozilla Public License 2.0
111 stars 90 forks source link

Release 0.16.2 issue with env #251

Closed jgournet closed 1 year ago

jgournet commented 1 year ago

This commit: https://github.com/vectordotdev/helm-charts/commit/89be2e2a77e7f11c57c829c6c49809bc3ab26eda introduced an issue where if we don't have ".Values.env" defined, the very important useful environment variables VECTOR_SELF_NODE_NAME (and others) are skipped, as they are inside the "if".

Could this be fixed ? (just needs to move the "{{ -end }}" a few lines above).

Thanks

CC @dannylongeuay and @spencergilbert

dannylongeuay commented 1 year ago

Sorry about that. I've submitted a fix.

jgournet commented 1 year ago

Thanks for being so fast :) Note: It's still early for me, but I feel like your PR is not right ? ie: {{- if (eq .Values.role "Agent") }} is still inside the "{{- if .Values.env }}" part, which is the issue

dannylongeuay commented 1 year ago

Thanks for being so fast :) Note: It's still early for me, but I feel like your PR is not right ? ie: {{- if (eq .Values.role "Agent") }} is still inside the "{{- if .Values.env }}" part, which is the issue

You are totally right. Hopefully I got it right now.

dannylongeuay commented 1 year ago

env: should always be present now. We add additional .Values.env when they exist. If the vector role is Agent the agent specific env variables are added. Really isn't that complex, not sure why my brain was failing me. :sweat_smile: