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

65 lines
2.5 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 "pbresource/resource.proto";
// NOTE: roughly equivalent to structs.ResourceReference
message ParentReference {
// For east/west configuration, this should point to a pbcatalog.Service.
// For north/south it should point to a gateway (TBD)
hashicorp.consul.resource.Reference ref = 1;
// Port is the network port this Route targets. It can be interpreted
// differently based on the type of parent resource.
//
// When the parent resource is a Gateway, this targets all listeners
// listening on the specified port that also support this kind of Route(and
// select this Route). Its not recommended to set Port unless the networking
// behaviors specified in a Route must apply to a specific port as opposed to
// a listener(s) whose port(s) may be changed. When both Port and SectionName
// are specified, the name and port of the selected listener must match both
// specified values.
//
// Implementations MAY choose to support other parent resources.
// Implementations supporting other types of parent resources MUST clearly
// document how/if Port is interpreted.
//
// For the purpose of status, an attachment is considered successful as long
// as the parent resource accepts it partially. For example, Gateway
// listeners can restrict which Routes can attach to them by Route kind,
// namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from
// the referencing Route, the Route MUST be considered successfully attached.
// If no Gateway listeners accept attachment from this Route, the Route MUST
// be considered detached from the Gateway.
//
// For east/west this is the name of the consul port.
// For north/south this is the stringified integer port expected by GAMMA.
//
// https://gateway-api.sigs.k8s.io/geps/gep-957/
string port = 2;
}
message BackendReference {
// For east/west configuration, this should point to either a
// pbcatalog.Service or ServiceSubset.
//
// For Partition/PeerName fields likely we could map them to ServiceImports
// (MCS+GAMMA) when translating
hashicorp.consul.resource.Reference ref = 1;
// For east/west this is the name of the consul port.
string port = 2;
// NOT IN GAMMA; multi-cluster + GWapi is still unknown
//
// Likely we could map this to ServiceImports (MCS+GAMMA) when translating
// to/from k8s.
//
// https://gateway-api.sigs.k8s.io/geps/gep-1748/
string datacenter = 3;
}