Skip to content

Commit

Permalink
Undo helpers monitoring change
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanGuedes committed Feb 21, 2024
1 parent e0095d9 commit 5ac2392
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ Client definition for LogsInstance
*/}}
{{- define "loki.logsInstanceClient" -}}
{{- $isSingleBinary := eq (include "loki.deployment.isSingleBinary" .) "true" -}}
{{- $url := printf "https://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- $url := printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.writeFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- if $isSingleBinary }}
{{- $url = printf "https://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- $url = printf "http://%s.%s.svc.%s:3100/loki/api/v1/push" (include "loki.singleBinaryFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- else if .Values.gateway.enabled -}}
{{- $url = printf "https://%s.%s.svc.%s/loki/api/v1/push" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- $url = printf "http://%s.%s.svc.%s/loki/api/v1/push" (include "loki.gatewayFullname" .) .Release.Namespace .Values.global.clusterDomain }}
{{- end -}}
- url: {{ $url }}
# tlsConfig:
# caFile: /var/root-tls/tls.crt
# certFile: /var/client-tls/tls.crt
# keyFile: /var/client-tls/tls.key
# serverName: loki-memberlist
externalLabels:
cluster: {{ include "loki.clusterLabel" . }}
{{- if .Values.enterprise.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,15 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{- $prefix := "ssd" }}
{{- if "loki.deployment.isDistributed "}}
{{- $prefix = "distributed" }}
{{- end -}}

# "loki-chunks.json": |
# {{ $.Files.Get (printf "src/dashboards/%s/loki-chunks.json" $prefix) | fromJson | toJson }}
# TODO: why does this one fails?
# "loki-deletion.json": |
# {{ $.Files.Get (printf "src/dashboards/%s/loki-deletion.json" $prefix) | fromJson | toJson }}
# "loki-logs.json": |
# {{ $.Files.Get (printf "src/dashboards/%s/loki-logs.json" $prefix) | fromJson | toJson }}
# "loki-mixin-recording-rules.json": |
# {{ $.Files.Get (printf "src/dashboards/%s/loki-mixin-recording-rules.json" $prefix) | fromJson | toJson }}
# "loki-operational.json": |
# {{ $.Files.Get (printf "src/dashboards/%s/loki-operational.json" $prefix) | fromJson | toJson }}
"loki-chunks.json": |
{{ $.Files.Get "src/dashboards/loki-chunks.json" | fromJson | toJson }}
"loki-deletion.json": |
{{ $.Files.Get "src/dashboards/loki-deletion.json" | fromJson | toJson }}
"loki-logs.json": |
{{ $.Files.Get "src/dashboards/loki-logs.json" | fromJson | toJson }}
"loki-mixin-recording-rules.json": |
{{ $.Files.Get "src/dashboards/loki-mixin-recording-rules.json" | fromJson | toJson }}
"loki-operational.json": |
{{ $.Files.Get "src/dashboards/loki-operational.json" | fromJson | toJson }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
data:
{{ $prefix := "ssd" }}
{{- if "loki.deployment.isDistributed "}}
{{- $prefix = "distributed" }}
{{- end -}}

"loki-reads-resources.json": |
{{ $.Files.Get (printf "src/dashboards/%s/loki-reads-resources.json" $prefix) | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-reads-resources.json" | fromJson | toJson }}
"loki-reads.json": |
{{ $.Files.Get (printf "src/dashboards/%s/loki-reads.json" $prefix) | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-reads.json" | fromJson | toJson }}
"loki-retention.json": |
{{ $.Files.Get (printf "src/dashboards/%s/loki-retention.json" $prefix) | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-retention.json" | fromJson | toJson }}
"loki-writes-resources.json": |
{{ $.Files.Get (printf "src/dashboards/%s/loki-writes-resources.json" $prefix) | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-writes-resources.json" | fromJson | toJson }}
"loki-writes.json": |
{{ $.Files.Get (printf "src/dashboards/%s/loki-writes.json" $prefix) | fromJson | toJson }}
{{ $.Files.Get "src/dashboards/loki-writes.json" | fromJson | toJson }}
{{- end -}}
{{- end -}}
{{- end -}}
2 changes: 1 addition & 1 deletion production/helm/loki/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ monitoring:
# -- Tenant to use for self monitoring
tenant:
# -- Name of the tenant
name: "loki"
name: "self-monitoring"
# -- Namespace to create additional tenant token secret in. Useful if your Grafana instance
# is in a separate namespace. Token will still be created in the canary namespace.
secretNamespace: "{{ .Release.Namespace }}"
Expand Down

0 comments on commit 5ac2392

Please sign in to comment.