mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user