Skip to content

Commit

Permalink
add ingress with no gateway
Browse files Browse the repository at this point in the history
Signed-off-by: drfaust92 <[email protected]>
  • Loading branch information
DrFaust92 committed Sep 7, 2024
1 parent bc8f4a1 commit 6cc2fdb
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 2 deletions.
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.18.0
version: 1.19.0
appVersion: 2.6.0
engine: gotpl
home: https://grafana.com/docs/tempo/latest/
Expand Down
13 changes: 12 additions & 1 deletion charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo-distributed

![Version: 1.18.0](https://img.shields.io/badge/Version-1.18.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)
![Version: 1.19.0](https://img.shields.io/badge/Version-1.19.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.0](https://img.shields.io/badge/AppVersion-2.6.0-informational?style=flat-square)

Grafana Tempo in MicroService mode

Expand Down Expand Up @@ -562,6 +562,17 @@ The memcached default args are removed and should be provided manually. The sett
| ingester.zoneAwareReplication.zones[2].extraAffinity | object | `{}` | extraAffinity adds user defined custom affinity rules (merged with generated rules) |
| ingester.zoneAwareReplication.zones[2].nodeSelector | string | `nil` | nodeselector to restrict where pods of this zone can be placed. E.g.: nodeSelector: topology.kubernetes.io/zone: zone-c |
| ingester.zoneAwareReplication.zones[2].storageClass | string | `nil` | Ingester data Persistent Volume Storage Class If defined, storageClassName: <storageClass> If set to "-", then use `storageClassName: ""`, which disables dynamic provisioning If undefined or set to null (the default), then fall back to the value of `ingester.persistentVolume.storageClass`. |
| ingress.annotations | object | `{}` | |
| ingress.enabled | bool | `false` | If you enable this, make sure to disable the gateway's ingress. |
| ingress.hosts[0] | string | `"tempo.example.com"` | |
| ingress.paths.compactor[0].path | string | `"/api/v1/upload/block/"` | |
| ingress.paths.distributor[0].path | string | `"/v1/traces"` | |
| ingress.paths.distributor[0].port | int | `4318` | |
| ingress.paths.distributor[1].path | string | `"/distributor/ring"` | |
| ingress.paths.distributor[2].path | string | `"/ingester/ring"` | |
| ingress.paths.ingester[0].path | string | `"/flush"` | |
| ingress.paths.ingester[1].path | string | `"/shutdown"` | |
| ingress.paths.query-frontend[0].path | string | `"/api"` | |
| license.contents | string | `"NOTAVALIDLICENSE"` | |
| license.external | bool | `false` | |
| license.secretName | string | `"{{ include \"tempo.resourceName\" (dict \"ctx\" . \"component\" \"license\") }}"` | |
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
57 changes: 57 additions & 0 deletions charts/tempo-distributed/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{{- if .Values.ingress.enabled }}
{{- $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.fullname" . }}
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.fullname" $ }}-{{ $svcName }}
port:
number: {{ .port | default (printf "%s" (include "tempo.serverHttpListenPort" $ )) }}
{{- else }}
serviceName: {{ include "tempo.fullname" $ }}-{{ $svcName }}
servicePort: {{ .port | default (printf "%s" (include "tempo.serverHttpListenPort" $ )) }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
23 changes: 23 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,29 @@ gateway:
}
}
ingress:
# -- If you enable this, make sure to disable the gateway's ingress.
enabled: false
# ingressClassName: nginx
annotations: {}
paths:
distributor:
- path: /v1/traces
port: 4318
- path: /distributor/ring
# -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
# pathType: Prefix
- 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 6cc2fdb

Please sign in to comment.