Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions docs/sources/setup/install/helm/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -5197,6 +5197,103 @@ null
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>gateway.route.additionalRules</td>
<td>list</td>
<td>Additional custom rules that can be added to the route</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>gateway.route.annotations</td>
<td>object</td>
<td>Annotations for the gateway route</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>gateway.route.apiVersion</td>
<td>string</td>
<td>Set the route apiVersion, e.g. gateway.networking.k8s.io/v1</td>
<td><pre lang="json">
"gateway.networking.k8s.io/v1"
</pre>
</td>
</tr>
<tr>
<td>gateway.route.enabled</td>
<td>bool</td>
<td>Enables or disables the route</td>
<td><pre lang="json">
false
</pre>
</td>
</tr>
<tr>
<td>gateway.route.filters</td>
<td>list</td>
<td>Filters define the filters that are applied to requests that match this rule</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>gateway.route.hostnames</td>
<td>list</td>
<td>Hostnames configuration for the gateway route, passed through the `tpl` function to allow templating</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>gateway.route.kind</td>
<td>string</td>
<td>Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute</td>
<td><pre lang="json">
"HTTPRoute"
</pre>
</td>
</tr>
<tr>
<td>gateway.route.labels</td>
<td>object</td>
<td>Labels for the gateway route</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>gateway.route.matches</td>
<td>list</td>
<td>Matches define the predicates used for matching requests to a given action</td>
<td><pre lang="json">
[
{
"path": {
"type": "PathPrefix",
"value": "/"
}
}
]
</pre>
</td>
</tr>
<tr>
<td>gateway.route.parentRefs</td>
<td>list</td>
<td>The list of parent Gateways this route should be attached to, passed through the `tpl` function to allow templating</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -11790,6 +11887,86 @@ null
}
}
</pre>
</td>
</tr>
<tr>
<td>route</td>
<td>object</td>
<td>Route configuration (Gateway API). Use either this route or the gateway, but not both at once. If you enable this, make sure to disable the gateway. Route uses the same path configuration as ingress above for component-level routing.</td>
<td><pre lang="json">
{
"annotations": {},
"apiVersion": "gateway.networking.k8s.io/v1",
"enabled": false,
"hostnames": [],
"kind": "HTTPRoute",
"labels": {},
"parentRefs": []
}
</pre>
</td>
</tr>
<tr>
<td>route.annotations</td>
<td>object</td>
<td>Annotations for the route</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>route.apiVersion</td>
<td>string</td>
<td>Set the route apiVersion, e.g. gateway.networking.k8s.io/v1</td>
<td><pre lang="json">
"gateway.networking.k8s.io/v1"
</pre>
</td>
</tr>
<tr>
<td>route.enabled</td>
<td>bool</td>
<td>Enables or disables the route</td>
<td><pre lang="json">
false
</pre>
</td>
</tr>
<tr>
<td>route.hostnames</td>
<td>list</td>
<td>Hostnames configuration for the route, passed through the `tpl` function to allow templating</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
<td>route.kind</td>
<td>string</td>
<td>Set the route kind Valid options are GRPCRoute, HTTPRoute, TCPRoute, TLSRoute, UDPRoute</td>
<td><pre lang="json">
"HTTPRoute"
</pre>
</td>
</tr>
<tr>
<td>route.labels</td>
<td>object</td>
<td>Labels for the route</td>
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>route.parentRefs</td>
<td>list</td>
<td>The list of parent Gateways this route should be attached to, passed through the `tpl` function to allow templating</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>
Expand Down
2 changes: 2 additions & 0 deletions production/helm/loki/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Entries should include a reference to the pull request that introduced the chang

## Unreleased

- [FEATURE] Add full HTTPRoute support (Gateway API v1) for both gateway and component-level routing with filters, multiple parentRefs, and custom rules. [#19729](https://github.com/grafana/loki/pull/19729)

## 6.46.0

Expand All @@ -31,6 +32,7 @@ Entries should include a reference to the pull request that introduced the chang
- [CHANGE] Changed one missed version of Grafana Loki to 3.5.7.

## 6.45.0

- [CHANGE] Remove unused `storageClass` field from compactor persistence configuration. Storage class should be configured per-claim in the `claims` array instead.[#19443](https://github.com/grafana/loki/pull/19443)
- [ENHANCEMENT] Update default readiness probe values to match operator [#19529](https://github.com/grafana/loki/pull/19529)
- [ENHANCEMENT] Allow configuration of alert rule severalties and thresholds[#13730](https://github.com/grafana/loki/pull/13730)
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, simple scalable, and microservices modes.
type: application
appVersion: 3.5.7
version: 6.46.0
version: 6.47.0
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
2 changes: 1 addition & 1 deletion production/helm/loki/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki

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

Helm chart for Grafana Loki and Grafana Enterprise Logs supporting monolithic, simple scalable, and microservices modes.

Expand Down
36 changes: 36 additions & 0 deletions production/helm/loki/ci/route-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
gateway:
route:
enabled: true
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
annotations: {}
parentRefs:
- name: loki-gateway
namespace: loki
hostnames:
- gateway.loki.example.com
matches:
- path:
type: PathPrefix
value: /
loki:
commonConfig:
replication_factor: 1
useTestSchema: true
storage:
bucketNames:
chunks: chunks
ruler: ruler
admin: admin
read:
replicas: 1
write:
replicas: 1
backend:
replicas: 1
monitoring:
lokiCanary:
enabled: false
test:
enabled: false
106 changes: 106 additions & 0 deletions production/helm/loki/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,112 @@ Params:
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for HTTPRoute (Gateway API).
*/}}
{{- define "loki.httproute.apiVersion" -}}
{{- print "gateway.networking.k8s.io/v1" -}}
{{- end -}}

{{/*
HTTPRoute labels for gateway component
*/}}
{{- define "loki.httproute.gatewayLabels" -}}
{{ include "loki.gatewayLabels" . }}
{{- end -}}

{{/*
HTTPRoute labels for main ingress
*/}}
{{- define "loki.httproute.labels" -}}
{{ include "loki.labels" . }}
{{- end -}}

{{/*
Generate HTTPRoute rules for distributed deployment
Params:
ctx = . context
serviceName = fully qualified k8s service name
servicePort = service port number
paths = list of url paths to route
*/}}
{{- define "loki.httproute.backendRefs" -}}
{{- range .paths }}
- matches:
- path:
type: PathPrefix
value: {{ . }}
backendRefs:
- name: {{ $.serviceName }}
port: {{ $.servicePort }}
{{- end -}}
{{- end -}}

{{/*
Generate HTTPRoute rules based on deployment type
*/}}
{{- define "loki.httproute.serviceRules" -}}
{{- if (eq (include "loki.deployment.isSingleBinary" .) "true") -}}
{{- include "loki.httproute.singleBinaryServiceRules" . }}
{{- else if (eq (include "loki.deployment.isDistributed" .) "true") -}}
{{- include "loki.httproute.distributedServiceRules" . }}
{{- else if and (eq (include "loki.deployment.isScalable" .) "true") (not .Values.read.legacyReadTarget ) -}}
{{- include "loki.httproute.scalableServiceRules" . }}
{{- else -}}
{{- include "loki.httproute.legacyScalableServiceRules" . }}
{{- end -}}
{{- end -}}

{{/*
HTTPRoute rules for distributed deployment
*/}}
{{- define "loki.httproute.distributedServiceRules" -}}
{{- $distributorServiceName := include "loki.distributorFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $distributorServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.distributor )}}
{{- $queryFrontendServiceName := include "loki.queryFrontendFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $queryFrontendServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.queryFrontend )}}
{{- $rulerServiceName := include "loki.rulerFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $rulerServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.ruler)}}
{{- $compactorServiceName := include "loki.compactorFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $compactorServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.compactor)}}
{{- end -}}

{{/*
HTTPRoute rules for simple scalable deployment
*/}}
{{- define "loki.httproute.scalableServiceRules" -}}
{{- $readServiceName := include "loki.readFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $readServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.queryFrontend )}}
{{- $writeServiceName := include "loki.writeFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $writeServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.distributor )}}
{{- $backendServiceName := include "loki.backendFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $backendServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.ruler )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $backendServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.compactor )}}
{{- end -}}

{{/*
HTTPRoute rules for legacy simple scalable deployment
*/}}
{{- define "loki.httproute.legacyScalableServiceRules" -}}
{{- $readServiceName := include "loki.readFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $readServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.queryFrontend )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $readServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.ruler )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $readServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.compactor )}}
{{- $writeServiceName := include "loki.writeFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $writeServiceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.distributor )}}
{{- end -}}

{{/*
HTTPRoute rules for single binary deployment
*/}}
{{- define "loki.httproute.singleBinaryServiceRules" -}}
{{- $serviceName := include "loki.singleBinaryFullname" . }}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $serviceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.distributor )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $serviceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.queryFrontend )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $serviceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.ruler )}}
{{- include "loki.httproute.backendRefs" (dict "ctx" . "serviceName" $serviceName "servicePort" .Values.loki.server.http_listen_port "paths" .Values.ingress.paths.compactor )}}
{{- end -}}

{{/*
Create the service endpoint including port for MinIO.
*/}}
Expand Down
Loading