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
30 changes: 30 additions & 0 deletions charts/netbird/templates/dashboard-http-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.dashboard.enabled -}}
{{- if .Values.dashboard.httpRoute.enabled -}}
{{- $fullName := printf "%s-dashboard" (include "netbird.fullname" .) -}}
{{- $svcPort := .Values.dashboard.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}-http-route
namespace: {{ include "netbird.namespace" . }}
labels:
{{- include "netbird.dashboard.labels" . | nindent 4 }}
spec:
{{- with .Values.dashboard.httpRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.dashboard.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
matches:
- path:
type: PathPrefix
value: /
{{- end }}
{{- end }}
36 changes: 36 additions & 0 deletions charts/netbird/templates/management-grpc-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{{- if .Values.management.enabled -}}
{{- if .Values.management.grpcRoute.enabled -}}
{{- $fullName := printf "%s-management-grpc" (include "netbird.fullname" .) -}}
{{- $useBackwardsGrpcService := .Values.management.useBackwardsGrpcService -}}
{{- $svcNameGrpc := printf "%s-management-grpc" (include "netbird.fullname" .) -}}
{{- $svcPortGrpc := .Values.management.serviceGrpc.port -}}
{{- $svcName := printf "%s-management" (include "netbird.fullname" .) -}}
{{- $svcPort := .Values.management.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {{ $fullName }}-grpc-route
namespace: {{ include "netbird.namespace" . }}
labels:
{{- include "netbird.management.labels" . | nindent 4 }}
spec:
{{- with .Values.management.grpcRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.management.grpcRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ if $useBackwardsGrpcService }}{{ $svcNameGrpc }}{{ else }}{{ $svcName }}{{ end }}
port: {{ if $useBackwardsGrpcService }}{{ $svcPortGrpc }}{{ else }}{{ $svcPort }}{{ end }}
matches:
- headers:
- name: Content-Type
value: application/grpc
method:
service: management.ManagementService
{{- end }}
{{- end }}
30 changes: 30 additions & 0 deletions charts/netbird/templates/management-http-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.management.enabled -}}
{{- if .Values.management.httpRoute.enabled -}}
{{- $fullName := printf "%s-management" (include "netbird.fullname" .) -}}
{{- $svcPort := .Values.management.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}-http-route
namespace: {{ include "netbird.namespace" . }}
labels:
{{- include "netbird.management.labels" . | nindent 4 }}
spec:
{{- with .Values.management.httpRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.management.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
matches:
- path:
type: PathPrefix
value: /api
{{- end }}
{{- end }}
30 changes: 30 additions & 0 deletions charts/netbird/templates/relay-http-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.relay.enabled -}}
{{- if .Values.relay.httpRoute.enabled -}}
{{- $fullName := printf "%s-relay" (include "netbird.fullname" .) -}}
{{- $svcPort := .Values.relay.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ $fullName }}-http-route
namespace: {{ include "netbird.namespace" . }}
labels:
{{- include "netbird.relay.labels" . | nindent 4 }}
spec:
{{- with .Values.relay.httpRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.relay.httpRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
matches:
- path:
type: PathPrefix
value: /relay
{{- end }}
{{- end }}
32 changes: 32 additions & 0 deletions charts/netbird/templates/signal-grpc-route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{- if .Values.signal.enabled -}}
{{- if .Values.signal.grpcRoute.enabled -}}
{{- $fullName := printf "%s-signal" (include "netbird.fullname" .) -}}
{{- $svcPort := .Values.signal.service.port -}}
apiVersion: gateway.networking.k8s.io/v1
kind: GRPCRoute
metadata:
name: {{ $fullName }}-grpc-route
namespace: {{ include "netbird.namespace" . }}
labels:
{{- include "netbird.signal.labels" . | nindent 4 }}
spec:
{{- with .Values.signal.grpcRoute.parentRefs }}
parentRefs:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.signal.grpcRoute.hostnames }}
hostnames:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
- backendRefs:
- name: {{ $fullName }}
port: {{ $svcPort }}
matches:
- headers:
- name: Content-Type
value: application/grpc
method:
service: signalexchange.SignalExchange
{{- end }}
{{- end }}
80 changes: 80 additions & 0 deletions charts/netbird/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,22 @@ management:
# hosts:
# - chart-example.local

httpRoute:
## @param management.httpRoute.enabled Enable or disable Gateway API for the management component.
##
enabled: false

## @param management.httpRoute.parentRefs Parent references for the Gateway API resource.
##
parentRefs: []
# - name: external
# namespace: gateway

## @param management.httpRoute.hostnames Hostnames for the Gateway API resource.
##
hostnames: []
# - example.com

ingressGrpc:
## @param management.ingressGrpc.enabled Enable or disable GRPC ingress.
##
Expand Down Expand Up @@ -232,6 +248,22 @@ management:
##
tls: []

grpcRoute:
## @param management.grpcRoute.enabled Enable or disable Gateway API for the management GRPC component.
##
enabled: false

## @param management.grpcRoute.parentRefs Parent references for the Gateway API GRPC resource.
##
parentRefs: []
# - name: external
# namespace: gateway

## @param management.grpcRoute.hostnames Hostnames for the Gateway API GRPC resource.
##
hostnames: []
# - example.com

## @param management.resources Resource requests and limits for the management pod.
##
resources: {}
Expand Down Expand Up @@ -434,6 +466,22 @@ signal:
##
tls: []

grpcRoute:
## @param signal.grpcRoute.enabled Enable or disable Gateway API for the signal component.
##
enabled: false

## @param signal.grpcRoute.parentRefs Parent references for the Gateway API resource.
##
parentRefs: []
# - name: external
# namespace: gateway

## @param signal.grpcRoute.hostnames Hostnames for the Gateway API resource.
##
hostnames: []
# - example.com

## @

## param signal.resources Resource requests and limits for the signal pod.
Expand Down Expand Up @@ -627,6 +675,22 @@ relay:
##
tls: []

httpRoute:
## @param relay.httpRoute.enabled Enable or disable Gateway API for the relay component.
##
enabled: false

## @param relay.httpRoute.parentRefs Parent references for the Gateway API resource.
##
parentRefs: []
# - name: external
# namespace: gateway

## @param relay.httpRoute.hostnames Hostnames for the Gateway API resource.
##
hostnames: []
# - example.com

## @param relay.resources Resource requests and limits for the relay pod.
##
resources: {}
Expand Down Expand Up @@ -790,6 +854,22 @@ dashboard:
# hosts:
# - chart-example.local

httpRoute:
## @param dashboard.httpRoute.enabled Enable or disable Gateway API for the dashboard component.
##
enabled: false

## @param dashboard.httpRoute.parentRefs Parent references for the Gateway API resource.
##
parentRefs: []
# - name: external
# namespace: gateway

## @param dashboard.httpRoute.hostnames Hostnames for the Gateway API resource.
##
hostnames: []
# - example.com

## @param dashboard.resources
resources: {}
# limits:
Expand Down