{{- if .Values.kubecostProductConfigs }} apiVersion: v1 kind: ConfigMap metadata: name: {{ default "pricing-configs" .Values.pricingConfigmapName }} namespace: {{ .Release.Namespace }} labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.kubecostProductConfigs.defaultModelPricing }} {{- if .Values.kubecostProductConfigs.defaultModelPricing.enabled }} {{- if .Values.kubecostProductConfigs.customPricesEnabled }} customPricesEnabled: "{{ .Values.kubecostProductConfigs.customPricesEnabled }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.CPU }} CPU: "{{ .Values.kubecostProductConfigs.defaultModelPricing.CPU | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.spotCPU }} spotCPU: "{{ .Values.kubecostProductConfigs.defaultModelPricing.spotCPU | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.RAM }} RAM: "{{ .Values.kubecostProductConfigs.defaultModelPricing.RAM | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.spotRAM }} spotRAM: "{{ .Values.kubecostProductConfigs.defaultModelPricing.spotRAM | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.GPU }} GPU: "{{ .Values.kubecostProductConfigs.defaultModelPricing.GPU | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.spotGPU }} spotGPU: "{{ .Values.kubecostProductConfigs.defaultModelPricing.spotGPU | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.storage }} storage: "{{ .Values.kubecostProductConfigs.defaultModelPricing.storage | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.zoneNetworkEgress }} zoneNetworkEgress: "{{ .Values.kubecostProductConfigs.defaultModelPricing.zoneNetworkEgress | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.regionNetworkEgress }} regionNetworkEgress: "{{ .Values.kubecostProductConfigs.defaultModelPricing.regionNetworkEgress | toString }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultModelPricing.internetNetworkEgress }} internetNetworkEgress: "{{ .Values.kubecostProductConfigs.defaultModelPricing.internetNetworkEgress | toString }}" {{- end -}} {{- end -}} {{- end -}} {{- if .Values.kubecostProductConfigs.clusterName }} clusterName: "{{ .Values.kubecostProductConfigs.clusterName }}" {{- end -}} {{- if .Values.kubecostProductConfigs.currencyCode }} currencyCode: "{{ .Values.kubecostProductConfigs.currencyCode }}" {{- end -}} {{- if .Values.kubecostProductConfigs.azureBillingRegion }} azureBillingRegion: "{{ .Values.kubecostProductConfigs.azureBillingRegion }}" {{- end -}} {{- if .Values.kubecostProductConfigs.azureSubscriptionID }} azureSubscriptionID: "{{ .Values.kubecostProductConfigs.azureSubscriptionID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.azureClientID }} azureClientID: "{{ .Values.kubecostProductConfigs.azureClientID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.azureTenantID }} azureTenantID: "{{ .Values.kubecostProductConfigs.azureTenantID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.azureOfferDurableID }} azureOfferDurableID: "{{ .Values.kubecostProductConfigs.azureOfferDurableID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.discount }} discount: "{{ .Values.kubecostProductConfigs.discount }}" {{- end -}} {{- if .Values.kubecostProductConfigs.negotiatedDiscount }} negotiatedDiscount: "{{ .Values.kubecostProductConfigs.negotiatedDiscount }}" {{- end -}} {{- if .Values.kubecostProductConfigs.defaultIdle }} defaultIdle: "{{ .Values.kubecostProductConfigs.defaultIdle }}" {{- end -}} {{- if .Values.kubecostProductConfigs.sharedNamespaces }} sharedNamespaces: "{{ .Values.kubecostProductConfigs.sharedNamespaces }}" {{- end -}} {{- if .Values.kubecostProductConfigs.sharedOverhead }} sharedOverhead: "{{ .Values.kubecostProductConfigs.sharedOverhead }}" {{- end -}} {{- if gt (len (toString .Values.kubecostProductConfigs.shareTenancyCosts)) 0 }} {{- if eq (toString .Values.kubecostProductConfigs.shareTenancyCosts) "false" }} shareTenancyCosts: "false" {{- else if eq (toString .Values.kubecostProductConfigs.shareTenancyCosts) "true" }} shareTenancyCosts: "true" {{- end -}} {{- end -}} {{- if .Values.kubecostProductConfigs.spotLabel }} spotLabel: "{{ .Values.kubecostProductConfigs.spotLabel }}" {{- end -}} {{- if .Values.kubecostProductConfigs.spotLabelValue }} spotLabelValue: "{{ .Values.kubecostProductConfigs.spotLabelValue }}" {{- end -}} {{- if .Values.kubecostProductConfigs.awsSpotDataRegion }} spotDataRegion: "{{ .Values.kubecostProductConfigs.awsSpotDataRegion }}" {{- end -}} {{- if .Values.kubecostProductConfigs.awsSpotDataBucket }} spotDataBucket: "{{ .Values.kubecostProductConfigs.awsSpotDataBucket }}" {{- end -}} {{- if .Values.kubecostProductConfigs.awsSpotDataPrefix }} spotDataPrefix: "{{ .Values.kubecostProductConfigs.awsSpotDataPrefix }}" {{- end -}} {{- if .Values.kubecostProductConfigs.projectID }} projectID: "{{ .Values.kubecostProductConfigs.projectID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.bigQueryBillingDataDataset }} billingDataDataset: "{{ .Values.kubecostProductConfigs.bigQueryBillingDataDataset }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaProjectID }} athenaProjectID: "{{ .Values.kubecostProductConfigs.athenaProjectID }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaBucketName }} athenaBucketName: "{{ .Values.kubecostProductConfigs.athenaBucketName }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaRegion }} athenaRegion: "{{ .Values.kubecostProductConfigs.athenaRegion }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaDatabase }} athenaDatabase: "{{ .Values.kubecostProductConfigs.athenaDatabase }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaTable }} athenaTable: "{{ .Values.kubecostProductConfigs.athenaTable }}" {{- end -}} {{- if .Values.kubecostProductConfigs.athenaWorkgroup }} athenaWorkgroup: "{{ .Values.kubecostProductConfigs.athenaWorkgroup }}" {{- end -}} {{- if .Values.kubecostProductConfigs.masterPayerARN}} masterPayerARN: "{{ .Values.kubecostProductConfigs.masterPayerARN }}" {{- end }} {{- if .Values.kubecostProductConfigs.gpuLabel }} gpuLabel: "{{ .Values.kubecostProductConfigs.gpuLabel }}" {{- end -}} {{- if .Values.kubecostProductConfigs.gpuLabelValue }} gpuLabelValue: "{{ .Values.kubecostProductConfigs.gpuLabelValue }}" {{- end -}} {{- end -}}