Skip to content

Commit ad56690

Browse files
Google APIscopybara-github
authored andcommitted
feat: update NetworkServices protos
docs: A comment for field `metadata_label_match_criteria` in message `.google.cloud.networkservices.v1.EndpointMatcher` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.EndpointPolicy` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.Gateway` is changed docs: A comment for field `ports` in message `.google.cloud.networkservices.v1.Gateway` is changed docs: A comment for field `scope` in message `.google.cloud.networkservices.v1.Gateway` is changed docs: A comment for message `GrpcRoute` is changed docs: A comment for field `fault_injection_policy` in message `.google.cloud.networkservices.v1.GrpcRoute` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.GrpcRoute` is changed docs: A comment for message `HttpRoute` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.HttpRoute` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.Mesh` is changed docs: A comment for message `ServiceBinding` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.ServiceBinding` is changed docs: A comment for field `service` in message `.google.cloud.networkservices.v1.ServiceBinding` is changed docs: A comment for field `parent` in message `.google.cloud.networkservices.v1.ListServiceBindingsRequest` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.GetServiceBindingRequest` is changed docs: A comment for field `parent` in message `.google.cloud.networkservices.v1.CreateServiceBindingRequest` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.DeleteServiceBindingRequest` is changed docs: A comment for field `address` in message `.google.cloud.networkservices.v1.TcpRoute` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.TcpRoute` is changed docs: A comment for message `TlsRoute` is changed docs: A comment for field `matches` in message `.google.cloud.networkservices.v1.TlsRoute` is changed docs: A comment for field `sni_host` in message `.google.cloud.networkservices.v1.TlsRoute` is changed docs: A comment for field `weight` in message `.google.cloud.networkservices.v1.TlsRoute` is changed docs: A comment for field `name` in message `.google.cloud.networkservices.v1.TlsRoute` is changed PiperOrigin-RevId: 769281638
1 parent 2b2815c commit ad56690

13 files changed

Lines changed: 980 additions & 60 deletions

google/cloud/networkservices/v1/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ proto_library(
3232
"http_route.proto",
3333
"mesh.proto",
3434
"network_services.proto",
35+
"route_view.proto",
3536
"service_binding.proto",
37+
"service_lb_policy.proto",
3638
"tcp_route.proto",
3739
"tls_route.proto",
3840
],
@@ -365,6 +367,7 @@ load(
365367

366368
csharp_proto_library(
367369
name = "networkservices_csharp_proto",
370+
extra_opts = [],
368371
deps = [":networkservices_proto"],
369372
)
370373

google/cloud/networkservices/v1/common.proto

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ option java_package = "com.google.cloud.networkservices.v1";
2727
option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
2828
option ruby_package = "Google::Cloud::NetworkServices::V1";
2929

30+
// EnvoyHeader configuration for Mesh and Gateway
31+
enum EnvoyHeaders {
32+
// Defaults to NONE.
33+
ENVOY_HEADERS_UNSPECIFIED = 0;
34+
35+
// Suppress envoy debug headers.
36+
NONE = 1;
37+
38+
// Envoy will insert default internal debug headers into upstream requests:
39+
// x-envoy-attempt-count
40+
// x-envoy-is-timeout-retry
41+
// x-envoy-expected-rq-timeout-ms
42+
// x-envoy-original-path
43+
// x-envoy-upstream-stream-duration-ms
44+
DEBUG_HEADERS = 2;
45+
}
46+
3047
// Represents the metadata of the long-running operation.
3148
message OperationMetadata {
3249
// Output only. The time the operation was created.
@@ -120,7 +137,7 @@ message EndpointMatcher {
120137
//
121138
// If there is more than one best match, (for example, if a
122139
// config P4 with selector <A:1,D:1> exists and if a client with
123-
// label <A:1,B:1,D:1> connects), an error will be thrown.
140+
// label <A:1,B:1,D:1> connects), pick up the one with older creation time.
124141
MetadataLabelMatchCriteria metadata_label_match_criteria = 1;
125142

126143
// The list of label value pairs that must match labels in the

google/cloud/networkservices/v1/endpoint_policy.proto

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ message EndpointPolicy {
6464
GRPC_SERVER = 2;
6565
}
6666

67-
// Required. Name of the EndpointPolicy resource. It matches pattern
67+
// Identifier. Name of the EndpointPolicy resource. It matches pattern
6868
// `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.
69-
string name = 1 [(google.api.field_behavior) = REQUIRED];
69+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
7070

7171
// Output only. The timestamp when the resource was created.
7272
google.protobuf.Timestamp create_time = 2
@@ -154,6 +154,11 @@ message ListEndpointPoliciesRequest {
154154
// `ListEndpointPolicies` call, and that the system should return the
155155
// next page of data.
156156
string page_token = 3;
157+
158+
// Optional. If true, allow partial responses for multi-regional Aggregated
159+
// List requests. Otherwise if one of the locations is down or unreachable,
160+
// the Aggregated List request will fail.
161+
bool return_partial_success = 4 [(google.api.field_behavior) = OPTIONAL];
157162
}
158163

159164
// Response returned by the ListEndpointPolicies method.
@@ -165,6 +170,12 @@ message ListEndpointPoliciesResponse {
165170
// `next_page_token` is included. To get the next set of results, call this
166171
// method again using the value of `next_page_token` as `page_token`.
167172
string next_page_token = 2;
173+
174+
// Unreachable resources. Populated when the request opts into
175+
// [return_partial_success][google.cloud.networkservices.v1.ListEndpointPoliciesRequest.return_partial_success]
176+
// and reading across collections e.g. when
177+
// attempting to list all resources across all supported locations.
178+
repeated string unreachable = 3;
168179
}
169180

170181
// Request used with the GetEndpointPolicy method.

google/cloud/networkservices/v1/gateway.proto

Lines changed: 150 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.networkservices.v1;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/api/resource.proto";
21+
import "google/cloud/networkservices/v1/common.proto";
2122
import "google/protobuf/field_mask.proto";
2223
import "google/protobuf/timestamp.proto";
2324

@@ -29,6 +30,29 @@ option java_package = "com.google.cloud.networkservices.v1";
2930
option php_namespace = "Google\\Cloud\\NetworkServices\\V1";
3031
option ruby_package = "Google::Cloud::NetworkServices::V1";
3132

33+
// Resource definitions uncouple the proto from the external API for client
34+
// generation purposes.
35+
option (google.api.resource_definition) = {
36+
type: "networksecurity.googleapis.com/GatewaySecurityPolicy"
37+
pattern: "projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}"
38+
};
39+
option (google.api.resource_definition) = {
40+
type: "compute.googleapis.com/Subnetwork"
41+
pattern: "projects/{project}/regions/{region}/subnetworks/{subnetwork}"
42+
};
43+
option (google.api.resource_definition) = {
44+
type: "compute.googleapis.com/Network"
45+
pattern: "projects/{project}/global/networks/{network}"
46+
};
47+
option (google.api.resource_definition) = {
48+
type: "compute.googleapis.com/Address"
49+
pattern: "projects/{project}/regions/{region}/addresses/{address}"
50+
};
51+
option (google.api.resource_definition) = {
52+
type: "certificatemanager.googleapis.com/Certificate"
53+
pattern: "projects/{project}/locations/{location}/certificates/{certificate}"
54+
};
55+
3256
// Gateway represents the configuration for a proxy, typically a load balancer.
3357
// It captures the ip:port over which the services are exposed by the proxy,
3458
// along with any policy configurations. Routes have reference to to Gateways to
@@ -55,9 +79,41 @@ message Gateway {
5579
SECURE_WEB_GATEWAY = 2;
5680
}
5781

58-
// Required. Name of the Gateway resource. It matches pattern
82+
// The types of IP version for the gateway.
83+
// Possible values are:
84+
// * IPV4
85+
// * IPV6
86+
enum IpVersion {
87+
// The type when IP version is not specified. Defaults to IPV4.
88+
IP_VERSION_UNSPECIFIED = 0;
89+
90+
// The type for IP version 4.
91+
IPV4 = 1;
92+
93+
// The type for IP version 6.
94+
IPV6 = 2;
95+
}
96+
97+
// The routing mode of the Gateway, to determine how the Gateway routes
98+
// traffic. Today, this field only applies to Gateways of type
99+
// SECURE_WEB_GATEWAY. Possible values are:
100+
// * EXPLICIT_ROUTING_MODE
101+
// * NEXT_HOP_ROUTING_MODE
102+
enum RoutingMode {
103+
// The routing mode is explicit; clients are configured to send
104+
// traffic through the gateway. This is the default routing mode.
105+
EXPLICIT_ROUTING_MODE = 0;
106+
107+
// The routing mode is next-hop. Clients are unaware of the gateway,
108+
// and a route (advanced route or other route type)
109+
// can be configured to direct traffic from client to gateway.
110+
// The gateway then acts as a next-hop to the destination.
111+
NEXT_HOP_ROUTING_MODE = 1;
112+
}
113+
114+
// Identifier. Name of the Gateway resource. It matches pattern
59115
// `projects/*/locations/*/gateways/<gateway_name>`.
60-
string name = 1 [(google.api.field_behavior) = REQUIRED];
116+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
61117

62118
// Output only. Server-defined URL of this resource
63119
string self_link = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
@@ -81,27 +137,104 @@ message Gateway {
81137
// This field is required. If unspecified, an error is returned.
82138
Type type = 6 [(google.api.field_behavior) = IMMUTABLE];
83139

84-
// Required. One or more ports that the Gateway must receive traffic on. The
85-
// proxy binds to the ports specified. Gateway listen on 0.0.0.0 on the ports
86-
// specified below.
140+
// Optional. Zero or one IPv4 or IPv6 address on which the Gateway will
141+
// receive the traffic. When no address is provided, an IP from the subnetwork
142+
// is allocated
143+
//
144+
// This field only applies to gateways of type 'SECURE_WEB_GATEWAY'.
145+
// Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.
146+
repeated string addresses = 7 [
147+
(google.api.field_behavior) = OPTIONAL,
148+
(google.api.resource_reference) = { type: "compute.googleapis.com/Address" }
149+
];
150+
151+
// Required. One or more port numbers (1-65535), on which the Gateway will
152+
// receive traffic. The proxy binds to the specified ports.
153+
// Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port.
154+
// Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and
155+
// support multiple ports.
87156
repeated int32 ports = 11 [(google.api.field_behavior) = REQUIRED];
88157

89-
// Required. Immutable. Scope determines how configuration across multiple
90-
// Gateway instances are merged. The configuration for multiple Gateway
91-
// instances with the same scope will be merged as presented as a single
92-
// coniguration to the proxy/load balancer.
158+
// Optional. Scope determines how configuration across multiple Gateway
159+
// instances are merged. The configuration for multiple Gateway instances with
160+
// the same scope will be merged as presented as a single configuration to the
161+
// proxy/load balancer.
93162
//
94163
// Max length 64 characters.
95164
// Scope should start with a letter and can only have letters, numbers,
96165
// hyphens.
97-
string scope = 8 [
98-
(google.api.field_behavior) = REQUIRED,
99-
(google.api.field_behavior) = IMMUTABLE
100-
];
166+
string scope = 8 [(google.api.field_behavior) = OPTIONAL];
101167

102168
// Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how
103169
// TLS traffic is terminated. If empty, TLS termination is disabled.
104-
string server_tls_policy = 9 [(google.api.field_behavior) = OPTIONAL];
170+
string server_tls_policy = 9 [
171+
(google.api.field_behavior) = OPTIONAL,
172+
(google.api.resource_reference) = {
173+
type: "networksecurity.googleapis.com/ServerTlsPolicy"
174+
}
175+
];
176+
177+
// Optional. A fully-qualified Certificates URL reference. The proxy presents
178+
// a Certificate (selected based on SNI) when establishing a TLS connection.
179+
// This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.
180+
repeated string certificate_urls = 14 [
181+
(google.api.field_behavior) = OPTIONAL,
182+
(google.api.resource_reference) = {
183+
type: "certificatemanager.googleapis.com/Certificate"
184+
}
185+
];
186+
187+
// Optional. A fully-qualified GatewaySecurityPolicy URL reference.
188+
// Defines how a server should apply security policy to inbound
189+
// (VM to Proxy) initiated connections.
190+
//
191+
// For example:
192+
// `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`.
193+
//
194+
// This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.
195+
string gateway_security_policy = 18 [
196+
(google.api.field_behavior) = OPTIONAL,
197+
(google.api.resource_reference) = {
198+
type: "networksecurity.googleapis.com/GatewaySecurityPolicy"
199+
}
200+
];
201+
202+
// Optional. The relative resource name identifying the VPC network that is
203+
// using this configuration. For example:
204+
// `projects/*/global/networks/network-1`.
205+
//
206+
// Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.
207+
string network = 16 [
208+
(google.api.field_behavior) = OPTIONAL,
209+
(google.api.resource_reference) = { type: "compute.googleapis.com/Network" }
210+
];
211+
212+
// Optional. The relative resource name identifying the subnetwork in which
213+
// this SWG is allocated. For example:
214+
// `projects/*/regions/us-central1/subnetworks/network-1`
215+
//
216+
// Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY".
217+
string subnetwork = 17 [
218+
(google.api.field_behavior) = OPTIONAL,
219+
(google.api.resource_reference) = {
220+
type: "compute.googleapis.com/Subnetwork"
221+
}
222+
];
223+
224+
// Optional. The IP Version that will be used by this gateway. Valid options
225+
// are IPV4 or IPV6. Default is IPV4.
226+
IpVersion ip_version = 21 [(google.api.field_behavior) = OPTIONAL];
227+
228+
// Optional. Determines if envoy will insert internal debug headers into
229+
// upstream requests. Other Envoy headers may still be injected. By default,
230+
// envoy will not insert any debug headers.
231+
optional EnvoyHeaders envoy_headers = 28
232+
[(google.api.field_behavior) = OPTIONAL];
233+
234+
// Optional. The routing mode of the Gateway.
235+
// This field is configurable only for gateways of type SECURE_WEB_GATEWAY.
236+
// This field is required for gateways of type SECURE_WEB_GATEWAY.
237+
RoutingMode routing_mode = 32 [(google.api.field_behavior) = OPTIONAL];
105238
}
106239

107240
// Request used with the ListGateways method.
@@ -133,6 +266,9 @@ message ListGatewaysResponse {
133266
// `next_page_token` is included. To get the next set of results, call this
134267
// method again using the value of `next_page_token` as `page_token`.
135268
string next_page_token = 2;
269+
270+
// Locations that could not be reached.
271+
repeated string unreachable = 3;
136272
}
137273

138274
// Request used by the GetGateway method.

0 commit comments

Comments
 (0)