Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KSmigielski committed Nov 11, 2022
1 parent 457709d commit 86eea05
Showing 1 changed file with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -34,7 +33,6 @@ class HttpConnectionManagerFactory(
snapshotProperties.dynamicForwardProxy
).filter

private val defaultApiConfigSourceV3: ApiConfigSource = apiConfigSource()
private val accessLogFilter = AccessLogFilter(snapshotProperties)

@SuppressWarnings("LongParameterList")
Expand Down Expand Up @@ -112,7 +110,7 @@ class HttpConnectionManagerFactory(
ConfigSource.newBuilder()
.setInitialFetchTimeout(rdsInitialFetchTimeout)
.setResourceApiVersion(ApiVersion.V3)
.setApiConfigSource(defaultApiConfigSourceV3)
.setAds(AggregatedConfigSource.getDefaultInstance())
.build()
)
.build()
Expand All @@ -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<HttpFilterFactory>,
Expand Down

0 comments on commit 86eea05

Please sign in to comment.