Add support for private gateway (#154)

This change adds support for TCPRoutes when using a private gateway
class. This is similar to annotating services today. It also moves the
gateway classes to the Helm chart as it makes things a lot simpler for
the end user as they no longer have to define them.

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine
2026-03-23 09:59:48 +01:00
committed by GitHub
parent 2aa814f031
commit 8adc8855e5
13 changed files with 340 additions and 76 deletions
+11 -2
View File
@@ -39,12 +39,21 @@ func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req ctrl.Request
}
// Validate configuration.
if gwc.Spec.ParametersRef != nil {
message := func() string {
if gwc.Name != "netbird-public" && gwc.Name != "netbird-private" {
return "GatewayClass name must be netbird-public or netbird-private."
}
if gwc.Spec.ParametersRef != nil {
return "Parameters references is not supported."
}
return ""
}()
if message != "" {
cond := metav1.Condition{
Type: string(gatewayv1.GatewayClassConditionStatusAccepted),
Status: metav1.ConditionFalse,
Reason: string(gatewayv1.GatewayClassReasonInvalidParameters),
Message: "Parameters references is not supported.",
Message: message,
}
if meta.SetStatusCondition(&gwc.Status.Conditions, cond) {
err = r.Client.Status().Update(ctx, &gwc)