Skip to content

Commit

Permalink
[newrelic-logging] Adjust order of env list in daemonset
Browse files Browse the repository at this point in the history
When using persistentVolume mode, the env variable FB_DB references NODE_NAME. This reference is currently not resolved, because NODE_NAME is defined after FB_DB. This commit fixes this, by moving the definition of NODE_NAME before the definition of FB_DB.
  • Loading branch information
nluedema committed Oct 24, 2024
1 parent 83cef4c commit f19437d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions charts/newrelic-logging/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ spec:
{{- else }}
value: "docker,cri"
{{- end }}
# NODE_NAME needs to be defined before FB_DB, because FB_DB references NODE_NAME in its value when using persistentVolume
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if or (not .Values.fluentBit.persistence) (eq .Values.fluentBit.persistence.mode "hostPath") }}
- name: FB_DB
value: {{ .Values.fluentBit.db | quote }}
Expand All @@ -116,10 +121,6 @@ spec:
value: {{ include "newrelic-logging.lowDataMode" . | default "false" | quote }}
- name: RETRY_LIMIT
value: {{ .Values.fluentBit.retryLimit | quote }}
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: HOSTNAME
valueFrom:
fieldRef:
Expand Down

0 comments on commit f19437d

Please sign in to comment.