Gateway API support (#117)

This change adds support for the new proxy service to the operator
through Gateway API. This change attempts to standardize concepts around
the Gateway API to allow for compatibility with other projects.

Fixes #111
Fixes #44

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-03-19 13:01:58 +01:00
committed by GitHub
parent ccf819d2ff
commit 7acd175882
11 changed files with 769 additions and 69 deletions
+30
View File
@@ -0,0 +1,30 @@
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: public
spec:
controllerName: "gateway.netbird.io/controller"
---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: netbird
namespace: netbird
spec:
gatewayClassName: public
listeners:
- protocol: HTTP
port: 80
name: dummy
infrastructure:
parametersRef:
group: netbird.io
kind: NBRoutingPeer
name: netbird
---
apiVersion: netbird.io/v1
kind: NBRoutingPeer
metadata:
name: netbird
namespace: netbird
spec: {}
+61
View File
@@ -0,0 +1,61 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: nginx
namespace: default
labels:
app: nginx
spec:
hostnames:
- nginx-test-app.eu1.netbird.services
parentRefs:
- name: netbird
namespace: netbird
rules:
- backendRefs:
- name: nginx
port: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
namespace: default
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
imagePullPolicy: Always
name: nginx
---
apiVersion: v1
kind: Service
metadata:
name: nginx
namespace: default
labels:
app: nginx
spec:
type: ClusterIP
ports:
- name: http
port: 80
protocol: TCP
targetPort: 80
selector:
app: nginx