Skip to content

Commit

Permalink
api: sync v3 -> v3alpha.
Browse files Browse the repository at this point in the history
Via ./api/migration/v3alpha.sh. This picks up the changes since the last
sync, in particular the major reformat in envoyproxy#8309.

Risk level: Low (not used yet).
Testing: bazel build @envoy_api//...

Signed-off-by: Harvey Tuch <htuch@google.com>
  • Loading branch information
htuch committed Sep 24, 2019
1 parent e07dc53 commit f60a930
Show file tree
Hide file tree
Showing 99 changed files with 2,353 additions and 1,825 deletions.
3 changes: 1 addition & 2 deletions api/envoy/admin/v3alpha/certs.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ message Certificates {
}

message Certificate {

// Details of CA certificate.
repeated CertificateDetails ca_cert = 1;

Expand Down Expand Up @@ -48,10 +47,10 @@ message CertificateDetails {
}

message SubjectAlternateName {

// Subject Alternate Name.
oneof name {
string dns = 1;

string uri = 2;
}
}
12 changes: 6 additions & 6 deletions api/envoy/admin/v3alpha/clusters.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message ClusterStatus {
// 2. The threshold is computed to be < 0 because a negative value implies that there was no
// threshold for that interval.
// 3. Outlier detection is not enabled for this cluster.
envoy.type.Percent success_rate_ejection_threshold = 3;
type.Percent success_rate_ejection_threshold = 3;

// Mapping from host address to the host's current status.
repeated HostStatus host_statuses = 4;
Expand All @@ -65,13 +65,13 @@ message ClusterStatus {
// 2. The threshold is computed to be < 0 because a negative value implies that there was no
// threshold for that interval.
// 3. Outlier detection is not enabled for this cluster.
envoy.type.Percent local_origin_success_rate_ejection_threshold = 5;
type.Percent local_origin_success_rate_ejection_threshold = 5;
}

// Current state of a particular host.
message HostStatus {
// Address of this host.
envoy.api.v3alpha.core.Address address = 1;
api.v3alpha.core.Address address = 1;

// List of stats specific to this host.
repeated SimpleMetric stats = 2;
Expand All @@ -92,7 +92,7 @@ message HostStatus {
// Note: the message will not be present if host did not have enough request volume to calculate
// success rate or the cluster did not have enough hosts to run through success rate outlier
// ejection.
envoy.type.Percent success_rate = 4;
type.Percent success_rate = 4;

// The host's weight. If not configured, the value defaults to 1.
uint32 weight = 5;
Expand All @@ -115,7 +115,7 @@ message HostStatus {
// Note: the message will not be present if host did not have enough request volume to calculate
// success rate or the cluster did not have enough hosts to run through success rate outlier
// ejection.
envoy.type.Percent local_origin_success_rate = 8;
type.Percent local_origin_success_rate = 8;
}

// Health status for a host.
Expand All @@ -139,5 +139,5 @@ message HostHealthStatus {
// Health status as reported by EDS. Note: only HEALTHY and UNHEALTHY are currently supported
// here.
// TODO(mrice32): pipe through remaining EDS health status possibilities.
envoy.api.v3alpha.core.HealthStatus eds_health_status = 3;
api.v3alpha.core.HealthStatus eds_health_status = 3;
}
42 changes: 21 additions & 21 deletions api/envoy/admin/v3alpha/config_dump.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message ConfigDump {
// the static portions of an Envoy configuration by reusing the output as the bootstrap
// configuration for another Envoy.
message BootstrapConfigDump {
envoy.config.bootstrap.v3alpha.Bootstrap bootstrap = 1;
config.bootstrap.v3alpha.Bootstrap bootstrap = 1;

// The timestamp when the BootstrapConfig was last updated.
google.protobuf.Timestamp last_updated = 2;
Expand All @@ -49,15 +49,10 @@ message BootstrapConfigDump {
// configuration information can be used to recreate an Envoy configuration by populating all
// listeners as static listeners or by returning them in a LDS response.
message ListenersConfigDump {
// This is the :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` in the
// last processed LDS discovery response. If there are only static bootstrap listeners, this field
// will be "".
string version_info = 1;

// Describes a statically loaded listener.
message StaticListener {
// The listener config.
envoy.api.v3alpha.Listener listener = 1;
api.v3alpha.Listener listener = 1;

// The timestamp when the Listener was last updated.
google.protobuf.Timestamp last_updated = 2;
Expand All @@ -72,12 +67,17 @@ message ListenersConfigDump {
string version_info = 1;

// The listener config.
envoy.api.v3alpha.Listener listener = 2;
api.v3alpha.Listener listener = 2;

// The timestamp when the Listener was last updated.
google.protobuf.Timestamp last_updated = 3;
}

// This is the :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` in the
// last processed LDS discovery response. If there are only static bootstrap listeners, this field
// will be "".
string version_info = 1;

// The statically loaded listener configs.
repeated StaticListener static_listeners = 2;

Expand All @@ -102,15 +102,10 @@ message ListenersConfigDump {
// configuration information can be used to recreate an Envoy configuration by populating all
// clusters as static clusters or by returning them in a CDS response.
message ClustersConfigDump {
// This is the :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` in the
// last processed CDS discovery response. If there are only static bootstrap clusters, this field
// will be "".
string version_info = 1;

// Describes a statically loaded cluster.
message StaticCluster {
// The cluster config.
envoy.api.v3alpha.Cluster cluster = 1;
api.v3alpha.Cluster cluster = 1;

// The timestamp when the Cluster was last updated.
google.protobuf.Timestamp last_updated = 2;
Expand All @@ -125,12 +120,17 @@ message ClustersConfigDump {
string version_info = 1;

// The cluster config.
envoy.api.v3alpha.Cluster cluster = 2;
api.v3alpha.Cluster cluster = 2;

// The timestamp when the Cluster was last updated.
google.protobuf.Timestamp last_updated = 3;
}

// This is the :ref:`version_info <envoy_api_field_DiscoveryResponse.version_info>` in the
// last processed CDS discovery response. If there are only static bootstrap clusters, this field
// will be "".
string version_info = 1;

// The statically loaded cluster configs.
repeated StaticCluster static_clusters = 2;

Expand All @@ -153,7 +153,7 @@ message ClustersConfigDump {
message RoutesConfigDump {
message StaticRouteConfig {
// The route config.
envoy.api.v3alpha.RouteConfiguration route_config = 1;
api.v3alpha.RouteConfiguration route_config = 1;

// The timestamp when the Route was last updated.
google.protobuf.Timestamp last_updated = 2;
Expand All @@ -166,7 +166,7 @@ message RoutesConfigDump {
string version_info = 1;

// The route config.
envoy.api.v3alpha.RouteConfiguration route_config = 2;
api.v3alpha.RouteConfiguration route_config = 2;

// The timestamp when the Route was last updated.
google.protobuf.Timestamp last_updated = 3;
Expand All @@ -189,7 +189,7 @@ message ScopedRoutesConfigDump {
string name = 1;

// The scoped route configurations.
repeated envoy.api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2;
repeated api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 2;

// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 3;
Expand All @@ -205,7 +205,7 @@ message ScopedRoutesConfigDump {
string version_info = 2;

// The scoped route configurations.
repeated envoy.api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3;
repeated api.v3alpha.ScopedRouteConfiguration scoped_route_configs = 3;

// The timestamp when the scoped route config set was last updated.
google.protobuf.Timestamp last_updated = 4;
Expand Down Expand Up @@ -234,7 +234,7 @@ message SecretsConfigDump {
// The actual secret information.
// Security sensitive information is redacted (replaced with "[redacted]") for
// private keys and passwords in TLS certificates.
envoy.api.v3alpha.auth.Secret secret = 4;
api.v3alpha.auth.Secret secret = 4;
}

// StaticSecret specifies statically loaded secret in bootstrap.
Expand All @@ -248,7 +248,7 @@ message SecretsConfigDump {
// The actual secret information.
// Security sensitive information is redacted (replaced with "[redacted]") for
// private keys and passwords in TLS certificates.
envoy.api.v3alpha.auth.Secret secret = 3;
api.v3alpha.auth.Secret secret = 3;
}

// The statically loaded secrets.
Expand Down
2 changes: 1 addition & 1 deletion api/envoy/admin/v3alpha/listeners.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ message ListenerStatus {

// The actual local address that the listener is listening on. If a listener was configured
// to listen on port 0, then this address has the port that was allocated by the OS.
envoy.api.v3alpha.core.Address local_address = 2;
api.v3alpha.core.Address local_address = 2;
}
1 change: 0 additions & 1 deletion api/envoy/admin/v3alpha/memory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ option java_package = "io.envoyproxy.envoy.admin.v3alpha";
// values extracted from an internal TCMalloc instance. For more information, see the section of the
// docs entitled ["Generic Tcmalloc Status"](https://gperftools.github.io/gperftools/tcmalloc.html).
message Memory {

// The number of bytes allocated by the heap for Envoy. This is an alias for
// `generic.current_allocated_bytes`.
uint64 allocated = 1;
Expand Down
1 change: 0 additions & 1 deletion api/envoy/admin/v3alpha/mutex_stats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ option java_package = "io.envoyproxy.envoy.admin.v3alpha";
// correspond to core clock frequency. For more information, see the `CycleClock`
// [docs](https://github.com/abseil/abseil-cpp/blob/master/absl/base/internal/cycleclock.h).
message MutexStats {

// The number of individual mutex contentions which have occurred since startup.
uint64 num_contentions = 1;

Expand Down
46 changes: 25 additions & 21 deletions api/envoy/admin/v3alpha/server_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ import "google/protobuf/duration.proto";
// Proto representation of the value returned by /server_info, containing
// server version/server status information.
message ServerInfo {
// Server version.
string version = 1;

enum State {
// Server is live and serving traffic.
LIVE = 0;

// Server is draining listeners in response to external health checks failing.
DRAINING = 1;

// Server has not yet completed cluster manager initialization.
PRE_INITIALIZING = 2;

// Server is running the cluster manager initialization callbacks (e.g., RDS).
INITIALIZING = 3;
}

// Server version.
string version = 1;

// State of the server.
State state = 2;

Expand All @@ -44,6 +47,24 @@ message ServerInfo {
}

message CommandLineOptions {
enum IpVersion {
v4 = 0;
v6 = 1;
}

enum Mode {
// Validate configs and then serve traffic normally.
Serve = 0;

// Validate configs and exit.
Validate = 1;

// Completely load and initialize the config, and then exit without running the listener loop.
InitOnly = 2;
}

reserved 12;

// See :option:`--base-id` for details.
uint64 base_id = 1;

Expand All @@ -65,11 +86,6 @@ message CommandLineOptions {
// See :option:`--admin-address-path` for details.
string admin_address_path = 6;

enum IpVersion {
v4 = 0;
v6 = 1;
}

// See :option:`--local-address-ip-version` for details.
IpVersion local_address_ip_version = 7;

Expand All @@ -85,8 +101,6 @@ message CommandLineOptions {
// See :option:`--log-path` for details.
string log_path = 11;

reserved 12;

// See :option:`--service-cluster` for details.
string service_cluster = 13;

Expand All @@ -105,22 +119,12 @@ message CommandLineOptions {
// See :option:`--parent-shutdown-time-s` for details.
google.protobuf.Duration parent_shutdown_time = 18;

enum Mode {
// Validate configs and then serve traffic normally.
Serve = 0;

// Validate configs and exit.
Validate = 1;

// Completely load and initialize the config, and then exit without running the listener loop.
InitOnly = 2;
}

// See :option:`--mode` for details.
Mode mode = 19;

// max_stats and max_obj_name_len are now unused and have no effect.
uint64 max_stats = 20 [deprecated = true];

uint64 max_obj_name_len = 21 [deprecated = true];

// See :option:`--disable-hot-restart` for details.
Expand Down
11 changes: 6 additions & 5 deletions api/envoy/admin/v3alpha/tap.proto
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
syntax = "proto3";

import "envoy/service/tap/v3alpha/common.proto";
import "validate/validate.proto";

package envoy.admin.v3alpha;

option java_outer_classname = "TapProto";
option java_multiple_files = true;
option java_package = "io.envoyproxy.envoy.admin.v3alpha";

import "envoy/service/tap/v3alpha/common.proto";

import "validate/validate.proto";

// The /tap admin request body that is used to configure an active tap session.
message TapRequest {
// The opaque configuration ID used to match the configuration to a loaded extension.
// A tap extension configures a similar opaque ID that is used to match.
string config_id = 1 [(validate.rules).string.min_bytes = 1];
string config_id = 1 [(validate.rules).string = {min_bytes: 1}];

// The tap configuration to load.
service.tap.v3alpha.TapConfig tap_config = 2 [(validate.rules).message.required = true];
service.tap.v3alpha.TapConfig tap_config = 2 [(validate.rules).message = {required: true}];
}
3 changes: 3 additions & 0 deletions api/envoy/api/v3alpha/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ api_proto_package(
"//envoy/api/v3alpha/listener:pkg",
"//envoy/api/v3alpha/ratelimit:pkg",
"//envoy/api/v3alpha/route:pkg",
"//envoy/config/listener/v3alpha:pkg",
"//envoy/type",
],
)

api_proto_library_internal(
name = "discovery",
srcs = ["discovery.proto"],
has_services = 1,
visibility = [":friends"],
deps = ["//envoy/api/v3alpha/core:base"],
)
Expand Down Expand Up @@ -86,6 +88,7 @@ api_proto_library_internal(
"//envoy/api/v3alpha/core:base",
"//envoy/api/v3alpha/listener",
"//envoy/api/v3alpha/listener:udp_listener_config",
"//envoy/config/listener/v3alpha:api_listener",
],
)

Expand Down
Loading

0 comments on commit f60a930

Please sign in to comment.