Skip to content

config: sync with recent API changes in bootstrap and TLS.#1548

Merged
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
PiotrSikora:api_sync-b9e89d76
Aug 25, 2017
Merged

config: sync with recent API changes in bootstrap and TLS.#1548
mattklein123 merged 2 commits intoenvoyproxy:masterfrom
PiotrSikora:api_sync-b9e89d76

Conversation

@PiotrSikora
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@PiotrSikora
Copy link
Copy Markdown
Contributor Author

PiotrSikora commented Aug 25, 2017

@mattklein123 Not sure what we want to do with renamed fields in the long-term. Should we leave the old names in JSON and use the new names only with YAML / Proto? Should we rename them in JSON, or maybe support both there?

@PiotrSikora
Copy link
Copy Markdown
Contributor Author

Sigh, macOS test failed on ConnectionImplTest/BindTest. Any way to rerun it? /cc @zuercher

@zuercher
Copy link
Copy Markdown
Member

That test is flakey on OS X. I recommend ignoring it for now. I'll look at the test tomorrow.

@mattklein123
Copy link
Copy Markdown
Member

mattklein123 commented Aug 25, 2017

@PiotrSikora I would not bother renaming in v1 JSON. I don't think it's worth it personally. For things that are just straight renames, we can use the new names in code, and in v2 config. For things that are new functionality, we can use judgement in terms of whether to bother supporting in v1 or not. For example, I don't think we ever have to support multiple client certs in v1. However, I think we should support SNI in v1 because it's such a highly requested feature.

void ClusterManagerImpl::initializeClustersFromV2Proto(const envoy::api::v2::Bootstrap& bootstrap) {
for (const auto& cluster : bootstrap.bootstrap_clusters()) {
loadCluster(cluster, false);
if (bootstrap.has_static_resources()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I think @htuch has only been doing has* when it's really necessary. Here I think you can just call static_resources() to construct a default, the clusters() will just return empty list.

// We can now potentially create the CDS API once the backing cluster exists.
if (bootstrap.has_cds_config()) {
cds_api_ = factory_.createCds(bootstrap.cds_config(), sds_config_, *this);
if (bootstrap.has_dynamic_resources() && bootstrap.dynamic_resources().has_cds_config()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: same here with first clause. Will stop commenting now for other things. @htuch is out right now but looking at other code I think this is what he has been doing. You can also see: https://github.com/lyft/envoy/pull/1521/files for some of the code he started to write. (That change needs mega merging so might as well just continue with this one since it's much smaller).

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
@mattklein123 mattklein123 merged commit b0d8095 into envoyproxy:master Aug 25, 2017
jpsim pushed a commit that referenced this pull request Nov 28, 2022
…col: alpn (#1588)

Risk Level: low
Testing: unit tests
Docs Changes: n/a
Release Notes: n/a
Part of #1548
Part of #1558

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
…col: alpn (#1588)

Risk Level: low
Testing: unit tests
Docs Changes: n/a
Release Notes: n/a
Part of #1548
Part of #1558

Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: JP Simard <jp@jpsim.com>
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.

3 participants