Skip to content

Commit

Permalink
fix(chart): mergeOverride changed the user values (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
paologallinaharbur committed Jun 21, 2022
1 parent 98c4bec commit 5150e1e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/nri-prometheus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sources:
- https://github.com/newrelic/nri-prometheus
- https://github.com/newrelic/nri-prometheus/tree/master/charts/nri-prometheus

version: 2.1.5
version: 2.1.6
appVersion: 2.16.1

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion charts/nri-prometheus/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data:
{{- include "nri-prometheus.mergeTransformations" . -}}
{{- else if (include "newrelic.common.lowDataMode" .) -}}
{{ $lowDataDefault := .Files.Get "static/lowdatamodedefaults.yaml" | fromYaml }}
{{- mergeOverwrite .Values.config $lowDataDefault | toYaml | nindent 4 -}}
{{- mergeOverwrite (deepCopy .Values.config) $lowDataDefault | toYaml | nindent 4 -}}
{{- else }}
{{- .Values.config | toYaml | nindent 4 -}}
{{- end -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/nri-prometheus/tests/configmap_test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
suite: test nri-prometheus configmap
templates:
- templates/configmap.yaml
- templates/deployment.yaml
tests:
- it: creates the config map with default config in values.yaml and cluster_name.
set:
Expand All @@ -18,6 +19,7 @@ tests:
scrape_endpoints: false
scrape_services: true
transformations: []
template: templates/configmap.yaml

- it: creates the config map with lowDataMode.
set:
Expand All @@ -43,6 +45,7 @@ tests:
- container_
- machine_
- cadvisor_
template: templates/configmap.yaml

- it: merges existing transformation with lowDataMode.
set:
Expand Down Expand Up @@ -80,3 +83,4 @@ tests:
- container_
- machine_
- cadvisor_
template: templates/configmap.yaml

0 comments on commit 5150e1e

Please sign in to comment.