From a4ea018ff43fd36812a9c1ac9b4f010f2be06da5 Mon Sep 17 00:00:00 2001 From: Victor Oriol Date: Tue, 7 Apr 2026 15:45:36 +0200 Subject: [PATCH 1/2] httproute-support --- charts/netdata/README.md | 54 +++++++++++++++++++ .../netdata/templates/parent/httproute.yaml | 41 ++++++++++++++ charts/netdata/values.yaml | 20 +++++++ 3 files changed, 115 insertions(+) create mode 100644 charts/netdata/templates/parent/httproute.yaml diff --git a/charts/netdata/README.md b/charts/netdata/README.md index 499e8680..356f61d9 100644 --- a/charts/netdata/README.md +++ b/charts/netdata/README.md @@ -368,6 +368,60 @@ See values.yaml for defaults URL hostnames for the ingress (they need to resolve to the external IP of the ingress controller) + + httpRoute.enabled + bool +
+false
+
+ + Create HTTPRoute to access the netdata web UI via Gateway API + + + httpRoute.annotations + object +
+{}
+
+ + Additional annotations to add to the HTTPRoute + + + httpRoute.labels + object +
+{}
+
+ + Additional labels to add to the HTTPRoute + + + httpRoute.parentRefs + list +
+[]
+
+ + Parent references for Gateway API HTTPRoute. Required when `httpRoute.enabled=true` + + + httpRoute.hostnames + list +
+[]
+
+ + Hostnames for the HTTPRoute + + + httpRoute.rules + list +
+[]
+
+ + Optional explicit HTTPRoute rules. If empty, a default PathPrefix `/` rule is generated + rbac.create bool diff --git a/charts/netdata/templates/parent/httproute.yaml b/charts/netdata/templates/parent/httproute.yaml new file mode 100644 index 00000000..da65695b --- /dev/null +++ b/charts/netdata/templates/parent/httproute.yaml @@ -0,0 +1,41 @@ +{{- if and .Values.parent.enabled .Values.httpRoute.enabled -}} +{{- $fullName := include "netdata.name" . -}} +{{- $svcPort := .Values.service.port -}} + +apiVersion: gateway.networking.k8s.io/v1 +kind: HTTPRoute +metadata: + name: {{ $fullName }} + namespace: {{ .Release.Namespace }} + labels: + app: {{ template "netdata.name" . }} + chart: {{ template "netdata.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.httpRoute.labels }} +{{ toYaml . | indent 4 }} +{{- end }} +{{- with .Values.httpRoute.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: + parentRefs: +{{ required "A valid .Values.httpRoute.parentRefs entry is required when httpRoute.enabled is true" .Values.httpRoute.parentRefs | toYaml | indent 4 }} +{{- with .Values.httpRoute.hostnames }} + hostnames: +{{ toYaml . | indent 4 }} +{{- end }} + rules: +{{- if .Values.httpRoute.rules }} +{{ toYaml .Values.httpRoute.rules | indent 4 }} +{{- else }} + - matches: + - path: + type: PathPrefix + value: / + backendRefs: + - name: {{ $fullName }} + port: {{ $svcPort }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/netdata/values.yaml b/charts/netdata/values.yaml index bdc4d9e3..8aedf660 100644 --- a/charts/netdata/values.yaml +++ b/charts/netdata/values.yaml @@ -139,6 +139,26 @@ ingress: # hosts: # - netdata.k8s.local +httpRoute: + # -- Create HTTPRoute to access the netdata web UI via Gateway API + # @section -- General settings + enabled: false + # -- Additional annotations to add to the HTTPRoute + # @section -- General settings + annotations: {} + # -- Additional labels to add to the HTTPRoute + # @section -- General settings + labels: {} + # -- Parent references for Gateway API HTTPRoute. Required when `httpRoute.enabled=true` + # @section -- General settings + parentRefs: [] + # -- Hostnames for the HTTPRoute + # @section -- General settings + hostnames: [] + # -- Optional explicit HTTPRoute rules. If empty, a default PathPrefix `/` rule is generated + # @section -- General settings + rules: [] + rbac: # -- if true, create & use RBAC resources # @section -- General settings From 460c90e4913825a40ff2ddda07d583aedae3db53 Mon Sep 17 00:00:00 2001 From: Victor Oriol Date: Wed, 8 Apr 2026 09:30:46 +0200 Subject: [PATCH 2/2] adding a trailing newline --- charts/netdata/templates/parent/httproute.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/netdata/templates/parent/httproute.yaml b/charts/netdata/templates/parent/httproute.yaml index da65695b..622fa1be 100644 --- a/charts/netdata/templates/parent/httproute.yaml +++ b/charts/netdata/templates/parent/httproute.yaml @@ -38,4 +38,4 @@ spec: - name: {{ $fullName }} port: {{ $svcPort }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }}