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" ;
package hashicorp . consul.mesh.v1alpha1 ;
2023-08-01 17:35:17 +00:00
import "pbmesh/v1alpha1/pbproxystate/access_logs.proto" ;
import "pbmesh/v1alpha1/pbproxystate/cluster.proto" ;
import "pbmesh/v1alpha1/pbproxystate/endpoints.proto" ;
import "pbmesh/v1alpha1/pbproxystate/escape_hatches.proto" ;
import "pbmesh/v1alpha1/pbproxystate/listener.proto" ;
import "pbmesh/v1alpha1/pbproxystate/references.proto" ;
import "pbmesh/v1alpha1/pbproxystate/route.proto" ;
import "pbmesh/v1alpha1/pbproxystate/transport_socket.proto" ;
2023-07-21 16:21:39 +00:00
import "pbresource/resource.proto" ;
message ProxyStateTemplate {
// proxy_state is the partially filled out ProxyState resource. The Endpoints, LeafCertificates and TrustBundles fields will need filling in after the resource is stored.
ProxyState proxy_state = 1 ;
// required_endpoints 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
// required_leaf_certificates 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
// required_trust_bundles 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-08-17 21:04:53 +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-07-21 16:21:39 +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-07-21 16:21:39 +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-07-21 16:21:39 +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-07-21 16:21:39 +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-07-21 16:21:39 +00:00
// leaf certificates is a map from UUID to leaf certificates.
2023-08-01 17:35:17 +00:00
map < string , pbproxystate.LeafCertificate > leaf_certificates = 6 ;
2023-07-21 16:21:39 +00:00
// trust bundles 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-07-21 16:21:39 +00:00
// tls has TLS configuration for this proxy.
2023-08-01 17:35:17 +00:00
pbproxystate.TLS tls = 8 ;
2023-07-21 16:21:39 +00:00
// intention_default_allow is the default action for intentions. This determines how the Envoy RBAC filters are generated.
bool intention_default_allow = 9 ;
// escape defines top level escape hatches. These are user configured json strings that configure an entire piece of listener or cluster Envoy configuration.
2023-08-01 17:35:17 +00:00
pbproxystate.EscapeHatches escape = 10 ;
2023-07-21 16:21:39 +00:00
// access_logs configures access logging for this proxy.
2023-08-01 17:35:17 +00:00
pbproxystate.AccessLogs access_logs = 11 ;
2023-07-21 16:21:39 +00:00
}