2023-07-21 16:21:39 +00:00
// Copyright (c) HashiCorp, Inc.
2023-08-21 17:31:54 +00:00
// SPDX-License-Identifier: MPL-2.0
2023-07-21 16:21:39 +00:00
syntax = "proto3" ;
2023-09-22 16:51:15 +00:00
package hashicorp . consul.mesh.v2beta1 ;
2023-07-21 16:21:39 +00:00
2023-09-22 16:51:15 +00:00
import "pbmesh/v2beta1/pbproxystate/access_logs.proto" ;
import "pbmesh/v2beta1/pbproxystate/cluster.proto" ;
import "pbmesh/v2beta1/pbproxystate/endpoints.proto" ;
import "pbmesh/v2beta1/pbproxystate/escape_hatches.proto" ;
import "pbmesh/v2beta1/pbproxystate/listener.proto" ;
import "pbmesh/v2beta1/pbproxystate/references.proto" ;
import "pbmesh/v2beta1/pbproxystate/route.proto" ;
import "pbmesh/v2beta1/pbproxystate/transport_socket.proto" ;
2023-09-21 21:18:47 +00:00
import "pbresource/annotations.proto" ;
2023-07-21 16:21:39 +00:00
import "pbresource/resource.proto" ;
message ProxyStateTemplate {
2023-09-21 21:18:47 +00:00
option ( hashicorp.consul.resource.spec ) = { scope : SCOPE_NAMESPACE } ;
2023-10-13 14:55:58 +00:00
// ProxyState is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored.
2023-07-21 16:21:39 +00:00
ProxyState proxy_state = 1 ;
2023-10-13 14:55:58 +00:00
// RequiredEndpoints is a map of arbitrary string names to endpoint refs that need fetching by the proxy state controller.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.EndpointRef > required_endpoints = 2 ;
2023-07-21 16:21:39 +00:00
2023-10-13 14:55:58 +00:00
// RequiredLeafCertificates is a map of arbitrary string names to leaf certificates that need fetching/generation by the proxy state controller.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.LeafCertificateRef > required_leaf_certificates = 3 ;
2023-07-21 16:21:39 +00:00
2023-10-13 14:55:58 +00:00
// RequiredTrustBundles is a map of arbitrary string names to trust bundle refs that need fetching by the proxy state controller.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.TrustBundleRef > required_trust_bundles = 4 ;
2023-07-21 16:21:39 +00:00
}
message ProxyState {
2023-10-13 14:55:58 +00:00
// Identity is a reference to the identity of the workload this proxy is for.
2023-08-01 17:35:17 +00:00
hashicorp.consul.resource.Reference identity = 1 ;
2023-10-13 14:55:58 +00:00
// Listeners is a list of listeners for this proxy.
2023-08-01 17:35:17 +00:00
repeated pbproxystate.Listener listeners = 2 ;
2023-10-13 14:55:58 +00:00
// Clusters is a map from cluster name to clusters. The keys are referenced from listeners or routes.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.Cluster > clusters = 3 ;
2023-10-13 14:55:58 +00:00
// Routes is a map from route name to routes. The keys are referenced from listeners.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.Route > routes = 4 ;
2023-10-13 14:55:58 +00:00
// Endpoints is a map from cluster name to endpoints.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.Endpoints > endpoints = 5 ;
2023-10-13 14:55:58 +00:00
// LeafCertificates is a map from UUID to leaf certificates.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.LeafCertificate > leaf_certificates = 6 ;
2023-10-13 14:55:58 +00:00
// TrustBundles is a map from peer name to trust bundles.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.TrustBundle > trust_bundles = 7 ;
2023-10-13 14:55:58 +00:00
// TLS has TLS configuration for this proxy.
2023-08-01 17:35:17 +00:00
pbproxystate.TLS tls = 8 ;
2023-10-13 14:55:58 +00:00
// Escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration.
2023-10-04 13:58:28 +00:00
pbproxystate.EscapeHatches escape = 9 ;
2023-10-13 14:55:58 +00:00
// AccessLogs configures access logging for this proxy.
2023-10-04 13:58:28 +00:00
pbproxystate.AccessLogs access_logs = 10 ;
2023-07-21 16:21:39 +00:00
}