rancher-partner-charts/charts/kubecost/cost-analyzer/templates/cost-analyzer-config-map-te...

33 lines
1.4 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "cost-analyzer.fullname" . }}
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
data:
{{- if .Values.global.prometheus.enabled }}
{{- if .Values.global.zone }}
prometheus-alertmanager-endpoint: http://{{ template "cost-analyzer.prometheus.alertmanager.name" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.zone }}
{{ else }}
prometheus-alertmanager-endpoint: http://{{ template "cost-analyzer.prometheus.alertmanager.name" . }}.{{ .Release.Namespace }}
{{- end -}}
{{ else }}
prometheus-alertmanager-endpoint: {{ .Values.global.notifications.alertmanager.fqdn }}
{{- end -}}
{{if .Values.global.amp.enabled }}
prometheus-server-endpoint: {{ .Values.global.amp.prometheusServerEndpoint }}
{{- else if .Values.global.prometheus.enabled }}
{{- if .Values.global.zone }}
prometheus-server-endpoint: http://{{ template "cost-analyzer.prometheus.server.name" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.zone }}
{{ else }}
prometheus-server-endpoint: http://{{ template "cost-analyzer.prometheus.server.name" . }}.{{ .Release.Namespace }}
{{- end -}}
{{ else }}
prometheus-server-endpoint: {{ .Values.global.prometheus.fqdn }}
{{- end -}}
{{- if .Values.kubecostToken }}
kubecost-token: {{ .Values.kubecostToken }}
{{ else }}
kubecost-token: not-applied
{{- end -}}