Fixes https://github.com/cncf/xds/issues/7
This follows a path taken by the protobuf team for the protobuf v2
migration.
In go, protobuf generated files are singletons. Its impossible to import
cncf/xds and cncf/udpa at the same time as a result.
grpc/grpc-go is on cncf/udpa at the moment, which means that likely
almost all others are as well. A quick github query shows 350 users of
cncf/udpa and 50 of cncf/xds. One option is to have grpc-go update and
hope others follow (https://github.com/grpc/grpc-go/pull/4812). However,
this would introduce churn for users.
Instead, we can do this approach which should allow seemles
interoperability between the two repos.
I have tested this on
istio.io/istio, https://github.com/howardjohn/cncf-udpa-to-xds-repro,
and grpc/grpc-go; all tests pass in these repos.
* Replace UDPA references with xDS.
* Move from udpa.core.v1 to xds.core.v3. The idea is to use v3 to remain
consistent with xDS v3 package namespace elsewhere.
Signed-off-by: Harvey Tuch <htuch@google.com>
It's a _lot_ more convenient when writing proto literals (e.g. in
filesystem config files) to be able to specify a single flat ID than
repeated. Also, this makes some of the decisions around /-escaping
simpler in different implementations.
Signed-off-by: Harvey Tuch <htuch@google.com>
After spending some time looking at RFC3986 and chatting with Louis, it
seems we can support multiple directives in the fragment, but we need to
be very precise on how they are percent encoded.
This patch proposes that we move from having multiple fragments (which
are not allowed in RFC compliant URIs) to a single fragment with
comma-separated percent encoded directives. Comma was selected as it is
an available character in RFC3986 sub-delims, intuitively indicates
separation, and is less likely to appear in URIs (forcing percent
encoding) than other alternatives, e.g. '&' which would appear in most
URIs with context parameters.
Percent encoded directives in URIs should remain fairly readable, for
example udpa://foo#entry=something,alt=udpa://bar/baz&x=y requires no
percent encoding.
Also renamed schema to scheme to match RFC3986.
Signed-off-by: Harvey Tuch <htuch@google.com>
This is the start of some work to automate tracking of fields that
should be set in the presence of untrusted downstreams/upstreams. In the
future we could add recommended settings etc.
Relates to https://github.com/envoyproxy/envoy/issues/9087
Signed-off-by: Harvey Tuch <htuch@google.com>
If FROZEN is 0 (default) enum value, it may be skipped in output
rendering. This PR makes it always explicit. This is technically a
breaking change for these annotations, but they are not in use yet.
Signed-off-by: Harvey Tuch <htuch@google.com>
In support of https://github.com/envoyproxy/envoy/issues/10355, it would
be helpful for the protoxform aspect to be able to distinguish the
package version that is currently open for active development.
For some packages, this is likely to move to v3 shortly, but due to the
DAG package version structure, this won't be universal.
Signed-off-by: Harvey Tuch <htuch@google.com>
Pointing to a repository without go code is not valid go code outside of bazel environment:
udpa/service/orca/v1/orca.pb.go:9:2: module github.com/cncf/udpa@latest (v0.0.0-20191004202315-015fc86d90f4) found, but does not contain package github.com/cncf/udpa/udpa/data/orca/v1
The proposal is to use this repo to host the golang generated UDPA protos.
Signed-off-by: Kuat Yessenov <kuat@google.com>