diff --git a/docs/features/grpc.md b/docs/features/grpc.md index 139d1aa..7c4b918 100644 --- a/docs/features/grpc.md +++ b/docs/features/grpc.md @@ -1,7 +1,7 @@ # GRPC routes !!! warning - We tested grpc support only by looking at resources state as traffic providers didn't support grpc well at the moment of development but it would be great if you contribute a real example + We tested grpc support only by looking at resources state as traffic providers didn't support grpc well at the moment of development, but it would be great if you contribute a real example. Due to this, gRPC support is not included in the released builds, but can be tested by building the plugin from the source code. To use GRPCRoute: diff --git a/pkg/plugin/errors.go b/pkg/plugin/errors.go index 33d55a6..6065b1b 100644 --- a/pkg/plugin/errors.go +++ b/pkg/plugin/errors.go @@ -2,7 +2,7 @@ package plugin const ( GatewayAPIUpdateError = "error updating Gateway API %q: %s" - GatewayAPIManifestError = "No routes configured. One of 'tcpRoutes', 'httpRoutes', 'tcpRoute' or 'httpRoute' should be set" + GatewayAPIManifestError = "No routes configured. At least one of 'httpRoutes', 'grpcRoutes', 'tcpRoutes', 'httpRoute', 'grpcRoute' or 'tcpRoute' must be set" HTTPRouteFieldIsEmptyError = "httpRoute field is empty. It has to be set to remove managed routes" InvalidHeaderMatchTypeError = "invalid header match type" BackendRefWasNotFoundInHTTPRouteError = "backendRef was not found in httpRoute" diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index dc17e48..45af543 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -50,7 +50,7 @@ func (r *RpcPlugin) UpdateHash(rollout *v1alpha1.Rollout, canaryHash, stableHash } func (r *RpcPlugin) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, additionalDestinations []v1alpha1.WeightDestination) pluginTypes.RpcError { - gatewayAPIConfig, err := getGatewayAPITracfficRoutingConfig(rollout) + gatewayAPIConfig, err := getGatewayAPITrafficRoutingConfig(rollout) if err != nil { return pluginTypes.RpcError{ ErrorString: err.Error(), @@ -86,7 +86,7 @@ func (r *RpcPlugin) SetWeight(rollout *v1alpha1.Rollout, desiredWeight int32, ad } func (r *RpcPlugin) SetHeaderRoute(rollout *v1alpha1.Rollout, headerRouting *v1alpha1.SetHeaderRoute) pluginTypes.RpcError { - gatewayAPIConfig, err := getGatewayAPITracfficRoutingConfig(rollout) + gatewayAPIConfig, err := getGatewayAPITrafficRoutingConfig(rollout) if err != nil { return pluginTypes.RpcError{ ErrorString: err.Error(), @@ -136,7 +136,7 @@ func (r *RpcPlugin) VerifyWeight(rollout *v1alpha1.Rollout, desiredWeight int32, } func (r *RpcPlugin) RemoveManagedRoutes(rollout *v1alpha1.Rollout) pluginTypes.RpcError { - gatewayAPIConfig, err := getGatewayAPITracfficRoutingConfig(rollout) + gatewayAPIConfig, err := getGatewayAPITrafficRoutingConfig(rollout) if err != nil { return pluginTypes.RpcError{ ErrorString: err.Error(), @@ -181,7 +181,7 @@ func (r *RpcPlugin) Type() string { return Type } -func getGatewayAPITracfficRoutingConfig(rollout *v1alpha1.Rollout) (*GatewayAPITrafficRouting, error) { +func getGatewayAPITrafficRoutingConfig(rollout *v1alpha1.Rollout) (*GatewayAPITrafficRouting, error) { validate := validator.New(validator.WithRequiredStructEnabled()) gatewayAPIConfig := &GatewayAPITrafficRouting{ ConfigMap: defaults.ConfigMap,