Documentation
¶
Index ¶
- func RunServer(ctx context.Context, resources *message.ProviderResources, ...) error
- type Retranslator
- type ServerOption
- func WithClient(c client.Client) ServerOption
- func WithExtensionServer(addr string, creds credentials.TransportCredentials, failOpen bool) ServerOption
- func WithRetranslator(rt *Retranslator) ServerOption
- func WithTenantKeyFromNamespace() ServerOption
- func WithWorkerdProjectNamespaces() ServerOption
- func WithXdsPatch(fn XdsPatchFunc) ServerOption
- type XdsPatchFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunServer ¶
func RunServer(ctx context.Context, resources *message.ProviderResources, opts ...ServerOption) error
RunServer runs the Gateway API xDS server. Uses resources to subscribe to Gateway-API resource updates, translates it to xDS IR and infra IR resources, and publishes them via xDS snapshotter service. The call will block until the ctx is canceled.
Types ¶
type Retranslator ¶ added in v0.23.0
type Retranslator struct {
// contains filtered or unexported fields
}
Retranslator tells the xDS translator to run translation again for every known IR. This also runs the extension hooks and XdsPatch again. No Gateway-API resource has to change. Embedders signal it when out-of-band data used during translation changes. Signals coalesce. A burst of calls during an in-flight translation causes one more pass.
func NewRetranslator ¶ added in v0.23.0
func NewRetranslator() *Retranslator
NewRetranslator returns a Retranslator ready to be passed to WithRetranslator.
func (*Retranslator) Retranslate ¶ added in v0.23.0
func (r *Retranslator) Retranslate()
Retranslate schedules a re-translation pass. It never blocks.
type ServerOption ¶
type ServerOption func(*serverOptions)
ServerOption is an xDS server option.
func WithClient ¶
func WithClient(c client.Client) ServerOption
WithClient sets the Kubernetes client for status updates. If provided, a status runner will be started to write Gateway API resource statuses back to the API server.
func WithExtensionServer ¶
func WithExtensionServer(addr string, creds credentials.TransportCredentials, failOpen bool) ServerOption
WithExtensionServer sets the extension server for the server options. If failOpen is true, the server will still translate xDS (unmodified) if the extension server is not available.
func WithRetranslator ¶ added in v0.23.0
func WithRetranslator(rt *Retranslator) ServerOption
WithRetranslator wires rt's signal into the xDS translator runner.
func WithTenantKeyFromNamespace ¶ added in v0.23.0
func WithTenantKeyFromNamespace() ServerOption
WithTenantKeyFromNamespace derives each destination's tenant key from its route namespace. Set it only where namespaces are project IDs.
func WithWorkerdProjectNamespaces ¶
func WithWorkerdProjectNamespaces() ServerOption
WithWorkerdProjectNamespaces marks route namespaces as project UUIDs for the workerd xDS hook. It is the opt-in for multi-project translation owners — the shared backplane, whose DefaultGatewayReconciler rewrites route namespaces to multicluster cluster names (project UUIDs). With it, the hook emits one per-project resident cluster per project instead of the single legacy cluster. Never set it in dedicated/dev single-project topologies, where namespaces are user namespaces. (APO-796)
func WithXdsPatch ¶ added in v0.23.0
func WithXdsPatch(fn XdsPatchFunc) ServerOption
WithXdsPatch installs fn on the xDS translation path. The function runs in-process after the gRPC extension hooks. It sees every resource type. The embedding process can thus rewrite clusters and add matching EDS resources in the same snapshot.
type XdsPatchFunc ¶ added in v0.23.0
type XdsPatchFunc = xdstranslatorrunner.PatchFunc
XdsPatchFunc changes the translated xDS resource table for one IR key. It runs before the table goes to the snapshot cache. See xds/translator/runner.PatchFunc.
Directories
¶
| Path | Synopsis |
|---|---|
|
status
|
|
|
xds
|
|
|
cache
This file contains code derived from Contour, https://github.com/projectcontour/contour from the source file https://github.com/projectcontour/contour/blob/main/internal/xds/v3/snapshotter.go and is provided here subject to the following: Copyright Project Contour Authors SPDX-License-Identifier: Apache-2.0
|
This file contains code derived from Contour, https://github.com/projectcontour/contour from the source file https://github.com/projectcontour/contour/blob/main/internal/xds/v3/snapshotter.go and is provided here subject to the following: Copyright Project Contour Authors SPDX-License-Identifier: Apache-2.0 |
|
extensions
Import all Envoy filter types so they are registered and deserialization does not fail when using them in the "typed_config" attributes.
|
Import all Envoy filter types so they are registered and deserialization does not fail when using them in the "typed_config" attributes. |
|
telemeta
Package telemeta carries telemetry attribution on translated xDS routes and clusters.
|
Package telemeta carries telemetry attribution on translated xDS routes and clusters. |
|
tenantmeta
Package tenantmeta carries tenant attribution on translated xDS clusters.
|
Package tenantmeta carries tenant attribution on translated xDS clusters. |