{{- if .Values.kubecostProductConfigs }} {{- if or .Values.kubecostProductConfigs.grafanaURL .Values.kubecostProductConfigs.labelMappingConfigs }} apiVersion: v1 kind: ConfigMap metadata: name: {{ default "app-configs" .Values.appConfigmapName }} namespace: {{ .Release.Namespace }} labels: {{ include "cost-analyzer.commonLabels" . | nindent 4 }} data: {{- if .Values.kubecostProductConfigs.labelMappingConfigs }} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.enabled }} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.owner_label }} owner_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.owner_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.team_label }} team_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.team_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.department_label }} department_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.department_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.product_label }} product_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.product_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.environment_label }} environment_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.environment_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.namespace_external_label }} namespace_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.namespace_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.cluster_external_label }} cluster_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.cluster_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.controller_external_label }} controller_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.controller_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.product_external_label }} product_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.product_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.service_external_label }} service_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.service_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.deployment_external_label }} deployment_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.deployment_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.team_external_label }} team_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.team_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.environment_external_label }} environment_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.environment_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.department_external_label }} department_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.department_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.statefulset_external_label }} statefulset_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.statefulset_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.daemonset_external_label }} daemonset_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.daemonset_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.pod_external_label }} pod_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.pod_external_label }}" {{- end -}} {{- if .Values.kubecostProductConfigs.labelMappingConfigs.owner_external_label }} owner_external_label: "{{ .Values.kubecostProductConfigs.labelMappingConfigs.owner_external_label }}" {{- end -}} {{- end -}} {{- end -}} {{- if .Values.kubecostProductConfigs.grafanaURL }} grafanaURL: "{{ .Values.kubecostProductConfigs.grafanaURL }}" {{- end -}} {{- end -}} {{- end -}}