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

Add lb traffic extension resource #10121

Merged
merged 23 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b24e7cb
adding mmv1 for lb-traffic-extension and initial basic test
pweiber Mar 1, 2024
d3946cf
Merge remote-tracking branch 'pweiber/lb-traffic-extension' into lb-t…
maxi-cit Mar 5, 2024
d709a93
fixed lint errors
maxi-cit Mar 7, 2024
77a19ec
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Mar 27, 2024
5d909d9
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 2, 2024
5c9f2ff
removing beta annotations
maxi-cit Apr 3, 2024
1f7f3e6
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 4, 2024
afbd42a
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 9, 2024
3b2db3b
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 11, 2024
83597f1
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 16, 2024
9028fc5
updating test fields
maxi-cit Apr 16, 2024
1431418
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 27, 2024
4053b82
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit Apr 30, 2024
cc68fea
fixed test by adding workaround
maxi-cit Apr 30, 2024
c4b279b
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit May 7, 2024
9c5bcb6
fixed basic test and added supress funcs
maxi-cit May 7, 2024
d43753a
added update test
maxi-cit May 8, 2024
e3e01e8
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit May 8, 2024
3b6e040
added update test
maxi-cit May 9, 2024
0b5518c
removed min_version beta
maxi-cit May 9, 2024
2d32432
added explicit resource dependency for replaying mode
maxi-cit May 10, 2024
f155d86
Merge remote-tracking branch 'upstream/main' into lb-traffic-extension
maxi-cit May 14, 2024
5b3b2d3
fixed test
maxi-cit May 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions mmv1/products/networkservices/LbTrafficExtension.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Copyright 2024 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

--- !ruby/object:Api::Resource
name: 'LbTrafficExtension'
description: |
LbTrafficExtension is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Configure a traffic extension': 'https://cloud.google.com/service-extensions/docs/configure-callout#configure_a_traffic_extension'
api: 'https://cloud.google.com/service-extensions/docs/reference/rest/v1beta1/projects.locations.lbTrafficExtensions'
min_version: beta
base_url: 'projects/{{project}}/locations/{{location}}/lbTrafficExtensions'
self_link: 'projects/{{project}}/locations/{{location}}/lbTrafficExtensions/{{name}}'
timeouts: !ruby/object:Api::Timeouts
insert_minutes: 20
update_minutes: 20
delete_minutes: 20
create_url: 'projects/{{project}}/locations/{{location}}/lbTrafficExtensions?lbTrafficExtensionId={{name}}'
update_verb: :PATCH
update_mask: true
autogen_async: true
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
base_url: '{{op_id}}'
examples:
- !ruby/object:Provider::Terraform::Examples
name: 'network_services_lb_traffic_extension_basic'
primary_resource_id: 'google_network_services_lb_traffic_extension'
vars:
ilb_network_name: 'l7-ilb-network'
proxy_subnet_name: 'l7-ilb-proxy-subnet'
backend_subnet_name: 'l7-ilb-subnet'
forwarding_rule_name: 'l7-ilb-forwarding-rule'
target_http_proxy_name: 'l7-ilb-target-http-proxy'
regional_url_map_name: 'l7-ilb-regional-url-map'
backend_service_name: 'l7-ilb-backend-subnet'
mig_template_name: 'l7-ilb-mig-template'
hc_name: 'l7-ilb-hc'
mig_name: 'l7-ilb-mig1'
fw_allow_iap_hc_name: 'l7-ilb-fw-allow-iap-hc'
fw_allow_ilb_to_backends_name: 'l7-ilb-fw-allow-ilb-to-backends'
vm_test_name: 'l7-ilb-test-vm'
maxi-cit marked this conversation as resolved.
Show resolved Hide resolved
min_version: beta
ignore_read_extra:
- 'port_range'
- 'target'
parameters:
- !ruby/object:Api::Type::String
name: 'location'
required: true
immutable: true
url_param_only: true
description: |
The location of the traffic extension
- !ruby/object:Api::Type::String
name: 'name'
required: true
immutable: true
url_param_only: true
description: |
Name of the LbTrafficExtension resource in the following format: projects/{project}/locations/{location}/lbTrafficExtensions/{lbTrafficExtension}.
properties:
- !ruby/object:Api::Type::String
name: 'description'
description: |
A human-readable description of the resource.
- !ruby/object:Api::Type::KeyValueLabels
name: labels
description: 'Set of labels associated with the LbTrafficExtension resource.'
- !ruby/object:Api::Type::Array
name: forwardingRules
description: |
A list of references to the forwarding rules to which this service extension is attached to.
At least one forwarding rule is required. There can be only one LBTrafficExtension resource per forwarding rule.
required: true
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: extensionChains
description: |
A set of ordered extension chains that contain the match conditions and extensions to execute.
Match conditions for each extension chain are evaluated in sequence for a given request.
The first extension chain that has a condition that matches the request is executed.
Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.
required: true
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'name'
description: |
The name for this extension chain. The name is logged as part of the HTTP request logs.
The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens,
and can have a maximum length of 63 characters. Additionally, the first character must be a letter
and the last a letter or a number.
required: true
- !ruby/object:Api::Type::NestedObject
name: 'matchCondition'
description: |
Conditions under which this chain is invoked for a request.
required: true
properties:
- !ruby/object:Api::Type::String
name: 'celExpression'
description: |
A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed.
required: true
- !ruby/object:Api::Type::Array
name: 'extensions'
description: |
A set of extensions to execute for the matching request.
At least one extension is required. Up to 3 extensions can be defined for each extension chain for
LbTrafficExtension resource. LbRouteExtension chains are limited to 1 extension per extension chain.
required: true
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::String
name: 'name'
description: |
The name for this extension. The name is logged as part of the HTTP request logs.
The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens,
and can have a maximum length of 63 characters. Additionally, the first character must be a letter
and the last a letter or a number.
required: true
- !ruby/object:Api::Type::String
name: 'authority'
description: |
The :authority header in the gRPC request sent from Envoy to the extension service.
required: true
- !ruby/object:Api::Type::String
name: 'service'
description: |
The reference to the service that runs the extension. Must be a reference to a backend service
required: true
- !ruby/object:Api::Type::String
name: 'timeout'
description: |
Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds.
A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
required: true
- !ruby/object:Api::Type::Boolean
name: 'failOpen'
description: |
Determines how the proxy behaves if the call to the extension fails or times out.
When set to TRUE, request or response processing continues without error.
Any subsequent extensions in the extension chain are also executed.
When set to FALSE: * If response headers have not been delivered to the downstream client,
a generic 500 error is returned to the client. The error response can be tailored by
configuring a custom error response in the load balancer.
- !ruby/object:Api::Type::Array
name: 'forwardHeaders'
description: |
List of the HTTP headers to forward to the extension (from the client or backend).
If omitted, all headers are sent. Each element is a string indicating the header name.
item_type: Api::Type::String
- !ruby/object:Api::Type::Enum
name: 'supportedEvents'
description: |
A set of events during request or response processing for which this extension is called.
This field is required for the LbTrafficExtension resource. It's not relevant for the LbRouteExtension
resource.
values:
- :EVENT_TYPE_UNSPECIFIED
- :REQUEST_HEADERS
- :REQUEST_BODY
- :RESPONSE_HEADERS
- :RESPONSE_BODY
- !ruby/object:Api::Type::Enum
name: 'loadBalancingScheme'
description: |
All backend services and forwarding rules referenced by this extension must share the same load balancing scheme.
For more information, refer to Choosing a load balancer.
values:
- :LOAD_BALANCING_SCHEME_UNSPECIFIED
- :INTERNAL_MANAGED
- :EXTERNAL_MANAGED
Loading
Loading