fix(mycloud-gotosocial): add tracing

This commit is contained in:
WrenIX 2024-07-19 17:20:57 +02:00
parent f680b14372
commit fa9810b8e7
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
3 changed files with 34 additions and 0 deletions

View file

@ -57,6 +57,21 @@ spec:
enabled: {{ (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1/ServiceMonitor") }}
username: {{ derivePassword 1 "long" .Values.commons.masterPassword "gotosocial" "metrics.username" | quote }}
password: {{ derivePassword 1 "long" .Values.commons.masterPassword "gotosocial" "metrics.password" | quote }}
{{- if .Values.commons.tracing.enabled }}
tracing:
enabled: true
{{- if .Values.commons.tracing.grpc.enabled }}
transport: "grpc"
endpoint: {{ .Values.commons.tracing.grpc.endpoint }}
insecureTransport: {{ .Values.commons.tracing.grpc.insecure }}
{{- else }}
transport: "http"
{{ $endpoint := mustRegexSplit "://" .Values.commons.tracing.http.endpoint 2 }}
endpoint: {{ $endpoint | last }}
insecureTransport: {{ $endpoint | first | ne "https" }}
{{- end }}
{{- end }}
prometheus:
servicemonitor:

View file

@ -96,6 +96,25 @@ commons:
# @section -- Commons Monitoring
labels: {}
tracing:
# -- enable tracing on all components
# @section -- Commons Tracing
enabled: false
http:
# -- http endpoint
# @section -- Commons Tracing
endpoint: "http://tempo.monitoring.svc:4318/v1/traces"
grpc:
# -- prefer grpc over http
# @section -- Commons Tracing
enabled: true
# -- allow insecure connection per grpc
# @section -- Commons Tracing
insecure: true
# -- grpc endpoint
# @section -- Commons Tracing
endpoint: "tempo.monitoring.svc:4317"
auth:
# -- generated by .Values.commons.masterPassword
clientID: