Skip to content

Commit

Permalink
feat(helm): add pure Ingress option instead of the gateway service (#…
Browse files Browse the repository at this point in the history
…6932)

Signed-off-by: Mickaël Canévet <[email protected]>
  • Loading branch information
mcanevet authored Dec 18, 2023
1 parent a400e0c commit 37a69f4
Show file tree
Hide file tree
Showing 67 changed files with 4,209 additions and 0 deletions.
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Entries should include a reference to the Pull Request that introduced the chang
## main / unreleased

* [FEATURE] Added option to enable StatefulSetAutoDeletePVC for StatefulSets for compactor, ingester, store-gateway, and alertmanager via `*.persistance.enableRetentionPolicy`, `*.persistance.whenDeleted`, and `*.persistance.whenScaled`. #6106
* [FEATURE] Add pure Ingress option instead of the gateway service. #6932
* [CHANGE] Remove deprecated configuration parameter `blocks_storage.bucket_store.max_chunk_pool_bytes`. #6673
* [CHANGE] Reduce `-server.grpc-max-concurrent-streams` from 1000 to 500 for ingester and to 100 for all components. #5666
* [CHANGE] Changed default `clusterDomain` from `cluster.local` to `cluster.local.` to reduce the number of DNS lookups made by Mimir. #6389
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Pin kube version so results are the same for running in CI and locally where the installed kube version may be different.
kubeVersionOverride: "1.20"

ingress:
enabled: true
46 changes: 46 additions & 0 deletions operations/helm/charts/mimir-distributed/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "mimir.fullname" . }}
labels:
{{- include "mimir.labels" (dict "ctx" .) | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
namespace: {{ .Release.Namespace | quote }}
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:
service:
name: {{ include "mimir.fullname" $ }}-{{ $svcName }}
port:
number: {{ include "mimir.serverHttpListenPort" $ }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,7 @@
{{- end -}}
{{- end -}}
{{- end -}}

{{- 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 -}}
33 changes: 33 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2487,6 +2487,39 @@ nginx:
}
}
# -- 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-headless:
- path: /distributor
# -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
# pathType: Prefix
- path: /api/v1/push
- path: /otlp/v1/metrics
alertmanager-headless:
- path: /alertmanager
- path: /multitenant_alertmanager/status
- path: /api/v1/alerts
ruler:
- path: /prometheus/config/v1/rules
- path: /prometheus/api/v1/rules
- path: /prometheus/api/v1/alerts
query-frontend:
- path: /prometheus
- path: /api/v1/status/buildinfo
compactor:
- path: /api/v1/upload/block/
hosts:
- mimir.example.com
# tls:
# - secretName: mimir-distributed-tls
# hosts:
# - mimir.example.com

# -- A reverse proxy deployment that is meant to receive traffic for Mimir or GEM.
# When enterprise.enabled is true the GEM gateway is deployed. Otherwise, it is an nginx.
# Options except those under gateway.nginx apply to both versions - nginx and GEM gateway.
Expand Down
Loading

0 comments on commit 37a69f4

Please sign in to comment.