diff --git a/base-values/infra-tracing.yaml b/base-values/tracing.yaml similarity index 100% rename from base-values/infra-tracing.yaml rename to base-values/tracing.yaml diff --git a/mycloud-gotosocial/templates/release.yaml b/mycloud-gotosocial/templates/release.yaml index 2f9a957..737cf12 100644 --- a/mycloud-gotosocial/templates/release.yaml +++ b/mycloud-gotosocial/templates/release.yaml @@ -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: diff --git a/mycloud-gotosocial/values.yaml b/mycloud-gotosocial/values.yaml index c22918a..d4c6471 100644 --- a/mycloud-gotosocial/values.yaml +++ b/mycloud-gotosocial/values.yaml @@ -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: