Skip to content

Commit

Permalink
More formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean-Holcomb committed Feb 25, 2021
1 parent 8b0bdb0 commit b134156
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
30 changes: 15 additions & 15 deletions cost-analyzer/templates/grafana-datasource-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
namespace: {{ $.Values.grafana.namespace_datasources }}
{{- end }}
labels:
{{ include "cost-analyzer.commonLabels" . | nindent 4 }}
{{- include "cost-analyzer.commonLabels" . | nindent 4 }}
{{- if $.Values.grafana.sidecar.datasources.label }}
{{ $.Values.grafana.sidecar.datasources.label }}: "1"
{{- else }}
Expand All @@ -24,30 +24,30 @@ data:
{{ default "datasource.yaml" .Values.grafana.sidecar.datasources.dataSourceFilename }}: |-
apiVersion: 1
datasources:
- access: proxy
name: "default-kubecost"
type: prometheus
- access: proxy
name: default-kubecost
type: prometheus
{{- if .Values.grafana.sidecar.datasources.defaultDatasourceEnabled }}
isDefault: true
isDefault: true
{{- else }}
isDefault: false
isDefault: false
{{- end }}
{{- if .Values.global.thanos }}
{{- if .Values.global.thanos.enabled }}
{{- if .Values.global.prometheus.enabled }}
url: http://{{ .Release.Name }}-thanos-query-http.{{ .Release.Namespace }}:{{ .Values.thanos.query.http.port }}
{{ else }}
url: {{ .Values.global.thanos.queryService }}
url: http://{{ .Release.Name }}-thanos-query-http.{{ .Release.Namespace }}:{{ .Values.thanos.query.http.port }}
{{- else }}
url: {{ .Values.global.thanos.queryService }}
{{- end }}
- access: proxy
name: {{ default "Prometheus" .Values.grafana.sidecar.datasources.dataSourceName }}
isDefault: false
type: prometheus
- access: proxy
name: {{ default "Prometheus" .Values.grafana.sidecar.datasources.dataSourceName}}
isDefault: false
type: prometheus
{{- end }}
{{- if .Values.global.prometheus.enabled }}
url: http://{{ template "cost-analyzer.prometheus.server.name" . }}.{{ .Release.Namespace }}
url: http://{{ template "cost-analyzer.prometheus.server.name" . }}.{{ .Release.Namespace }}
{{- else }}
url: {{ .Values.global.prometheus.fqdn }}
url: {{ .Values.global.prometheus.fqdn }}
{{- end }}
{{- end }}
{{- end -}}
Expand Down
3 changes: 1 addition & 2 deletions cost-analyzer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -514,8 +514,7 @@ grafana:
datasources:
# dataSourceFilename: foo.yml # If you need to change the name of the datasource file
enabled: true
defaultDatasourceEnabled: false
dataSourceName: Prometheus
dataSourceName: prometheus-kubecost
# label that the configmaps with datasources are marked with
label: kubecost_grafana_datasource
# For grafana to be accessible, add the path to root_url. For example, if you run kubecost at www.foo.com:9090/kubecost
Expand Down

0 comments on commit b134156

Please sign in to comment.