diff --git a/charts/tempo/Chart.yaml b/charts/tempo/Chart.yaml index b12a1c9757..6fe3bb9f57 100644 --- a/charts/tempo/Chart.yaml +++ b/charts/tempo/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: tempo description: Grafana Tempo Single Binary Mode type: application -version: 1.14.0 +version: 1.15.0 appVersion: 2.6.1 engine: gotpl home: https://grafana.net diff --git a/charts/tempo/README.md b/charts/tempo/README.md index 51460b7de4..5c99822194 100644 --- a/charts/tempo/README.md +++ b/charts/tempo/README.md @@ -1,6 +1,6 @@ # tempo -![Version: 1.14.0](https://img.shields.io/badge/Version-1.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square) +![Version: 1.15.0](https://img.shields.io/badge/Version-1.15.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square) Grafana Tempo Single Binary Mode @@ -40,7 +40,10 @@ Grafana Tempo Single Binary Mode | replicas | int | `1` | Define the amount of instances | | securityContext | object | `{"fsGroup":10001,"runAsGroup":10001,"runAsNonRoot":true,"runAsUser":10001}` | securityContext for container | | service.annotations | object | `{}` | | +| service.clusterIP | string | `""` | | | service.labels | object | `{}` | | +| service.loadBalancerIP | string | `nil` | IP address, in case of 'type: LoadBalancer' | +| service.protocol | string | `"TCP"` | If service type is LoadBalancer, the exposed protocol can either be "UDP", "TCP" or "UDP,TCP" | | service.targetPort | string | `""` | | | service.type | string | `"ClusterIP"` | | | serviceAccount.annotations | object | `{}` | Annotations for the service account | diff --git a/charts/tempo/templates/_ports.tpl b/charts/tempo/templates/_ports.tpl new file mode 100644 index 0000000000..e65378489d --- /dev/null +++ b/charts/tempo/templates/_ports.tpl @@ -0,0 +1,88 @@ +{{/* ~=~=~ Partial Templates of exposed Ports ~=~=~ */}} + +{{/* UDP sockets */}} +{{- define "tempo.udp"}} +{{- $endpoint := .Values.tempo.receivers.jaeger.protocols.thrift_compact }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: tempo-jaeger-thrift-compact + port: {{ $port }} + protocol: UDP + targetPort: 6831 +{{- end }} +{{- $endpoint := .Values.tempo.receivers.jaeger.protocols.thrift_binary }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: tempo-jaeger-thrift-binary + port: {{ $port }} + protocol: UDP + targetPort: 6832 +{{- end }} +{{- /* end of define */}} +{{- end }} + +{{/* TCP sockets */}} +{{- define "tempo.tcp"}} +- name: tempo-prom-metrics + port: 3100 + protocol: TCP + targetPort: 3100 +{{- if .Values.tempoQuery.enabled }} +- name: jaeger-metrics + port: 16687 + protocol: TCP + targetPort: 16687 +- name: tempo-query-jaeger-ui + port: {{ .Values.tempoQuery.service.port }} + targetPort: {{ .Values.tempoQuery.service.port }} +{{- end }} +{{- $endpoint := .Values.tempo.receivers.jaeger.protocols.thrift_http }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: tempo-jaeger-thrift-http + port: {{ $port }} + protocol: TCP + targetPort: 14268 +{{- end }} +{{- $endpoint := .Values.tempo.receivers.jaeger.protocols.grpc }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: grpc-tempo-jaeger + port: {{ $port }} + protocol: TCP + targetPort: 14250 +{{- end }} +- name: tempo-zipkin + port: 9411 + protocol: TCP + targetPort: 9411 +- name: tempo-otlp-legacy + port: 55680 + protocol: TCP + targetPort: 55680 +- name: tempo-otlp-http-legacy + port: 55681 + protocol: TCP + targetPort: 55681 +{{- $endpoint := .Values.tempo.receivers.otlp.protocols.grpc }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: grpc-tempo-otlp + port: {{ $port }} + protocol: TCP + targetPort: 4317 +{{- end }} +{{- $endpoint := .Values.tempo.receivers.otlp.protocols.http }} +{{- with $endpoint.endpoint }} +{{- $port := regexSplit ":" . -1 | last }} +- name: tempo-otlp-http + port: {{ $port }} + protocol: TCP + targetPort: 4318 +{{- end }} +- name: tempo-opencensus + port: 55678 + protocol: TCP + targetPort: 55678 +{{- /* end of define */}} +{{- end }} \ No newline at end of file diff --git a/charts/tempo/templates/service.yaml b/charts/tempo/templates/service.yaml index 4e23e336d4..9c607d9354 100644 --- a/charts/tempo/templates/service.yaml +++ b/charts/tempo/templates/service.yaml @@ -1,3 +1,4 @@ + apiVersion: v1 kind: Service metadata: @@ -32,56 +33,20 @@ spec: {{- end }} {{- end }} ports: - - name: tempo-prom-metrics - port: 3100 - targetPort: 3100 - {{- if .Values.tempoQuery.enabled }} - - name: jaeger-metrics - port: 16687 - targetPort: 16687 - - name: tempo-query-jaeger-ui - port: {{ .Values.tempoQuery.service.port }} - targetPort: {{ .Values.tempoQuery.service.port }} + {{- if (eq .Values.service.type "LoadBalancer") }} + {{- $protocol := .Values.service.protocol | default "TCP" }} + {{- if contains "UDP" $protocol }} + {{- include "tempo.udp" . | indent 2 }} + {{- end }} + {{- if contains "TCP" $protocol }} + {{- include "tempo.tcp" . | indent 2 }} + {{- end }} + {{- else }} + {{- include "tempo.udp" . | indent 2 }} + {{- include "tempo.tcp" . | indent 2 }} {{- end }} - - name: tempo-jaeger-thrift-compact - port: 6831 - protocol: UDP - targetPort: 6831 - - name: tempo-jaeger-thrift-binary - port: 6832 - protocol: UDP - targetPort: 6832 - - name: tempo-jaeger-thrift-http - port: 14268 - protocol: TCP - targetPort: 14268 - - name: grpc-tempo-jaeger - port: 14250 - protocol: TCP - targetPort: 14250 - - name: tempo-zipkin - port: 9411 - protocol: TCP - targetPort: 9411 - - name: tempo-otlp-legacy - port: 55680 - protocol: TCP - targetPort: 55680 - - name: tempo-otlp-http-legacy - port: 55681 - protocol: TCP - targetPort: 4318 - - name: grpc-tempo-otlp - port: 4317 - protocol: TCP - targetPort: 4317 - - name: tempo-otlp-http - port: 4318 - protocol: TCP - targetPort: 4318 - - name: tempo-opencensus - port: 55678 - protocol: TCP - targetPort: 55678 selector: {{- include "tempo.selectorLabels" . | nindent 4 }} + + + diff --git a/charts/tempo/values.yaml b/charts/tempo/values.yaml index 2b9ce226ef..310b8c85b5 100644 --- a/charts/tempo/values.yaml +++ b/charts/tempo/values.yaml @@ -263,6 +263,12 @@ serviceAccount: service: type: ClusterIP + clusterIP: "" + # -- (string) IP address, in case of 'type: LoadBalancer' + loadBalancerIP: + # -- If service type is LoadBalancer, the exposed protocol can either be "UDP", "TCP" or "UDP,TCP" + protocol: "TCP" + annotations: {} labels: {} targetPort: ""