Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: remove support for cluster_names field in ApiConfigSource protos of type gRPC #3808

Merged

Conversation

ambuc
Copy link
Contributor

@ambuc ambuc commented Jul 9, 2018

Signed-off-by: James Buckland jbuckland@google.com

Description:
As noted in #3716, we want to deprecate support for the cluster_names field in ApiConfigSource protos (api/envoy/api/v2/core/config_source.proto) of type gRPC. This change only effects configs of type gRPC; configs of type REST and REST_LEGACY are unchanged. This change had its groundwork laid in issue #2860 and PR #3067.

Risk Level: Medium. This will throw an EnvoyException on nonconforming configs. This change is part of the 1.8.0 milestone.

Testing: //test/common/config/utility_test.cc had to be changed to account for this.

Docs Changes: I don't think docs/root/configuration/overview/v2_overview.rst needs to be changed for this.

Fixes #3716

…ype gRPC.

Signed-off-by: James Buckland <jbuckland@google.com>
@htuch htuch self-assigned this Jul 9, 2018
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one tiny nit.

@@ -90,12 +94,8 @@ void Utility::checkApiConfigSourceNames(

if (is_grpc) {
if (api_config_source.cluster_names().size() != 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: !api_config_source.cluster_names().empty().

Signed-off-by: James Buckland <jbuckland@google.com>
htuch
htuch previously approved these changes Jul 9, 2018
Signed-off-by: James Buckland <jbuckland@google.com>
@mattklein123 mattklein123 merged commit 74928c7 into envoyproxy:master Jul 9, 2018
@ambuc ambuc deleted the remove-deprecated-cluster-names branch July 9, 2018 21:32
@wrfly
Copy link

wrfly commented Jul 10, 2018

Hello guys, do you have some plan to update the documentation?

https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/core/config_source.proto#envoy-api-msg-core-apiconfigsource

The cluster_names is outdated and I always get API configs must have either a gRPC service or a cluster name defined nor envoy::api::v2::core::ConfigSource::GRPC must not have a cluster name specified. With this configuration:

dynamic_resources:
  lds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]
  cds_config:
    api_config_source:
      api_type: GRPC
      cluster_names: [xds_cluster]
dynamic_resources:
  lds_config:
    api_config_source:
      api_type: GRPC
  cds_config:
    api_config_source:
      api_type: GRPC

@htuch
Copy link
Member

htuch commented Jul 10, 2018

@ambuc ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants