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

77 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 "pbcatalog/v1alpha1/selector.proto";
import "pbmesh/v1alpha1/upstreams_configuration.proto";
import "pbresource/resource.proto";
message Upstreams {
// Selection of workloads these upstreams should apply to.
// These can be prefixes or specific workload names.
hashicorp.consul.catalog.v1alpha1.WorkloadSelector workloads = 1;
// upstreams is the list of explicit upstreams to define for the selected workloads.
repeated Upstream upstreams = 2;
// pq_upstreams is the list of prepared query upstreams. This field is not supported directly in v2
// and should only be used for migration reasons.
repeated PreparedQueryUpstream pq_upstreams = 3;
}
message Upstream {
// destination_ref is the reference to an upstream service. This has to be pbcatalog.Service type.
hashicorp.consul.resource.Reference destination_ref = 1;
// destination_port is the port name of the upstream service. This should be the name
// of the service's target port.
string destination_port = 2;
// datacenter is the datacenter for where this upstream service lives.
string datacenter = 3;
// listen_addr is the address where Envoy will listen for requests to this upstream.
// It can provided either as an ip:port or as a Unix domain socket.
oneof listen_addr {
IPPortAddress ip_port = 4;
UnixSocketAddress unix = 5;
}
}
message IPPortAddress {
// ip is an IPv4 or an IPv6 address.
string ip = 1;
// port is the port number.
uint32 port = 2;
}
message UnixSocketAddress {
// path is the file system path at which to bind a Unix domain socket listener.
string path = 1;
// mode is the Unix file mode for the socket file. It should be provided
// in the numeric notation, for example, "0600".
string mode = 2;
}
message PreparedQueryUpstream {
// name is the name of the prepared query to use as an upstream.
string name = 1;
// datacenter is the datacenter for where this upstream service lives.
string datacenter = 2;
// listen_addr is the address where Envoy will listen for requests to this upstream.
// It can provided either as an ip:port or as a Unix domain socket.
oneof listen_addr {
IPPortAddress tcp = 4;
UnixSocketAddress unix = 5;
}
UpstreamConfig upstream_config = 6;
}