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
2 changes: 1 addition & 1 deletion charts/influxdb2/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: influxdb2
description: A Helm chart for InfluxDB v2
home: https://www.influxdata.com/products/influxdb/
type: application
version: 2.1.2
version: 2.1.3
maintainers:
- name: rawkode
email: rawkode@influxdata.com
Expand Down
21 changes: 21 additions & 0 deletions charts/influxdb2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ For more information see "Automated Setup" in the [docker image README](https://

For configuration options see `adminUser` in `values.yaml`.

## HTTPRoute (Gateway API)

This chart supports the [Kubernetes Gateway API](https://gateway-api.sigs.k8s.io/) HTTPRoute resource as an alternative to Ingress.

To enable HTTPRoute:

```yaml
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
namespace: gateway-namespace
sectionName: https
hostnames:
- influxdb.example.com
path: /
pathType: PathPrefix
```

> **Note**: You must have a Gateway API implementation (e.g., Envoy Gateway, Istio, Cilium) installed in your cluster.

## Configuration

Extra environment variables can be passed influxdb using `.Values.env`. For
Expand Down
42 changes: 42 additions & 0 deletions charts/influxdb2/templates/httproute.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{- if .Values.httpRoute.enabled }}
{{- if not .Values.httpRoute.parentRefs }}
{{- fail "httpRoute.parentRefs is required when httpRoute.enabled is true. Please specify at least one Gateway reference." }}
{{- end }}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ include "influxdb.fullname" . }}
labels:
{{- include "influxdb.labels" . | nindent 4 }}
{{- with .Values.httpRoute.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.httpRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- matches:
- path:
type: {{ .Values.httpRoute.pathType }}
value: {{ .Values.httpRoute.path }}
{{- with .Values.httpRoute.filters }}
filters:
{{- toYaml . | nindent 8 }}
{{- end }}
backendRefs:
- group: ""
kind: Service
name: {{ include "influxdb.fullname" . }}
port: {{ .Values.service.port }}
weight: 1
{{- end }}
29 changes: 29 additions & 0 deletions charts/influxdb2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,35 @@ ingress:
# kubernetes.io/tls-acme: "true"
path: /

## Gateway API HTTPRoute configuration
## Ref: https://gateway-api.sigs.k8s.io/api-types/httproute/
httpRoute:
## Enable HTTPRoute resource for InfluxDB (Gateway API)
enabled: false
## Additional HTTPRoute labels
labels: {}
## Additional HTTPRoute annotations
annotations: {}
## Gateway API parentRefs for the HTTPRoute
## Must reference an existing Gateway
parentRefs: []
# - name: example-gateway
# namespace: example-gateway-namespace
# sectionName: https
## List of hostnames for the HTTPRoute
hostnames: []
# - influxdb.example.com
## Path matching configuration
path: /
pathType: PathPrefix
## HTTPRoute filters
filters: []
# - type: RequestHeaderModifier
# requestHeaderModifier:
# add:
# - name: X-Custom-Header
# value: custom-value

## Pod disruption budget configuration
##
pdb:
Expand Down