consul/proto-public/pbmesh/v1alpha1/tcp_route.proto

57 lines
2.3 KiB
Protocol Buffer
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
[COMPLIANCE] License changes (#18443) * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Adding explicit MPL license for sub-package This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. * Updating the license from MPL to Business Source License Going forward, this project will be licensed under the Business Source License v1.1. Please see our blog post for more details at <Blog URL>, FAQ at www.hashicorp.com/licensing-faq, and details of the license at www.hashicorp.com/bsl. * add missing license headers * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 * Update copyright file headers to BUSL-1.1 --------- Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-08-11 13:12:13 +00:00
// SPDX-License-Identifier: BUSL-1.1
syntax = "proto3";
package hashicorp.consul.mesh.v1alpha1;
import "pbmesh/v1alpha1/common.proto";
// NOTE: this should align to the GAMMA/gateway-api version, or at least be
// easily translatable.
//
// https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1alpha2.TCPRoute
//
// This is a Resource type.
message TCPRoute {
// ParentRefs references the resources (usually Gateways) that a Route wants
// to be attached to. Note that the referenced parent resource needs to allow
// this for the attachment to be complete. For Gateways, that means the
// Gateway needs to allow attachment from Routes of this kind and namespace.
//
// It is invalid to reference an identical parent more than once. It is valid
// to reference multiple distinct sections within the same parent resource,
// such as 2 Listeners within a Gateway.
repeated ParentReference parent_refs = 1;
// Rules are a list of TCP matchers and actions.
repeated TCPRouteRule rules = 2;
}
message TCPRouteRule {
// BackendRefs defines the backend(s) where matching requests should be sent.
// If unspecified or invalid (refers to a non-existent resource or a Service
// with no endpoints), the underlying implementation MUST actively reject
// connection attempts to this backend. Connection rejections must respect
// weight; if an invalid backend is requested to have 80% of connections,
// then 80% of connections must be rejected instead.
repeated TCPBackendRef backend_refs = 1;
}
message TCPBackendRef {
BackendReference backend_ref = 1;
// Weight specifies the proportion of requests forwarded to the referenced
// backend. This is computed as weight/(sum of all weights in this
// BackendRefs list). For non-zero values, there may be some epsilon from the
// exact proportion defined here depending on the precision an implementation
// supports. Weight is not a percentage and the sum of weights does not need
// to equal 100.
//
//If only one backend is specified and it has a weight greater than 0, 100%
//of the traffic is forwarded to that backend. If weight is set to 0, no
//traffic should be forwarded for this entry. If unspecified, weight defaults
//to 1.
uint32 weight = 2;
}