From 2f3e2b924280733541e5cdab5b3086dc9e7f36b3 Mon Sep 17 00:00:00 2001 From: "mateusz.bartkowiak" Date: Tue, 12 Dec 2023 11:22:58 +0100 Subject: [PATCH] shouldAuditGlobalSnapshot property --- .../allegro/tech/servicemesh/envoycontrol/ControlPlane.kt | 6 +++++- .../servicemesh/envoycontrol/snapshot/SnapshotProperties.kt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/ControlPlane.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/ControlPlane.kt index bc02ee3c5..c7fe1136c 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/ControlPlane.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/ControlPlane.kt @@ -337,7 +337,11 @@ class ControlPlane private constructor( } fun withSnapshotChangeAuditor(snapshotChangeAuditor: SnapshotChangeAuditor): ControlPlaneBuilder { - this.snapshotChangeAuditor = snapshotChangeAuditor + if (properties.envoy.snapshot.shouldAuditGlobalSnapshot) { + this.snapshotChangeAuditor = snapshotChangeAuditor + } else { + this.snapshotChangeAuditor = NoopSnapshotChangeAuditor + } return this } 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 9590a1801..ed1bb20af 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 @@ -36,6 +36,7 @@ class SnapshotProperties { var deltaXdsEnabled = false var retryPolicy = RetryPolicyProperties() var tcpDumpsEnabled: Boolean = true + var shouldAuditGlobalSnapshot: Boolean = true } class MetricsProperties {