@@ -279,6 +279,8 @@ spec:
279279 {{- if .Values.opencost.customPricing.enabled }}
280280 - name : CONFIG_PATH
281281 value : {{ .Values.opencost.customPricing.configPath | quote }}
282+ - name : PRICING_CONFIGMAP_NAME
283+ value : {{ .Values.opencost.customPricing.configmapName | quote }}
282284 {{- end }}
283285 - name : RESOLUTION_1D_RETENTION
284286 {{- if (.Values.opencost.dataRetention).dailyResolutionDays}}
@@ -347,17 +349,9 @@ spec:
347349 name : opencost-export
348350 readOnly : false
349351 {{- end }}
350- {{- if .Values.opencost.customPricing.enabled }}
351- - mountPath : {{ .Values.opencost.customPricing.configPath }}/{{ include "opencost.configFileName" . }}.json
352+ {{- if or .Values.opencost.customPricing.enabled .Values.opencost.metrics.config .enabled }}
353+ - mountPath : {{ .Values.opencost.customPricing.configPath }}
352354 name : custom-configs
353- subPath : {{ include "opencost.configFileName" . }}.json
354- readOnly : true
355- {{- end }}
356- {{- if .Values.opencost.metrics.config.enabled }}
357- - mountPath : {{ .Values.opencost.customPricing.configPath }}/metrics.json
358- name : custom-metrics
359- subPath : metrics.json
360- readOnly : true
361355 {{- end }}
362356 {{- if .Values.opencost.cloudIntegrationSecret }}
363357 - name : cloud-integration
@@ -483,15 +477,9 @@ spec:
483477 secret :
484478 secretName : {{ template "opencost.fullname" . }}-plugins-config
485479 {{- end }}
486- {{- if .Values.opencost.customPricing.enabled }}
480+ {{- if or .Values.opencost.customPricing.enabled .Values.opencost.metrics.config .enabled }}
487481 - name : custom-configs
488- configMap :
489- name : {{ .Values.opencost.customPricing.configmapName }}
490- {{- end }}
491- {{- if .Values.opencost.metrics.config.enabled }}
492- - name : custom-metrics
493- configMap :
494- name : {{ .Values.opencost.metrics.config.configmapName }}
482+ emptyDir : {}
495483 {{- end }}
496484 {{- if .Values.opencost.exporter.persistence.enabled }}
497485 - name : opencost-export
0 commit comments