Skip to content

Commit 1fd137f

Browse files
docs: clean up docs to make them consistent (#40067)
## Description This PR have some cleanup in cluster, endpoint and WASM proto docs for consistency. We are using the new note and warning annotations and the backticks inconsistently throughout right now. --- **Commit Message:** docs: clean up docs to make them consistent **Additional Description:** Minor clean up for added clarity on the docs. **Risk Level:** N/A **Testing:** N/A **Docs Changes:** N/A **Release Notes:** N/A Signed-off-by: Rohit Agrawal <[email protected]> Mirrored from https://github.com/envoyproxy/envoy @ cfc60e5401654ede6eaf3589d082914c5059cbf9
1 parent 99b0949 commit 1fd137f

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

envoy/config/cluster/v3/cluster.proto

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -652,9 +652,10 @@ message Cluster {
652652
// If this is not set, we default to a merge window of 1000ms. To disable it, set the merge
653653
// window to 0.
654654
//
655-
// Note: merging does not apply to cluster membership changes (e.g.: adds/removes); this is
656-
// because merging those updates isn't currently safe. See
657-
// https://github.com/envoyproxy/envoy/pull/3941.
655+
// .. note::
656+
// Merging does not apply to cluster membership changes (e.g.: adds/removes); this is
657+
// because merging those updates isn't currently safe. See
658+
// https://github.com/envoyproxy/envoy/pull/3941.
658659
google.protobuf.Duration update_merge_window = 4;
659660

660661
// If set to true, Envoy will :ref:`exclude <arch_overview_load_balancing_excluded>` new hosts
@@ -816,12 +817,14 @@ message Cluster {
816817
string name = 1 [(validate.rules).string = {min_len: 1}];
817818

818819
// An optional alternative to the cluster name to be used for observability. This name is used
819-
// emitting stats for the cluster and access logging the cluster name. This will appear as
820+
// for emitting stats for the cluster and access logging the cluster name. This will appear as
820821
// additional information in configuration dumps of a cluster's current status as
821822
// :ref:`observability_name <envoy_v3_api_field_admin.v3.ClusterStatus.observability_name>`
822-
// and as an additional tag "upstream_cluster.name" while tracing. Note: Any ``:`` in the name
823-
// will be converted to ``_`` when emitting statistics. This should not be confused with
824-
// :ref:`Router Filter Header <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
823+
// and as an additional tag "upstream_cluster.name" while tracing.
824+
//
825+
// .. note::
826+
// Any ``:`` in the name will be converted to ``_`` when emitting statistics. This should not be confused with
827+
// :ref:`Router Filter Header <config_http_filters_router_x-envoy-upstream-alt-stat-name>`.
825828
string alt_stat_name = 28 [(udpa.annotations.field_migrate).rename = "observability_name"];
826829

827830
oneof cluster_discovery_type {

envoy/config/endpoint/v3/endpoint.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ message ClusterLoadAssignment {
113113
// to determine the health of the priority level, or in other words assume each host has a weight of 1 for
114114
// this calculation.
115115
//
116-
// Note: this is not currently implemented for
117-
// :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
116+
// .. note::
117+
// This is not currently implemented for
118+
// :ref:`locality weighted load balancing <arch_overview_load_balancing_locality_weighted_lb>`.
118119
bool weighted_priority_health = 6;
119120
}
120121

envoy/extensions/wasm/v3/wasm.proto

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
1919
// [#protodoc-title: Wasm]
2020
// [#extension: envoy.bootstrap.wasm]
2121

22-
// If there is a fatal error on the VM (e.g. exception, abort()), then the policy will be applied.
22+
// If there is a fatal error on the VM (e.g. exception, ``abort()``), then the policy will be applied.
2323
enum FailurePolicy {
2424
// No policy is specified. The default policy will be used. The default policy is ``FAIL_CLOSED``.
2525
UNSPECIFIED = 0;
2626

27-
// New plugin instance will be created for the new request if the VM is failed. Note this only
27+
// New plugin instance will be created for the new request if the VM is failed. Note this will only
2828
// be applied to the following failures:
2929
//
3030
// * ``proxy_wasm::FailState::RuntimeError``
@@ -64,7 +64,8 @@ message CapabilityRestrictionConfig {
6464

6565
// Configuration for sanitization of inputs to an allowed capability.
6666
//
67-
// NOTE: This is currently unimplemented.
67+
// .. note::
68+
// This is currently unimplemented.
6869
message SanitizationConfig {
6970
}
7071

@@ -109,14 +110,16 @@ message VmConfig {
109110
config.core.v3.AsyncDataSource code = 3;
110111

111112
// The Wasm configuration used in initialization of a new VM
112-
// (proxy_on_start). ``google.protobuf.Struct`` is serialized as JSON before
113+
// (``proxy_on_start``). ``google.protobuf.Struct`` is serialized as JSON before
113114
// passing it to the plugin. ``google.protobuf.BytesValue`` and
114115
// ``google.protobuf.StringValue`` are passed directly without the wrapper.
115116
google.protobuf.Any configuration = 4;
116117

117118
// Allow the wasm file to include pre-compiled code on VMs which support it.
118-
// Warning: this should only be enable for trusted sources as the precompiled code is not
119-
// verified.
119+
//
120+
// .. warning::
121+
// This should only be enabled for trusted sources as the precompiled code is not
122+
// verified.
120123
bool allow_precompiled = 5;
121124

122125
// If true and the code needs to be remotely fetched and it is not in the cache then NACK the configuration
@@ -129,7 +132,9 @@ message VmConfig {
129132
// are generally called implicitly by your language's standard library. Therefore, you do not
130133
// need to call them directly. You can access environment variables in the same way you would
131134
// on native platforms.
132-
// Warning: Envoy rejects the configuration if there's conflict of key space.
135+
//
136+
// .. warning::
137+
// Envoy rejects the configuration if there's conflict of key space.
133138
EnvironmentVariables environment_variables = 7;
134139
}
135140

@@ -168,11 +173,14 @@ message PluginConfig {
168173
// ``google.protobuf.StringValue`` are passed directly without the wrapper.
169174
google.protobuf.Any configuration = 4;
170175

171-
// If there is a fatal error on the VM (e.g. exception, abort(), on_start or on_configure return false),
176+
// If there is a fatal error on the VM (e.g. exception, ``abort()``, ``on_start`` or ``on_configure`` return false),
172177
// then all plugins associated with the VM will either fail closed (by default), e.g. by returning an HTTP 503 error,
173-
// or fail open (if 'fail_open' is set to true) by bypassing the filter. Note: when on_start or on_configure return false
174-
// during xDS updates the xDS configuration will be rejected and when on_start or on_configuration return false on initial
175-
// startup the proxy will not start.
178+
// or fail open (if 'fail_open' is set to true) by bypassing the filter.
179+
//
180+
// .. note::
181+
// When ``on_start`` or ``on_configure`` return ``false`` during xDS updates the xDS configuration will be rejected and when ``on_start`` or ``on_configure`` return ``false`` on
182+
// initial startup the proxy will not start.
183+
//
176184
// This field is deprecated in favor of the ``failure_policy`` field.
177185
bool fail_open = 5 [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
178186

0 commit comments

Comments
 (0)