dns: configuring a basic key value store to persist to disk (#17745)

Risk Level: low (config guarded)
Testing: new unit, integration tests
Docs Changes: n/a (hidden)
Release Notes: n/a
Part of envoyproxy/envoy-mobile#1587

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>

Mirrored from https://github.com/envoyproxy/envoy @ 16879db8d6d3e859e169807e7b9510ba4b30501f
pull/624/head
data-plane-api(Azure Pipelines) 3 years ago
parent f6813e2c6e
commit 3eccfe3fe7
  1. 2
      BUILD
  2. 1
      envoy/extensions/common/dynamic_forward_proxy/v3/BUILD
  3. 7
      envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto
  4. 1
      envoy/extensions/common/dynamic_forward_proxy/v4alpha/BUILD
  5. 7
      envoy/extensions/common/dynamic_forward_proxy/v4alpha/dns_cache.proto
  6. 12
      envoy/extensions/common/key_value/v3/BUILD
  7. 25
      envoy/extensions/common/key_value/v3/config.proto
  8. 9
      envoy/extensions/key_value/file_based/v3/BUILD
  9. 27
      envoy/extensions/key_value/file_based/v3/config.proto
  10. 2
      versioning/BUILD

@ -97,6 +97,7 @@ proto_library(
"//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/clusters/redis/v3:pkg",
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/key_value/v3:pkg",
"//envoy/extensions/common/matching/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg",
@ -187,6 +188,7 @@ proto_library(
"//envoy/extensions/internal_redirect/allow_listed_routes/v3:pkg",
"//envoy/extensions/internal_redirect/previous_routes/v3:pkg",
"//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg",
"//envoy/extensions/key_value/file_based/v3:pkg",
"//envoy/extensions/matching/common_inputs/environment_variable/v3:pkg",
"//envoy/extensions/matching/input_matchers/consistent_hashing/v3:pkg",
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",

@ -9,6 +9,7 @@ api_proto_package(
"//envoy/annotations:pkg",
"//envoy/config/cluster/v3:pkg",
"//envoy/config/core/v3:pkg",
"//envoy/extensions/common/key_value/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -6,6 +6,7 @@ import "envoy/config/cluster/v3/cluster.proto";
import "envoy/config/core/v3/address.proto";
import "envoy/config/core/v3/extension.proto";
import "envoy/config/core/v3/resolver.proto";
import "envoy/extensions/common/key_value/v3/config.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
@ -31,7 +32,7 @@ message DnsCacheCircuitBreakers {
// Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#next-free-field: 13]
// [#next-free-field: 14]
message DnsCacheConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.common.dynamic_forward_proxy.v2alpha.DnsCacheConfig";
@ -138,4 +139,8 @@ message DnsCacheConfig {
// Setting this timeout will ensure that queries succeed or fail within the specified time frame
// and are then retried using the standard refresh rates. Defaults to 5s if not set.
google.protobuf.Duration dns_query_timeout = 11 [(validate.rules).duration = {gt {}}];
// [#not-implemented-hide:]
// Configuration to flush the DNS cache to long term storage.
key_value.v3.KeyValueStoreConfig key_value_config = 13;
}

@ -9,6 +9,7 @@ api_proto_package(
"//envoy/config/cluster/v4alpha:pkg",
"//envoy/config/core/v4alpha:pkg",
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/key_value/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -6,6 +6,7 @@ import "envoy/config/cluster/v4alpha/cluster.proto";
import "envoy/config/core/v4alpha/address.proto";
import "envoy/config/core/v4alpha/extension.proto";
import "envoy/config/core/v4alpha/resolver.proto";
import "envoy/extensions/common/key_value/v3/config.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
@ -33,7 +34,7 @@ message DnsCacheCircuitBreakers {
// Configuration for the dynamic forward proxy DNS cache. See the :ref:`architecture overview
// <arch_overview_http_dynamic_forward_proxy>` for more information.
// [#next-free-field: 13]
// [#next-free-field: 14]
message DnsCacheConfig {
option (udpa.annotations.versioning).previous_message_type =
"envoy.extensions.common.dynamic_forward_proxy.v3.DnsCacheConfig";
@ -135,4 +136,8 @@ message DnsCacheConfig {
// Setting this timeout will ensure that queries succeed or fail within the specified time frame
// and are then retried using the standard refresh rates. Defaults to 5s if not set.
google.protobuf.Duration dns_query_timeout = 11 [(validate.rules).duration = {gt {}}];
// [#not-implemented-hide:]
// Configuration to flush the DNS cache to long term storage.
key_value.v3.KeyValueStoreConfig key_value_config = 13;
}

@ -0,0 +1,12 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = [
"//envoy/config/core/v3:pkg",
"@com_github_cncf_udpa//udpa/annotations:pkg",
],
)

@ -0,0 +1,25 @@
syntax = "proto3";
package envoy.extensions.common.key_value.v3;
import "envoy/config/core/v3/extension.proto";
import "google/protobuf/any.proto";
import "google/protobuf/duration.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.common.key_value.v3";
option java_outer_classname = "ConfigProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Key Value Store storage plugin]
// [#alpha:]
// This shared configuration for Envoy key value stores.
message KeyValueStoreConfig {
// [#extension-category: envoy.common.key_value]
config.core.v3.TypedExtensionConfig config = 1 [(validate.rules).message = {required: true}];
}

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,27 @@
syntax = "proto3";
package envoy.extensions.key_value.file_based.v3;
import "google/protobuf/duration.proto";
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.key_value.file_based.v3";
option java_outer_classname = "ConfigProto";
option java_multiple_files = true;
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: File Based Key Value Store storage plugin]
// [#alpha:]
// [#extension: envoy.key_value.file_based]
// This is configuration to flush a key value store out to disk.
message FileBasedKeyValueStoreConfig {
// The filename to read the keys and values from, and write the keys and
// values to.
string filename = 1 [(validate.rules).string = {min_len: 1}];
// The interval at which the key value store should be flushed to the file.
google.protobuf.Duration flush_interval = 2;
}

@ -49,6 +49,7 @@ proto_library(
"//envoy/extensions/clusters/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/clusters/redis/v3:pkg",
"//envoy/extensions/common/dynamic_forward_proxy/v3:pkg",
"//envoy/extensions/common/key_value/v3:pkg",
"//envoy/extensions/common/matching/v3:pkg",
"//envoy/extensions/common/ratelimit/v3:pkg",
"//envoy/extensions/common/tap/v3:pkg",
@ -139,6 +140,7 @@ proto_library(
"//envoy/extensions/internal_redirect/allow_listed_routes/v3:pkg",
"//envoy/extensions/internal_redirect/previous_routes/v3:pkg",
"//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg",
"//envoy/extensions/key_value/file_based/v3:pkg",
"//envoy/extensions/matching/common_inputs/environment_variable/v3:pkg",
"//envoy/extensions/matching/input_matchers/consistent_hashing/v3:pkg",
"//envoy/extensions/matching/input_matchers/ip/v3:pkg",

Loading…
Cancel
Save