helm-charts
helm-charts copied to clipboard
[newrelic-logging] Metrics host magic in `_helpers.tpl` relies on plain value secret to choose EU over US
Bug description
If license key is defined in an external secret, the following code kicks in (and the same for the logs endpoint):
{{- define "newrelic-logging.metricsHost" -}}
{{- if (include "newrelic.nrStaging" .) -}}
staging-metric-api.newrelic.com
{{- else if eq (substr 0 2 (include "newrelic-logging.licenseKey" .)) "eu" -}}
metric-api.eu.newrelic.com
{{- else -}}
metric-api.newrelic.com
{{- end -}}
{{- end -}}
Thus, EU region never gets selected.
Version of Helm and Kubernetes
Helm 3, Kubernetes 1.28
Which chart?
nri-bundle
5.0.81
What happened?
I set it up, pressed the button, and then this. Fix, please.
What you expected to happen?
An explicit value to choose the region, since automatic detection will never work with external secret.
How to reproduce it?
- Create a license key for EU region
- Put it in a secret and set
.Values.global.customSecretName
- Observer loads of
403
in logger pods
Anything else we need to know?
Reindeers sometimes eat lemmings.