Skip to content

Commit

Permalink
add ingress with no gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Jul 18, 2024
1 parent 7870c39 commit fb1a2d5
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/tempo-distributed/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: tempo-distributed
description: Grafana Tempo in MicroService mode
type: application
version: 1.15.1
version: 1.16.0
appVersion: 2.5.0
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
{{- if and .Values.ingress.enabled .Values.gateway.ingress.enabled -}}
{{- fail "You have selected both ingress.enabled and gateway.ingress.enabled, you must select either ingress or gateway but not both" -}}
{{- end -}}

{{- if .Values.gateway.enabled -}}
{{- if .Values.gateway.ingress.enabled -}}
{{ $dict := dict "ctx" . "component" "gateway" }}
Expand Down
58 changes: 58 additions & 0 deletions charts/tempo-distributed/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{{- if .Values.ingress.enabled }}
{{ $dict := dict "ctx" . "component" "gateway" }}
{{- $ingressApiIsStable := eq (include "tempo.ingress.isStable" .) "true" -}}
{{- $ingressSupportsIngressClassName := eq (include "tempo.ingress.supportsIngressClassName" .) "true" -}}
{{- $ingressSupportsPathType := eq (include "tempo.ingress.supportsPathType" .) "true" -}}
apiVersion: {{ include "tempo.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ include "tempo.resourceName" $dict }}
labels:
{{- include "tempo.labels" (dict "ctx" . "component" "gateway") | nindent 4 }}
{{- with .Values.ingress.labels }}
{{- toYaml . | nindent 4}}
{{- end}}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace }}
spec:
{{- with .Values.ingress.ingressClassName }}
ingressClassName: {{ . }}
{{- end -}}
{{- with .Values.ingress.tls }}
tls:
{{- range . }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range $.Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
{{- range $svcName, $paths := $.Values.ingress.paths }}
{{- range $paths }}
- path: {{ .path }}
pathType: {{ .pathType | default "Prefix" }}
backend:
{{- if $ingressApiIsStable }}
service:
name: {{ include "tempo.resourceName" $dict }}
port:
number: {{ $.Values.ingress.service.port }}
{{- else }}
serviceName: {{ include "tempo.resourceName" $dict }}
servicePort: {{ $.Values.ingress.service.port }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
26 changes: 26 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1942,6 +1942,32 @@ gateway:
}
}
# -- Use either this ingress or the gateway, but not both at once.
# If you enable this, make sure to disable the gateway's ingress.
ingress:
enabled: false
# ingressClassName: nginx
annotations: {}
paths:
distributor:
- path: /jaeger/api/traces
# -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
# pathType: Prefix
- path: /zipkin/spans
- path: /v1/traces
- path: /otlp/v1/traces
- path: /distributor/ring
- path: /ingester/ring
ingester:
- path: /flush
- path: /shutdown
query-frontend:
- path: /api
compactor:
- path: /api/v1/upload/block/
hosts:
- tempo.example.com

##############################################################################
# The values in and after the `enterprise:` key configure the enterprise features
enterprise:
Expand Down

0 comments on commit fb1a2d5

Please sign in to comment.