Skip to content

Commit e05653a

Browse files
Add PRICING_CONFIGMAP_NAME env to achnowledge configmapName helm value (#316)
* Add PRICING_CONFIGMAP_NAME env to achnowledge configmapName helm value Signed-off-by: Ishaan Mittal <ishaanmittal123@gmail.com>
1 parent 2851387 commit e05653a

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

charts/opencost/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ keywords:
99
- finops
1010
- monitoring
1111
- opencost
12-
version: 2.5.4
12+
version: 2.5.5
1313
maintainers:
1414
- name: jessegoodier
1515
- name: toscott

charts/opencost/templates/configmap-custom-pricing.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ metadata:
55
name: {{ .Values.opencost.customPricing.configmapName }}
66
namespace: {{ include "opencost.namespace" . }}
77
data:
8-
{{ include "opencost.configFileName" . }}.json: |-
98
{
109
{{- range $key, $val := .Values.opencost.customPricing.costModel }}
1110
{{ $key | quote | indent 6}}: {{ $val | quote }},

charts/opencost/templates/deployment.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)