consul.proto

Package: consul.options.gloo.solo.io

Types:

Source File: github.com/solo-io/gloo/projects/gloo/api/v1/options/consul/consul.proto

UpstreamSpec

Upstream Spec for Consul Upstreams consul Upstreams represent a set of one or more addressable pods for a consul Service the Gloo consul Upstream maps to a single service port. Because consul Services support multiple ports, Gloo requires that a different upstream be created for each port consul Upstreams are typically generated automatically by Gloo from the consul API

"serviceName": string
"serviceTags": []string
"subsetTags": []string
"instanceTags": []string
"instanceBlacklistTags": []string
"serviceSpec": .options.gloo.solo.io.ServiceSpec
"consistencyMode": .consul.options.gloo.solo.io.UpstreamSpec.ConsulConsistencyModes
"connectEnabled": bool
"dataCenters": []string

Field Type Description
serviceName string The name of the Consul Service.
serviceTags []string Deprecated: This field was renamed to subset_tags. If subset_tags is used, this field is ignored. Otherwise, the behavior is the same as subset_tags field below.
subsetTags []string Gloo will segment instances based off of these tags. This allows you to set routes that route to a subset of the instances of the service.
instanceTags []string The list of service tags Gloo should search for on a service instance before deciding whether or not to include the instance as part of this upstream. Empty list means that all service instances with the same service name will be included. When not empty, only service instances that match all of the tags (subset match) will be selected for this upstream.
instanceBlacklistTags []string The opposite of instanceTags, this is a list of service tags that gloo should ensure are not in a service instance before including it in an upstream.
serviceSpec .options.gloo.solo.io.ServiceSpec An optional Service Spec describing the service listening at this address.
consistencyMode .consul.options.gloo.solo.io.UpstreamSpec.ConsulConsistencyModes Sets the consistency mode. The default is the ConsistentMode.
connectEnabled bool Is this consul service connect enabled.
dataCenters []string The data centers in which the service instance represented by this upstream is registered.

ConsulConsistencyModes

These are the same consistency modes offered by Consul. For more information please review https://www.consul.io/api-docs/features/consistency. For more information please review https://pkg.go.dev/github.com/hashicorp/consul/api#QueryOptions.

Name Description
ConsistentMode This is strongly consistent. Sets the RequireConsistent in the consul api to true.
DefaultMode This will set (clears) both the AllowStale and the RequireConsistent in the consul api to false.
StaleMode Allows stale reads when set. This will set the AllowStale in the consul api.