Skip to content

Commit

Permalink
[newrelic-infrastructure] Fixes bug with nrStaging (#66)
Browse files Browse the repository at this point in the history
Fixes bug with nrStaging when there is no global set. I missed this
because I was doing my tests using --set global.licenseKey=zxc which hid
the bug.
  • Loading branch information
alejandrodnm authored Jun 11, 2020
1 parent 366f5e7 commit 3528bd6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/newrelic-infrastructure/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart to deploy the New Relic Infrastructure Agent as a DaemonSet
name: newrelic-infrastructure
version: 0.14.0
version: 0.14.1
appVersion: 1.22.0
home: https://hub.docker.com/r/newrelic/infrastructure-k8s/
source:
Expand Down
8 changes: 7 additions & 1 deletion charts/newrelic-infrastructure/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,13 @@ Return the customSecretLicenseKey
Returns nrStaging
*/}}
{{- define "newrelic.nrStaging" -}}
{{- or .Values.global.nrStaging .Values.nrStaging }}
{{- if .Values.global }}
{{- if .Values.global.nrStaging }}
{{- .Values.global.nrStaging -}}
{{- end -}}
{{- else if .Values.nrStaging }}
{{- .Values.nrStaging -}}
{{- end -}}
{{- end -}}

{{/*
Expand Down
2 changes: 1 addition & 1 deletion charts/newrelic-infrastructure/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ spec:
- name: "NRIA_EVENT_QUEUE_DEPTH"
value: {{ .Values.eventQueueDepth | quote }}
{{- end }}
{{- if eq (include "newrelic.nrStaging" .) "true" }}
{{- if (include "newrelic.nrStaging" .) }}
- name: "NRIA_STAGING"
value: "true"
{{- end }}
Expand Down

0 comments on commit 3528bd6

Please sign in to comment.