diff --git a/BUILD b/BUILD index 538218e8..b1b6a979 100644 --- a/BUILD +++ b/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", diff --git a/envoy/extensions/common/dynamic_forward_proxy/v3/BUILD b/envoy/extensions/common/dynamic_forward_proxy/v3/BUILD index 2e981c04..6e07b4a9 100644 --- a/envoy/extensions/common/dynamic_forward_proxy/v3/BUILD +++ b/envoy/extensions/common/dynamic_forward_proxy/v3/BUILD @@ -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", ], ) diff --git a/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto b/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto index fa77bb8a..4a0d87ff 100644 --- a/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto +++ b/envoy/extensions/common/dynamic_forward_proxy/v3/dns_cache.proto @@ -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 // ` 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; } diff --git a/envoy/extensions/common/dynamic_forward_proxy/v4alpha/BUILD b/envoy/extensions/common/dynamic_forward_proxy/v4alpha/BUILD index a70cf4f2..10c11211 100644 --- a/envoy/extensions/common/dynamic_forward_proxy/v4alpha/BUILD +++ b/envoy/extensions/common/dynamic_forward_proxy/v4alpha/BUILD @@ -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", ], ) diff --git a/envoy/extensions/common/dynamic_forward_proxy/v4alpha/dns_cache.proto b/envoy/extensions/common/dynamic_forward_proxy/v4alpha/dns_cache.proto index 921437a1..b601a0d2 100644 --- a/envoy/extensions/common/dynamic_forward_proxy/v4alpha/dns_cache.proto +++ b/envoy/extensions/common/dynamic_forward_proxy/v4alpha/dns_cache.proto @@ -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 // ` 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; } diff --git a/envoy/extensions/common/key_value/v3/BUILD b/envoy/extensions/common/key_value/v3/BUILD new file mode 100644 index 00000000..1c1a6f6b --- /dev/null +++ b/envoy/extensions/common/key_value/v3/BUILD @@ -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", + ], +) diff --git a/envoy/extensions/common/key_value/v3/config.proto b/envoy/extensions/common/key_value/v3/config.proto new file mode 100644 index 00000000..0db9c622 --- /dev/null +++ b/envoy/extensions/common/key_value/v3/config.proto @@ -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}]; +} diff --git a/envoy/extensions/key_value/file_based/v3/BUILD b/envoy/extensions/key_value/file_based/v3/BUILD new file mode 100644 index 00000000..ee92fb65 --- /dev/null +++ b/envoy/extensions/key_value/file_based/v3/BUILD @@ -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"], +) diff --git a/envoy/extensions/key_value/file_based/v3/config.proto b/envoy/extensions/key_value/file_based/v3/config.proto new file mode 100644 index 00000000..0eff4feb --- /dev/null +++ b/envoy/extensions/key_value/file_based/v3/config.proto @@ -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; +} diff --git a/versioning/BUILD b/versioning/BUILD index 2204c292..593b9fa4 100644 --- a/versioning/BUILD +++ b/versioning/BUILD @@ -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",