Skip to content

Commit 822ac21

Browse files
committed
add delta to ads
1 parent 2f2cab4 commit 822ac21

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Property
8282
**envoy-control.envoy.snapshot.max-host-ttl** | The TTL for hosts that are unused. Hosts that have not been used in the configured time interval will be purged | 300s
8383
**envoy-control.envoy.snapshot.rate-limit.domain** | Domain name for ratelimit service. | rl
8484
**envoy-control.envoy.snapshot.rate-limit.service-name** | ratelimit GRPC service name | ratelimit-grpc
85-
**envoy-control.envoy.snapshot.delta-xds-enabled** | Enable detla xds | false
85+
**envoy-control.envoy.snapshot.delta-xds-enabled** | Enable detla xds | false
8686

8787

8888
## Permissions

envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,23 @@ class EnvoyClustersFactory(
365365
ADS -> ConfigSource.newBuilder()
366366
.setResourceApiVersion(ApiVersion.V3)
367367
.setAds(AggregatedConfigSource.newBuilder())
368+
.setApiConfigSource(
369+
ApiConfigSource.newBuilder()
370+
.setApiType(
371+
if (properties.deltaXdsEnabled) {
372+
ApiConfigSource.ApiType.DELTA_GRPC
373+
} else {
374+
ApiConfigSource.ApiType.GRPC
375+
}
376+
)
377+
.setTransportApiVersion(ApiVersion.V3)
378+
.addGrpcServices(
379+
0, GrpcService.newBuilder().setEnvoyGrpc(
380+
GrpcService.EnvoyGrpc.newBuilder()
381+
.setClusterName(properties.xdsClusterName)
382+
)
383+
)
384+
)
368385
XDS ->
369386
ConfigSource.newBuilder()
370387
.setResourceApiVersion(ApiVersion.V3)

0 commit comments

Comments
 (0)