Skip to content

Commit

Permalink
docs: Remove api v2 (envoyproxy#16077)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: Gokul Nair <gnair@twitter.com>
  • Loading branch information
phlax authored and Gokul Nair committed May 6, 2021
1 parent 3df15d2 commit c2dd672
Show file tree
Hide file tree
Showing 15 changed files with 14 additions and 54 deletions.
6 changes: 0 additions & 6 deletions api/BUILD
Expand Up @@ -133,18 +133,12 @@ proto_library(
"//envoy/config/common/matcher/v3:pkg",
"//envoy/config/core/v3:pkg",
"//envoy/config/endpoint/v3:pkg",
"//envoy/config/filter/thrift/router/v2alpha1:pkg",
"//envoy/config/grpc_credential/v3:pkg",
"//envoy/config/health_checker/redis/v2:pkg",
"//envoy/config/listener/v3:pkg",
"//envoy/config/metrics/v3:pkg",
"//envoy/config/overload/v3:pkg",
"//envoy/config/ratelimit/v3:pkg",
"//envoy/config/rbac/v3:pkg",
"//envoy/config/resource_monitor/fixed_heap/v2alpha:pkg",
"//envoy/config/resource_monitor/injected_resource/v2alpha:pkg",
"//envoy/config/retry/omit_canary_hosts/v2:pkg",
"//envoy/config/retry/previous_hosts/v2:pkg",
"//envoy/config/route/v3:pkg",
"//envoy/config/tap/v3:pkg",
"//envoy/config/trace/v3:pkg",
Expand Down
6 changes: 3 additions & 3 deletions api/xds_protocol.rst
Expand Up @@ -772,12 +772,12 @@ Later the xDS client spontaneously requests the "wc" resource.

On reconnect the Incremental xDS client may tell the server of its known
resources to avoid resending them over the network by sending them in
:ref:`initial_resource_versions <envoy_api_field_DeltaDiscoveryRequest.initial_resource_versions>`.
:ref:`initial_resource_versions <envoy_v3_api_field_service.discovery.v3.deltadiscoveryrequest.initial_resource_versions>`.
Because no state is assumed to be preserved from the previous stream, the reconnecting
client must provide the server with all resource names it is interested in. Note that for wildcard
requests (CDS/LDS/SRDS), the request must have no resources in both
:ref:`resource_names_subscribe <envoy_api_field_DeltaDiscoveryRequest.resource_names_subscribe>` and
:ref:`resource_names_unsubscribe <envoy_api_field_DeltaDiscoveryRequest.resource_names_unsubscribe>`.
:ref:`resource_names_subscribe <envoy_v3_api_field_service.discovery.v3.deltadiscoveryrequest.resource_names_subscribe>` and
:ref:`resource_names_unsubscribe <envoy_v3_api_field_service.discovery.v3.deltadiscoveryrequest.resource_names_unsubscribe>`.

.. figure:: diagrams/incremental-reconnect.svg
:alt: Incremental reconnect example
Expand Down
17 changes: 3 additions & 14 deletions docs/build.sh
Expand Up @@ -97,11 +97,8 @@ function generate_api_rst() {
# Fill in boiler plate for extensions that have google.protobuf.Empty as their
# config. We only have v2 support here for version history anchors, which don't point at any empty
# configs.
if [[ "${API_VERSION}" != "v2" ]]
then
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/protodoc:generate_empty \
"${PWD}"/docs/empty_extensions.json "${GENERATED_RST_DIR}/api-${API_VERSION}"/config
fi
bazel run "${BAZEL_BUILD_OPTIONS[@]}" //tools/protodoc:generate_empty \
"${PWD}"/docs/empty_extensions.json "${GENERATED_RST_DIR}/api-${API_VERSION}"/config

# We do ** matching below to deal with Bazel cache blah (source proto artifacts
# are nested inside source package targets).
Expand Down Expand Up @@ -129,18 +126,10 @@ function generate_api_rst() {
declare DST="${GENERATED_RST_DIR}/api-${API_VERSION}/${PROTO_FILE_CANONICAL#envoy/}".rst

mkdir -p "$(dirname "${DST}")"
if [[ "${API_VERSION}" == "v2" ]]
then
cat docs/v2-api-header.rst "${SRC}" > "$(dirname "${DST}")/$(basename "${SRC}")"
else
cp -f "${SRC}" "$(dirname "${DST}")"
fi
cp -f "${SRC}" "$(dirname "${DST}")"
done
}

# TODO(htuch): remove v2 support once we have a good story for version history RST links that refer
# to v2 APIs.
generate_api_rst v2
generate_api_rst v3

# Fixup anchors and references in v3 so they form a distinct namespace.
Expand Down
2 changes: 0 additions & 2 deletions docs/conf.py
Expand Up @@ -147,8 +147,6 @@ def setup(app):
'_venv',
'Thumbs.db',
'.DS_Store',
'api-v2/api/v2/endpoint/load_report.proto.rst',
'api-v2/service/discovery/v2/hds.proto.rst',
]

# The reST default role (used for this markup: `text`) to use for all
Expand Down
1 change: 0 additions & 1 deletion docs/root/api-v3/config/filter/thrift/thrift.rst
Expand Up @@ -5,5 +5,4 @@ Thrift filters
:glob:
:maxdepth: 2

router/v2alpha1/*
../../../extensions/filters/network/thrift_proxy/**/v3/*
1 change: 0 additions & 1 deletion docs/root/api-v3/config/health_checker/health_checker.rst
Expand Up @@ -5,5 +5,4 @@ Health checkers
:glob:
:maxdepth: 2

*/v2/*
../../extensions/health_checkers/*/v3/*
Expand Up @@ -8,4 +8,3 @@ Resource monitors
:maxdepth: 2

../../extensions/resource_monitors/*/v3/*
*/v2alpha/*
1 change: 0 additions & 1 deletion docs/root/api-v3/config/retry/retry.rst
Expand Up @@ -6,5 +6,4 @@ Retry Predicates
:maxdepth: 2

*/empty/*
*/v2/*
../../extensions/retry/**/v3/*
2 changes: 1 addition & 1 deletion docs/root/configuration/http/http_conn_man/rds.rst
Expand Up @@ -11,7 +11,7 @@ fetch its own route configuration via the API. Optionally, the
:ref:`virtual host discovery service <config_http_conn_man_vhds>`
can be used to fetch virtual hosts separately from the route configuration.

* :ref:`v2 API reference <v2_grpc_streaming_endpoints>`
* :ref:`v3 API reference <v3_grpc_streaming_endpoints>`

Statistics
----------
Expand Down
2 changes: 1 addition & 1 deletion docs/root/configuration/http/http_conn_man/vhds.rst
Expand Up @@ -69,7 +69,7 @@ on-demand :ref:`scoped RDS <envoy_v3_api_msg_config.route.v3.ScopedRouteConfigur
and VHDS together will require two on-demand subscriptions per routing scope.


* :ref:`v2 API reference <v2_grpc_streaming_endpoints>`
* :ref:`v3 API reference <v3_grpc_streaming_endpoints>`

Statistics
----------
Expand Down
2 changes: 1 addition & 1 deletion docs/root/configuration/listeners/lds.rst
Expand Up @@ -36,7 +36,7 @@ The semantics of listener updates are as follows:
Configuration
-------------

* :ref:`v3 LDS API <v2_grpc_streaming_endpoints>`
* :ref:`v3 LDS API <v3_grpc_streaming_endpoints>`

Statistics
----------
Expand Down
Expand Up @@ -7,5 +7,5 @@ The router filter implements Dubbo forwarding. It will be used in almost all Dub
scenarios. The filter's main job is to follow the instructions specified in the configured
:ref:`route table <envoy_v3_api_msg_extensions.filters.network.dubbo_proxy.v3.RouteConfiguration>`.

* :ref:`v3 API reference <envoy_v3_api_msg_config.filter.thrift.router.v2alpha1.Router>`
* :ref:`v3 API reference <envoy_v3_api_msg_extensions.filters.network.thrift_proxy.router.v3.router>`
* This filter should be configured with the name *envoy.filters.dubbo.router*.
18 changes: 3 additions & 15 deletions docs/root/configuration/overview/xds_api.rst
Expand Up @@ -9,14 +9,13 @@ REST-JSON cases, a :ref:`DiscoveryRequest <envoy_v3_api_msg_service.discovery.v3
:ref:`DiscoveryResponse <envoy_v3_api_msg_service.discovery.v3.DiscoveryResponse>` received following the
:ref:`xDS protocol <xds_protocol>`.

Below we describe endpoints for the v2 and v3 transport API versions.
Below we describe endpoints for the v3 transport API.

.. _v2_grpc_streaming_endpoints:
.. _v3_grpc_streaming_endpoints:

gRPC streaming endpoints
^^^^^^^^^^^^^^^^^^^^^^^^

.. http:post:: /envoy.api.v2.ClusterDiscoveryService/StreamClusters
.. http:post:: /envoy.service.cluster.v3.ClusterDiscoveryService/StreamClusters
See :repo:`cds.proto <api/envoy/service/cluster/v3/cds.proto>` for the service definition. This is used by Envoy
Expand All @@ -37,7 +36,6 @@ is set in the :ref:`dynamic_resources
<envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dynamic_resources>` of the :ref:`Bootstrap
<envoy_v3_api_msg_config.bootstrap.v3.Bootstrap>` config.

.. http:post:: /envoy.api.v2.EndpointDiscoveryService/StreamEndpoints
.. http:post:: /envoy.service.endpoint.v3.EndpointDiscoveryService/StreamEndpoints
See :repo:`eds.proto
Expand All @@ -59,7 +57,6 @@ is set in the :ref:`eds_cluster_config
<envoy_v3_api_field_config.cluster.v3.Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_v3_api_msg_config.cluster.v3.Cluster>` config.

.. http:post:: /envoy.api.v2.ListenerDiscoveryService/StreamListeners
.. http:post:: /envoy.service.listener.v3.ListenerDiscoveryService/StreamListeners
See :repo:`lds.proto
Expand All @@ -81,7 +78,6 @@ is set in the :ref:`dynamic_resources
<envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dynamic_resources>` of the :ref:`Bootstrap
<envoy_v3_api_msg_config.bootstrap.v3.Bootstrap>` config.

.. http:post:: /envoy.api.v2.RouteDiscoveryService/StreamRoutes
.. http:post:: /envoy.service.route.v3.RouteDiscoveryService/StreamRoutes
See :repo:`rds.proto
Expand All @@ -105,7 +101,6 @@ is set in the :ref:`rds
of the :ref:`HttpConnectionManager
<envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager>` config.

.. http:post:: /envoy.api.v2.ScopedRoutesDiscoveryService/StreamScopedRoutes
.. http:post:: /envoy.service.route.v3.ScopedRoutesDiscoveryService/StreamScopedRoutes
See :repo:`srds.proto
Expand All @@ -130,7 +125,6 @@ is set in the :ref:`scoped_routes
field of the :ref:`HttpConnectionManager
<envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager>` config.

.. http:post:: /envoy.service.discovery.v2.SecretDiscoveryService/StreamSecrets
.. http:post:: /envoy.service.secret.v3.SecretDiscoveryService/StreamSecrets
See :repo:`sds.proto
Expand All @@ -152,7 +146,6 @@ for the service definition. This is used by Envoy as a client when
is set inside a :ref:`SdsSecretConfig <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.SdsSecretConfig>` message. This message
is used in various places such as the :ref:`CommonTlsContext <envoy_v3_api_msg_extensions.transport_sockets.tls.v3.CommonTlsContext>`.

.. http:post:: /envoy.service.discovery.v2.RuntimeDiscoveryService/StreamRuntime
.. http:post:: /envoy.service.runtime.v3.RuntimeDiscoveryService/StreamRuntime
See :repo:`rtds.proto
Expand All @@ -177,7 +170,6 @@ field.
REST endpoints
^^^^^^^^^^^^^^

.. http:post:: /v2/discovery:clusters
.. http:post:: /v3/discovery:clusters
See :repo:`cds.proto
Expand All @@ -197,7 +189,6 @@ is set in the :ref:`dynamic_resources
<envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dynamic_resources>` of the :ref:`Bootstrap
<envoy_v3_api_msg_config.bootstrap.v3.Bootstrap>` config.

.. http:post:: /v2/discovery:endpoints
.. http:post:: /v3/discovery:endpoints
See :repo:`eds.proto
Expand All @@ -217,7 +208,6 @@ is set in the :ref:`eds_cluster_config
<envoy_v3_api_field_config.cluster.v3.Cluster.eds_cluster_config>` field of the :ref:`Cluster
<envoy_v3_api_msg_config.cluster.v3.Cluster>` config.

.. http:post:: /v2/discovery:listeners
.. http:post:: /v3/discovery:listeners
See :repo:`lds.proto
Expand All @@ -237,7 +227,6 @@ is set in the :ref:`dynamic_resources
<envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dynamic_resources>` of the :ref:`Bootstrap
<envoy_v3_api_msg_config.bootstrap.v3.Bootstrap>` config.

.. http:post:: /v2/discovery:routes
.. http:post:: /v3/discovery:routes
See :repo:`rds.proto
Expand Down Expand Up @@ -295,7 +284,6 @@ ADS is only available for gRPC streaming (not REST) and is described more fully
in :ref:`xDS <xds_protocol_ads>`
document. The gRPC endpoint is:

.. http:post:: /envoy.service.discovery.v2.AggregatedDiscoveryService/StreamAggregatedResources
.. http:post:: /envoy.service.discovery.v3.AggregatedDiscoveryService/StreamAggregatedResources
See :repo:`discovery.proto
Expand All @@ -315,7 +303,7 @@ is set in the :ref:`dynamic_resources
<envoy_v3_api_field_config.bootstrap.v3.Bootstrap.dynamic_resources>` of the :ref:`Bootstrap
<envoy_v3_api_msg_config.bootstrap.v3.Bootstrap>` config.

When this is set, any of the configuration sources :ref:`above <v2_grpc_streaming_endpoints>` can
When this is set, any of the configuration sources :ref:`above <v3_grpc_streaming_endpoints>` can
be set to use the ADS channel. For example, a LDS config could be changed from

.. code-block:: yaml
Expand Down
2 changes: 1 addition & 1 deletion docs/root/configuration/upstream/cluster_manager/cds.rst
Expand Up @@ -12,7 +12,7 @@ clusters depending on what is required.
Any clusters that are statically defined within the Envoy configuration cannot be modified or
removed via the CDS API.

* :ref:`v3 CDS API <v2_grpc_streaming_endpoints>`
* :ref:`v3 CDS API <v3_grpc_streaming_endpoints>`

Statistics
----------
Expand Down
5 changes: 0 additions & 5 deletions docs/v2-api-header.rst

This file was deleted.

0 comments on commit c2dd672

Please sign in to comment.