diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/HttpConnectionManagerFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/HttpConnectionManagerFactory.kt index 936e92223..80be1b8d8 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/HttpConnectionManagerFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/HttpConnectionManagerFactory.kt @@ -3,10 +3,9 @@ package pl.allegro.tech.servicemesh.envoycontrol.snapshot.resource.listeners.fil import com.google.protobuf.BoolValue import com.google.protobuf.Duration import com.google.protobuf.util.Durations -import io.envoyproxy.envoy.config.core.v3.ApiConfigSource +import io.envoyproxy.envoy.config.core.v3.AggregatedConfigSource import io.envoyproxy.envoy.config.core.v3.ApiVersion import io.envoyproxy.envoy.config.core.v3.ConfigSource -import io.envoyproxy.envoy.config.core.v3.GrpcService import io.envoyproxy.envoy.config.core.v3.Http1ProtocolOptions import io.envoyproxy.envoy.config.core.v3.HttpProtocolOptions import io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager @@ -34,7 +33,6 @@ class HttpConnectionManagerFactory( snapshotProperties.dynamicForwardProxy ).filter - private val defaultApiConfigSourceV3: ApiConfigSource = apiConfigSource() private val accessLogFilter = AccessLogFilter(snapshotProperties) @SuppressWarnings("LongParameterList") @@ -112,7 +110,7 @@ class HttpConnectionManagerFactory( ConfigSource.newBuilder() .setInitialFetchTimeout(rdsInitialFetchTimeout) .setResourceApiVersion(ApiVersion.V3) - .setApiConfigSource(defaultApiConfigSourceV3) + .setAds(AggregatedConfigSource.getDefaultInstance()) .build() ) .build() @@ -124,25 +122,6 @@ class HttpConnectionManagerFactory( .build() } - private fun apiConfigSource(): ApiConfigSource { - return ApiConfigSource.newBuilder() - .setApiType( - if (snapshotProperties.deltaXdsEnabled) { - ApiConfigSource.ApiType.DELTA_GRPC - } else { - ApiConfigSource.ApiType.GRPC - } - ) - .setTransportApiVersion(ApiVersion.V3) - .addGrpcServices( - GrpcService.newBuilder() - .setEnvoyGrpc( - GrpcService.EnvoyGrpc.newBuilder() - .setClusterName(snapshotProperties.xdsClusterName) - ) - ).build() - } - private fun addHttpFilters( connectionManagerBuilder: HttpConnectionManager.Builder, filterFactories: List,