consul/proto-public/pbcatalog/v1alpha1/workload.proto

67 lines
2.2 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.catalog.v1alpha1;
import "pbcatalog/v1alpha1/protocol.proto";
// Workload is the representation of a unit of addressable work. This could
// represent a process on a VM, a Kubernetes pod or something else entirely.
message Workload {
// addresses has a list of all workload addresses. This should include
// LAN and WAN addresses as well as any addresses a proxy would need
// to bind to (if different from the default address).
repeated WorkloadAddress addresses = 1;
// ports is a map from port name to workload ports number and protocol.
map<string, WorkloadPort> ports = 2;
// node_name is the name of the node this workload belongs to.
string node_name = 3;
// identity is the name of the workload identity this workload is associated with.
string identity = 4;
// Locality specifies workload locality.
Locality locality = 5;
// Below fields are deprecated but kept here for backward compatibility reasons.
// deprecated: tags correspond to service tags that you can add to a service for DNS resolution.
repeated string tags = 6 [deprecated = true];
// deprecated: enable_tag_override indicates whether agents should be overriding tags during anti-entropy syncs.
bool enable_tag_override = 7 [deprecated = true];
// deprecated: connect_native indicates whether this workload is connect native which will allow it to be
// part of MeshEndpoints without having the corresponding Proxy resource.
bool connect_native = 8 [deprecated = true];
}
message WorkloadAddress {
// host can be an IP, DNS name or a unix socket.
// If it's a unix socket, only one port can be provided.
string host = 1;
// ports is a list of names of ports that this host binds to.
// If no ports are provided, we will assume all ports from the ports map.
repeated string ports = 2;
// external indicates whether this address should be used for external communication
// (aka a WAN address).
bool external = 3;
}
message WorkloadPort {
uint32 port = 1;
Protocol protocol = 2;
}
message Locality {
// Region is region the zone belongs to.
string region = 1;
// Zone is the zone the entity is running in.
string zone = 2;
}