Skip to content

Commit

Permalink
docs: document type URLs for extensions (envoyproxy#21707)
Browse files Browse the repository at this point in the history
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov authored Jun 23, 2022
1 parent 355f5bc commit 78e5406
Show file tree
Hide file tree
Showing 15 changed files with 458 additions and 19 deletions.
3 changes: 2 additions & 1 deletion api/envoy/extensions/access_loggers/stream/v3/stream.proto
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/acc
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Standard Streams Access loggers]
// [#extension: envoy.access_loggers.stream]

// Custom configuration for an :ref:`AccessLog <envoy_v3_api_msg_config.accesslog.v3.AccessLog>`
// that writes log entries directly to the operating system's standard output.
// [#extension: envoy.access_loggers.stdout]
message StdoutAccessLog {
oneof access_log_format {
// Configuration to form access log data and format.
Expand All @@ -29,6 +29,7 @@ message StdoutAccessLog {

// Custom configuration for an :ref:`AccessLog <envoy_v3_api_msg_config.accesslog.v3.AccessLog>`
// that writes log entries directly to the operating system's standard error.
// [#extension: envoy.access_loggers.stderr]
message StderrAccessLog {
oneof access_log_format {
// Configuration to form access log data and format.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: SimpleHttpCache CacheFilter storage plugin]

// [#extension: envoy.cache.simple_http_cache]
// [#extension: envoy.extensions.http.cache.simple]
message SimpleHttpCacheConfig {
}
2 changes: 1 addition & 1 deletion api/envoy/extensions/filters/http/cache/v3/cache.proto
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ message CacheConfig {
}

// Config specific to the cache storage implementation.
// [#extension-category: envoy.filters.http.cache]
// [#extension-category: envoy.http.cache]
google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}];

// List of matching rules that defines allowed *Vary* headers.
Expand Down
3 changes: 3 additions & 0 deletions changelogs/current.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ minor_behavior_changes:
- area: logging
change: |
changed flag ``--log-format-escaped`` to only log one trailing newline per log line.
- area: logging
change: |
changed category name for access log filter extensions to ``envoy.access_loggers.extension_filters``.
bug_fixes:
- area: http
Expand Down
5 changes: 5 additions & 0 deletions envoy/registry/registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class FactoryRegistryProxy {
virtual bool disableFactory(absl::string_view) PURE;
virtual bool isFactoryDisabled(absl::string_view) const PURE;
virtual absl::flat_hash_map<std::string, std::vector<std::string>> registeredTypes() const PURE;
virtual absl::string_view canonicalFactoryName(absl::string_view) const PURE;
};

template <class Base> class FactoryRegistryProxyImpl : public FactoryRegistryProxy {
Expand Down Expand Up @@ -72,6 +73,10 @@ template <class Base> class FactoryRegistryProxyImpl : public FactoryRegistryPro
absl::flat_hash_map<std::string, std::vector<std::string>> registeredTypes() const override {
return FactoryRegistry::registeredTypes();
}

absl::string_view canonicalFactoryName(absl::string_view name) const override {
return FactoryRegistry::canonicalFactoryName(name);
}
};

/**
Expand Down
2 changes: 1 addition & 1 deletion source/common/access_log/access_log_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ class ExtensionFilterFactory : public Config::TypedFactory {
virtual FilterPtr createFilter(const envoy::config::accesslog::v3::ExtensionFilter& config,
Runtime::Loader& runtime, Random::RandomGenerator& random) PURE;

std::string category() const override { return "envoy.access_logger.extension_filters"; }
std::string category() const override { return "envoy.access_loggers.extension_filters"; }
};

/**
Expand Down
7 changes: 4 additions & 3 deletions source/extensions/all_extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ def envoy_all_extensions(denylist = []):
all_extensions = dicts.add(_required_extensions, EXTENSIONS)

# These extensions can be removed on a site specific basis.
return [_selected_extension_target(v) for k, v in all_extensions.items() if not k in denylist]
return depset([_selected_extension_target(v) for k, v in all_extensions.items() if not k in denylist]).to_list()

# Core extensions needed to run Envoy's integration tests.
_core_extensions = [
"envoy.access_loggers.file",
"envoy.access_loggers.stream",
"envoy.access_loggers.stderr",
"envoy.access_loggers.stdout",
"envoy.filters.http.router",
"envoy.filters.http.health_check",
"envoy.filters.network.http_connection_manager",
Expand All @@ -40,7 +41,7 @@ def envoy_all_core_extensions():
all_extensions = dicts.add(_required_extensions, EXTENSIONS)

# These extensions can be removed on a site specific basis.
return [v for k, v in all_extensions.items() if k in _core_extensions]
return depset([v for k, v in all_extensions.items() if k in _core_extensions]).to_list()

_http_filter_prefix = "envoy.filters.http"

Expand Down
5 changes: 3 additions & 2 deletions source/extensions/extensions_build_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ EXTENSIONS = {
"envoy.access_loggers.http_grpc": "//source/extensions/access_loggers/grpc:http_config",
"envoy.access_loggers.tcp_grpc": "//source/extensions/access_loggers/grpc:tcp_config",
"envoy.access_loggers.open_telemetry": "//source/extensions/access_loggers/open_telemetry:config",
"envoy.access_loggers.stream": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.stdout": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.stderr": "//source/extensions/access_loggers/stream:config",
"envoy.access_loggers.wasm": "//source/extensions/access_loggers/wasm:config",

#
Expand Down Expand Up @@ -228,7 +229,7 @@ EXTENSIONS = {
#
# CacheFilter plugins
#
"envoy.cache.simple_http_cache": "//source/extensions/filters/http/cache/simple_http_cache:config",
"envoy.extensions.http.cache.simple": "//source/extensions/filters/http/cache/simple_http_cache:config",

#
# Internal redirect predicates
Expand Down
Loading

0 comments on commit 78e5406

Please sign in to comment.