diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotProperties.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotProperties.kt index 0a2c76202..403f427e9 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotProperties.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/SnapshotProperties.kt @@ -293,6 +293,9 @@ class EgressProperties { var hostHeaderRewriting = HostHeaderRewritingProperties() var headersToRemove = mutableListOf() var domains = mutableListOf() + var keepAliveTime = 7200 + var keepAliveProbes = 9 + var keepAliveInterval = 75 } class IngressProperties { diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt index ba27f432d..e891d2e43 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt @@ -78,9 +78,6 @@ class EnvoyClustersFactory( private val clustersForJWT: List = properties.jwt.providers.values.mapNotNull(this::clusterForOAuthProvider) - private val keepAliveTime = 7200 - private val keepAliveProbes = 9 - private val keepAliveInterval = 75 companion object { private val logger by logger() @@ -274,9 +271,9 @@ class EnvoyClustersFactory( ).toBuilder() .setUpstreamConnectionOptions(UpstreamConnectionOptions.newBuilder() .setTcpKeepalive(TcpKeepalive.newBuilder() - .setKeepaliveTime(UInt32Value.of(keepAliveTime)) - .setKeepaliveProbes(UInt32Value.of(keepAliveProbes)) - .setKeepaliveInterval(UInt32Value.of(keepAliveInterval)) + .setKeepaliveTime(UInt32Value.of(properties.egress.keepAliveTime)) + .setKeepaliveProbes(UInt32Value.of(properties.egress.keepAliveProbes)) + .setKeepaliveInterval(UInt32Value.of(properties.egress.keepAliveInterval)) .build()) .build()) .build()