oss portion of ent #1069 (#10883)

This commit is contained in:
Dhia Ayachi 2021-08-20 12:57:45 -04:00 committed by GitHub
parent c42ea82883
commit 1950ebbe1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 227 additions and 109 deletions

View File

@ -635,7 +635,7 @@ func TestAgent_Service(t *testing.T) {
req, _ := http.NewRequest("GET", tt.url, nil) req, _ := http.NewRequest("GET", tt.url, nil)
// Inject the root token for tests that don't care about ACL // Inject the root token for tests that don't care about ACL
var token = "root" token := "root"
if tt.tokenRules != "" { if tt.tokenRules != "" {
// Create new token and use that. // Create new token and use that.
token = testCreateToken(t, a, tt.tokenRules) token = testCreateToken(t, a, tt.tokenRules)
@ -2131,7 +2131,6 @@ func TestAgent_ForceLeave(t *testing.T) {
r.Fatalf("got status %q want %q", got, want) r.Fatalf("got status %q want %q", got, want)
} }
}) })
} }
func TestOpenMetricsMimeTypeHeaders(t *testing.T) { func TestOpenMetricsMimeTypeHeaders(t *testing.T) {
@ -2185,7 +2184,7 @@ func TestAgent_ForceLeave_ACLDeny(t *testing.T) {
t.Run("operator write token", func(t *testing.T) { t.Run("operator write token", func(t *testing.T) {
// Create an ACL with operator read permissions. // Create an ACL with operator read permissions.
var rules = ` rules := `
operator = "write" operator = "write"
` `
opToken := testCreateToken(t, a, rules) opToken := testCreateToken(t, a, rules)
@ -2226,7 +2225,6 @@ func TestAgent_ForceLeavePrune(t *testing.T) {
if member.Status != serf.StatusFailed { if member.Status != serf.StatusFailed {
r.Fatalf("got status %q want %q", member.Status, serf.StatusFailed) r.Fatalf("got status %q want %q", member.Status, serf.StatusFailed)
} }
} }
} }
}) })
@ -2246,7 +2244,6 @@ func TestAgent_ForceLeavePrune(t *testing.T) {
r.Fatalf("want one member, got %v", m) r.Fatalf("want one member, got %v", m)
} }
}) })
} }
func TestAgent_RegisterCheck(t *testing.T) { func TestAgent_RegisterCheck(t *testing.T) {
@ -2646,7 +2643,6 @@ func TestAgent_RegisterCheck_ACLDeny(t *testing.T) {
require.NoError(r, err) require.NoError(r, err)
}) })
}) })
} }
func TestAgent_DeregisterCheck(t *testing.T) { func TestAgent_DeregisterCheck(t *testing.T) {
@ -3335,6 +3331,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) {
{ {
"destination_type": "service", "destination_type": "service",
"destination_namespace": "default", "destination_namespace": "default",
"destination_partition": "default",
"destination_name": "db", "destination_name": "db",
"local_bind_address": "` + tt.ip + `", "local_bind_address": "` + tt.ip + `",
"local_bind_port": 1234, "local_bind_port": 1234,
@ -3363,6 +3360,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) {
{ {
"destination_type": "service", "destination_type": "service",
"destination_namespace": "default", "destination_namespace": "default",
"destination_partition": "default",
"destination_name": "db", "destination_name": "db",
"local_bind_address": "` + tt.ip + `", "local_bind_address": "` + tt.ip + `",
"local_bind_port": 1234, "local_bind_port": 1234,
@ -3420,6 +3418,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) {
DestinationType: structs.UpstreamDestTypeService, DestinationType: structs.UpstreamDestTypeService,
DestinationName: "db", DestinationName: "db",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindAddress: tt.ip, LocalBindAddress: tt.ip,
LocalBindPort: 1234, LocalBindPort: 1234,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -3463,6 +3462,7 @@ func testAgent_RegisterService_TranslateKeys(t *testing.T, extraHCL string) {
DestinationType: structs.UpstreamDestTypeService, DestinationType: structs.UpstreamDestTypeService,
DestinationName: "db", DestinationName: "db",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindAddress: tt.ip, LocalBindAddress: tt.ip,
LocalBindPort: 1234, LocalBindPort: 1234,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -3662,6 +3662,10 @@ func testAgent_RegisterService_UnmanagedConnectProxy(t *testing.T, extraHCL stri
args.Proxy.Upstreams[i].DestinationNamespace = args.Proxy.Upstreams[i].DestinationNamespace =
structs.DefaultEnterpriseMetaInDefaultPartition().NamespaceOrEmpty() structs.DefaultEnterpriseMetaInDefaultPartition().NamespaceOrEmpty()
} }
if args.Proxy.Upstreams[i].DestinationPartition == "" {
args.Proxy.Upstreams[i].DestinationPartition =
structs.DefaultEnterpriseMetaInDefaultPartition().PartitionOrEmpty()
}
} }
require.Equal(t, args.Proxy, svc.Proxy.ToAPI()) require.Equal(t, args.Proxy, svc.Proxy.ToAPI())

View File

@ -366,7 +366,7 @@ func (b *builder) build() (rt RuntimeConfig, err error) {
// process/merge some complex values // process/merge some complex values
// //
var dnsServiceTTL = map[string]time.Duration{} dnsServiceTTL := map[string]time.Duration{}
for k, v := range c.DNS.ServiceTTL { for k, v := range c.DNS.ServiceTTL {
dnsServiceTTL[k] = b.durationVal(fmt.Sprintf("dns_config.service_ttl[%q]", k), &v) dnsServiceTTL[k] = b.durationVal(fmt.Sprintf("dns_config.service_ttl[%q]", k), &v)
} }
@ -1181,10 +1181,9 @@ func validateBasicName(field, value string, allowEmpty bool) error {
// validate performs semantic validation of the runtime configuration. // validate performs semantic validation of the runtime configuration.
func (b *builder) validate(rt RuntimeConfig) error { func (b *builder) validate(rt RuntimeConfig) error {
// validContentPath defines a regexp for a valid content path name. // validContentPath defines a regexp for a valid content path name.
var validContentPath = regexp.MustCompile(`^[A-Za-z0-9/_-]+$`) validContentPath := regexp.MustCompile(`^[A-Za-z0-9/_-]+$`)
var hasVersion = regexp.MustCompile(`^/v\d+/$`) hasVersion := regexp.MustCompile(`^/v\d+/$`)
// ---------------------------------------------------------------- // ----------------------------------------------------------------
// check required params we cannot recover from first // check required params we cannot recover from first
// //
@ -1651,7 +1650,6 @@ func (b *builder) serviceVal(v *ServiceDefinition) *structs.ServiceDefinition {
b.err = multierror.Append( b.err = multierror.Append(
fmt.Errorf("service %s cannot have both socket path %s and address/port", fmt.Errorf("service %s cannot have both socket path %s and address/port",
stringVal(v.Name), stringVal(v.SocketPath)), b.err) stringVal(v.Name), stringVal(v.SocketPath)), b.err)
} }
return &structs.ServiceDefinition{ return &structs.ServiceDefinition{
@ -1718,6 +1716,7 @@ func (b *builder) upstreamsVal(v []Upstream) structs.Upstreams {
ups[i] = structs.Upstream{ ups[i] = structs.Upstream{
DestinationType: stringVal(u.DestinationType), DestinationType: stringVal(u.DestinationType),
DestinationNamespace: stringVal(u.DestinationNamespace), DestinationNamespace: stringVal(u.DestinationNamespace),
DestinationPartition: stringVal(u.DestinationPartition),
DestinationName: stringVal(u.DestinationName), DestinationName: stringVal(u.DestinationName),
Datacenter: stringVal(u.Datacenter), Datacenter: stringVal(u.Datacenter),
LocalBindAddress: stringVal(u.LocalBindAddress), LocalBindAddress: stringVal(u.LocalBindAddress),
@ -2369,7 +2368,6 @@ func validateAutoConfigAuthorizer(rt RuntimeConfig) error {
// build out the validator to ensure that the given configuration was valid // build out the validator to ensure that the given configuration was valid
null := hclog.NewNullLogger() null := hclog.NewNullLogger()
validator, err := ssoauth.NewValidator(null, &authz.AuthMethod) validator, err := ssoauth.NewValidator(null, &authz.AuthMethod)
if err != nil { if err != nil {
return fmt.Errorf("auto_config.authorization.static has invalid configuration: %v", err) return fmt.Errorf("auto_config.authorization.static has invalid configuration: %v", err)
} }

View File

@ -511,6 +511,7 @@ type Upstream struct {
// on service definitions in various places. // on service definitions in various places.
DestinationType *string `mapstructure:"destination_type"` DestinationType *string `mapstructure:"destination_type"`
DestinationNamespace *string `mapstructure:"destination_namespace"` DestinationNamespace *string `mapstructure:"destination_namespace"`
DestinationPartition *string `mapstructure:"destination_partition"`
DestinationName *string `mapstructure:"destination_name"` DestinationName *string `mapstructure:"destination_name"`
// Datacenter that the service discovery request should be run against. Note // Datacenter that the service discovery request should be run against. Note

View File

@ -5656,6 +5656,7 @@ func TestLoad_FullConfig(t *testing.T) {
{ {
DestinationType: "service", // Default should be explicitly filled DestinationType: "service", // Default should be explicitly filled
DestinationName: "KPtAj2cb", DestinationName: "KPtAj2cb",
DestinationPartition: defaultEntMeta.PartitionOrEmpty(),
DestinationNamespace: defaultEntMeta.NamespaceOrEmpty(), DestinationNamespace: defaultEntMeta.NamespaceOrEmpty(),
LocalBindPort: 4051, LocalBindPort: 4051,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -5665,6 +5666,7 @@ func TestLoad_FullConfig(t *testing.T) {
{ {
DestinationType: "prepared_query", DestinationType: "prepared_query",
DestinationNamespace: "9nakw0td", DestinationNamespace: "9nakw0td",
DestinationPartition: "part-9nakw0td",
DestinationName: "KSd8HsRl", DestinationName: "KSd8HsRl",
LocalBindPort: 11884, LocalBindPort: 11884,
LocalBindAddress: "127.24.88.0", LocalBindAddress: "127.24.88.0",
@ -5672,6 +5674,7 @@ func TestLoad_FullConfig(t *testing.T) {
{ {
DestinationType: "prepared_query", DestinationType: "prepared_query",
DestinationNamespace: "9nakw0td", DestinationNamespace: "9nakw0td",
DestinationPartition: "part-9nakw0td",
DestinationName: "placeholder", DestinationName: "placeholder",
LocalBindSocketPath: "/foo/bar/upstream", LocalBindSocketPath: "/foo/bar/upstream",
LocalBindSocketMode: "0600", LocalBindSocketMode: "0600",

View File

@ -576,6 +576,7 @@ services = [
{ {
destination_type = "prepared_query" destination_type = "prepared_query"
destination_namespace = "9nakw0td" destination_namespace = "9nakw0td"
destination_partition = "part-9nakw0td"
destination_name = "KSd8HsRl" destination_name = "KSd8HsRl"
local_bind_port = 11884 local_bind_port = 11884
local_bind_address = "127.24.88.0" local_bind_address = "127.24.88.0"
@ -583,6 +584,7 @@ services = [
{ {
destination_type = "prepared_query" destination_type = "prepared_query"
destination_namespace = "9nakw0td" destination_namespace = "9nakw0td"
destination_partition = "part-9nakw0td"
destination_name = "placeholder" destination_name = "placeholder"
local_bind_socket_path = "/foo/bar/upstream" local_bind_socket_path = "/foo/bar/upstream"
local_bind_socket_mode = "0600" local_bind_socket_mode = "0600"

View File

@ -589,6 +589,7 @@
{ {
"destination_name": "KSd8HsRl", "destination_name": "KSd8HsRl",
"destination_namespace": "9nakw0td", "destination_namespace": "9nakw0td",
"destination_partition": "part-9nakw0td",
"destination_type": "prepared_query", "destination_type": "prepared_query",
"local_bind_address": "127.24.88.0", "local_bind_address": "127.24.88.0",
"local_bind_port": 11884 "local_bind_port": 11884
@ -596,6 +597,7 @@
{ {
"destination_name": "placeholder", "destination_name": "placeholder",
"destination_namespace": "9nakw0td", "destination_namespace": "9nakw0td",
"destination_partition": "part-9nakw0td",
"destination_type": "prepared_query", "destination_type": "prepared_query",
"local_bind_socket_path": "/foo/bar/upstream", "local_bind_socket_path": "/foo/bar/upstream",
"local_bind_socket_mode": "0600" "local_bind_socket_mode": "0600"

View File

@ -55,6 +55,7 @@ func (c *DiscoveryChain) Get(args *structs.DiscoveryChainRequest, reply *structs
req := discoverychain.CompileRequest{ req := discoverychain.CompileRequest{
ServiceName: args.Name, ServiceName: args.Name,
EvaluateInNamespace: entMeta.NamespaceOrDefault(), EvaluateInNamespace: entMeta.NamespaceOrDefault(),
EvaluateInPartition: entMeta.PartitionOrDefault(),
EvaluateInDatacenter: evalDC, EvaluateInDatacenter: evalDC,
UseInDatacenter: c.srv.config.Datacenter, UseInDatacenter: c.srv.config.Datacenter,
OverrideMeshGateway: args.OverrideMeshGateway, OverrideMeshGateway: args.OverrideMeshGateway,

View File

@ -15,6 +15,7 @@ import (
type CompileRequest struct { type CompileRequest struct {
ServiceName string ServiceName string
EvaluateInNamespace string EvaluateInNamespace string
EvaluateInPartition string
EvaluateInDatacenter string EvaluateInDatacenter string
EvaluateInTrustDomain string EvaluateInTrustDomain string
UseInDatacenter string // where the results will be used from UseInDatacenter string // where the results will be used from
@ -906,11 +907,9 @@ RESOLVE_AGAIN:
// TODO (mesh-gateway)- maybe allow using a gateway within a datacenter at some point // TODO (mesh-gateway)- maybe allow using a gateway within a datacenter at some point
if target.Datacenter == c.useInDatacenter { if target.Datacenter == c.useInDatacenter {
target.MeshGateway.Mode = structs.MeshGatewayModeDefault target.MeshGateway.Mode = structs.MeshGatewayModeDefault
} else if target.External { } else if target.External {
// Bypass mesh gateways if it is an external service. // Bypass mesh gateways if it is an external service.
target.MeshGateway.Mode = structs.MeshGatewayModeDefault target.MeshGateway.Mode = structs.MeshGatewayModeDefault
} else { } else {
// Default mesh gateway settings // Default mesh gateway settings
if serviceDefault := c.entries.GetService(targetID); serviceDefault != nil { if serviceDefault := c.entries.GetService(targetID); serviceDefault != nil {

View File

@ -162,6 +162,7 @@ func (s *handlerConnectProxy) initialize(ctx context.Context) (ConfigSnapshot, e
case structs.UpstreamDestTypeService: case structs.UpstreamDestTypeService:
fallthrough fallthrough
// TODO (partition): pass Partition to DiscoveryChainRequest?
case "": // Treat unset as the default Service type case "": // Treat unset as the default Service type
err = s.cache.Notify(ctx, cachetype.CompiledDiscoveryChainName, &structs.DiscoveryChainRequest{ err = s.cache.Notify(ctx, cachetype.CompiledDiscoveryChainName, &structs.DiscoveryChainRequest{
Datacenter: s.source.Datacenter, Datacenter: s.source.Datacenter,

View File

@ -103,6 +103,7 @@ func (s *handlerIngressGateway) handleUpdate(ctx context.Context, u cache.Update
id: u.Identifier(), id: u.Identifier(),
name: u.DestinationName, name: u.DestinationName,
namespace: u.DestinationNamespace, namespace: u.DestinationNamespace,
partition: u.DestinationPartition,
datacenter: s.source.Datacenter, datacenter: s.source.Datacenter,
} }
up := &handlerUpstreams{handlerState: s.handlerState} up := &handlerUpstreams{handlerState: s.handlerState}
@ -146,6 +147,7 @@ func makeUpstream(g *structs.GatewayService) structs.Upstream {
upstream := structs.Upstream{ upstream := structs.Upstream{
DestinationName: g.Service.Name, DestinationName: g.Service.Name,
DestinationNamespace: g.Service.NamespaceOrDefault(), DestinationNamespace: g.Service.NamespaceOrDefault(),
DestinationPartition: g.Gateway.PartitionOrDefault(),
LocalBindPort: g.Port, LocalBindPort: g.Port,
IngressHosts: g.Hosts, IngressHosts: g.Hosts,
// Pass the protocol that was configured on the ingress listener in order // Pass the protocol that was configured on the ingress listener in order

View File

@ -969,6 +969,7 @@ func TestState_WatchesAndUpdates(t *testing.T) {
require.Equal(t, snap.IngressGateway.Upstreams[key], structs.Upstreams{ require.Equal(t, snap.IngressGateway.Upstreams[key], structs.Upstreams{
{ {
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "api", DestinationName: "api",
LocalBindPort: 9999, LocalBindPort: 9999,
Config: map[string]interface{}{ Config: map[string]interface{}{

View File

@ -345,6 +345,7 @@ type discoveryChainWatchOpts struct {
id string id string
name string name string
namespace string namespace string
partition string
datacenter string datacenter string
cfg reducedUpstreamConfig cfg reducedUpstreamConfig
meshGateway structs.MeshGatewayConfig meshGateway structs.MeshGatewayConfig

View File

@ -398,6 +398,7 @@ func mergeServiceConfig(defaults *structs.ServiceConfigResponse, service *struct
remoteUpstreams[us.Upstream] = structs.Upstream{ remoteUpstreams[us.Upstream] = structs.Upstream{
DestinationNamespace: us.Upstream.NamespaceOrDefault(), DestinationNamespace: us.Upstream.NamespaceOrDefault(),
DestinationPartition: us.Upstream.PartitionOrDefault(),
DestinationName: us.Upstream.ID, DestinationName: us.Upstream.ID,
Config: us.Config, Config: us.Config,
MeshGateway: parsed.MeshGateway, MeshGateway: parsed.MeshGateway,

View File

@ -117,6 +117,7 @@ func TestServiceManager_RegisterSidecar(t *testing.T) {
{ {
DestinationName: "redis", DestinationName: "redis",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindPort: 5000, LocalBindPort: 5000,
}, },
}, },
@ -147,6 +148,7 @@ func TestServiceManager_RegisterSidecar(t *testing.T) {
{ {
DestinationName: "redis", DestinationName: "redis",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindPort: 5000, LocalBindPort: 5000,
Config: map[string]interface{}{ Config: map[string]interface{}{
"protocol": "tcp", "protocol": "tcp",
@ -348,6 +350,7 @@ func TestServiceManager_PersistService_API(t *testing.T) {
{ {
DestinationName: "redis", DestinationName: "redis",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindPort: 5000, LocalBindPort: 5000,
}, },
}, },
@ -375,6 +378,7 @@ func TestServiceManager_PersistService_API(t *testing.T) {
{ {
DestinationName: "redis", DestinationName: "redis",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindPort: 5000, LocalBindPort: 5000,
Config: map[string]interface{}{ Config: map[string]interface{}{
"protocol": "tcp", "protocol": "tcp",
@ -567,6 +571,7 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) {
upstreams = [{ upstreams = [{
destination_name = "redis" destination_name = "redis"
destination_namespace = "default" destination_namespace = "default"
destination_partition = "default"
local_bind_port = 5000 local_bind_port = 5000
}] }]
} }
@ -612,6 +617,7 @@ func TestServiceManager_PersistService_ConfigFiles(t *testing.T) {
DestinationType: "service", DestinationType: "service",
DestinationName: "redis", DestinationName: "redis",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
LocalBindPort: 5000, LocalBindPort: 5000,
Config: map[string]interface{}{ Config: map[string]interface{}{
"protocol": "tcp", "protocol": "tcp",
@ -909,6 +915,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
}, },
}, },
@ -924,6 +931,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
Config: map[string]interface{}{ Config: map[string]interface{}{
"passive_health_check": map[string]interface{}{ "passive_health_check": map[string]interface{}{
@ -970,6 +978,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zip", DestinationName: "zip",
LocalBindPort: 8080, LocalBindPort: 8080,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -994,6 +1003,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zip", DestinationName: "zip",
LocalBindPort: 8080, LocalBindPort: 8080,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -1002,6 +1012,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
}, },
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
Config: map[string]interface{}{ Config: map[string]interface{}{
"protocol": "grpc", "protocol": "grpc",
@ -1038,6 +1049,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zip", DestinationName: "zip",
LocalBindPort: 8080, LocalBindPort: 8080,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -1058,6 +1070,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zip", DestinationName: "zip",
LocalBindPort: 8080, LocalBindPort: 8080,
Config: map[string]interface{}{ Config: map[string]interface{}{
@ -1098,6 +1111,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
}, },
}, },
@ -1116,6 +1130,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
Config: map[string]interface{}{}, Config: map[string]interface{}{},
MeshGateway: structs.MeshGatewayConfig{ MeshGateway: structs.MeshGatewayConfig{
@ -1156,6 +1171,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
MeshGateway: structs.MeshGatewayConfig{ MeshGateway: structs.MeshGatewayConfig{
Mode: structs.MeshGatewayModeNone, Mode: structs.MeshGatewayModeNone,
@ -1177,6 +1193,7 @@ func Test_mergeServiceConfig_UpstreamOverrides(t *testing.T) {
Upstreams: structs.Upstreams{ Upstreams: structs.Upstreams{
structs.Upstream{ structs.Upstream{
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationName: "zap", DestinationName: "zap",
Config: map[string]interface{}{}, Config: map[string]interface{}{},
MeshGateway: structs.MeshGatewayConfig{ MeshGateway: structs.MeshGatewayConfig{

View File

@ -1343,6 +1343,7 @@ type DiscoveryChainRequest struct {
Name string Name string
EvaluateInDatacenter string EvaluateInDatacenter string
EvaluateInNamespace string EvaluateInNamespace string
EvaluateInPartition string
// NOTE: Partition is not represented here by design. Do not add it. // NOTE: Partition is not represented here by design. Do not add it.
@ -1386,6 +1387,7 @@ func (r *DiscoveryChainRequest) CacheInfo() cache.RequestInfo {
Name string Name string
EvaluateInDatacenter string EvaluateInDatacenter string
EvaluateInNamespace string EvaluateInNamespace string
EvaluateInPartition string
OverrideMeshGateway MeshGatewayConfig OverrideMeshGateway MeshGatewayConfig
OverrideProtocol string OverrideProtocol string
OverrideConnectTimeout time.Duration OverrideConnectTimeout time.Duration
@ -1394,6 +1396,7 @@ func (r *DiscoveryChainRequest) CacheInfo() cache.RequestInfo {
Name: r.Name, Name: r.Name,
EvaluateInDatacenter: r.EvaluateInDatacenter, EvaluateInDatacenter: r.EvaluateInDatacenter,
EvaluateInNamespace: r.EvaluateInNamespace, EvaluateInNamespace: r.EvaluateInNamespace,
EvaluateInPartition: r.EvaluateInPartition,
OverrideMeshGateway: r.OverrideMeshGateway, OverrideMeshGateway: r.OverrideMeshGateway,
OverrideProtocol: r.OverrideProtocol, OverrideProtocol: r.OverrideProtocol,
OverrideConnectTimeout: r.OverrideConnectTimeout, OverrideConnectTimeout: r.OverrideConnectTimeout,

View File

@ -246,7 +246,6 @@ func (t *ConnectProxyConfig) UnmarshalJSON(data []byte) (err error) {
} }
return nil return nil
} }
func (c *ConnectProxyConfig) MarshalJSON() ([]byte, error) { func (c *ConnectProxyConfig) MarshalJSON() ([]byte, error) {
@ -343,6 +342,7 @@ type Upstream struct {
// on service definitions in various places. // on service definitions in various places.
DestinationType string `alias:"destination_type"` DestinationType string `alias:"destination_type"`
DestinationNamespace string `json:",omitempty" alias:"destination_namespace"` DestinationNamespace string `json:",omitempty" alias:"destination_namespace"`
DestinationPartition string `json:",omitempty" alias:"destination_partition"`
DestinationName string `alias:"destination_name"` DestinationName string `alias:"destination_name"`
// Datacenter that the service discovery request should be run against. Note // Datacenter that the service discovery request should be run against. Note
@ -385,6 +385,7 @@ func (t *Upstream) UnmarshalJSON(data []byte) (err error) {
type Alias Upstream type Alias Upstream
aux := &struct { aux := &struct {
DestinationTypeSnake string `json:"destination_type"` DestinationTypeSnake string `json:"destination_type"`
DestinationPartitionSnake string `json:"destination_partition"`
DestinationNamespaceSnake string `json:"destination_namespace"` DestinationNamespaceSnake string `json:"destination_namespace"`
DestinationNameSnake string `json:"destination_name"` DestinationNameSnake string `json:"destination_name"`
@ -409,6 +410,9 @@ func (t *Upstream) UnmarshalJSON(data []byte) (err error) {
if t.DestinationNamespace == "" { if t.DestinationNamespace == "" {
t.DestinationNamespace = aux.DestinationNamespaceSnake t.DestinationNamespace = aux.DestinationNamespaceSnake
} }
if t.DestinationPartition == "" {
t.DestinationPartition = aux.DestinationPartitionSnake
}
if t.DestinationName == "" { if t.DestinationName == "" {
t.DestinationName = aux.DestinationNameSnake t.DestinationName = aux.DestinationNameSnake
} }
@ -465,6 +469,7 @@ func (u *Upstream) ToAPI() api.Upstream {
return api.Upstream{ return api.Upstream{
DestinationType: api.UpstreamDestType(u.DestinationType), DestinationType: api.UpstreamDestType(u.DestinationType),
DestinationNamespace: u.DestinationNamespace, DestinationNamespace: u.DestinationNamespace,
DestinationPartition: u.DestinationPartition,
DestinationName: u.DestinationName, DestinationName: u.DestinationName,
Datacenter: u.Datacenter, Datacenter: u.Datacenter,
LocalBindAddress: u.LocalBindAddress, LocalBindAddress: u.LocalBindAddress,
@ -485,6 +490,7 @@ func (u *Upstream) ToAPI() api.Upstream {
func (u *Upstream) ToKey() UpstreamKey { func (u *Upstream) ToKey() UpstreamKey {
return UpstreamKey{ return UpstreamKey{
DestinationType: u.DestinationType, DestinationType: u.DestinationType,
DestinationPartition: u.DestinationPartition,
DestinationNamespace: u.DestinationNamespace, DestinationNamespace: u.DestinationNamespace,
DestinationName: u.DestinationName, DestinationName: u.DestinationName,
Datacenter: u.Datacenter, Datacenter: u.Datacenter,
@ -514,15 +520,17 @@ func (u Upstream) UpstreamAddressToString() string {
type UpstreamKey struct { type UpstreamKey struct {
DestinationType string DestinationType string
DestinationName string DestinationName string
DestinationPartition string
DestinationNamespace string DestinationNamespace string
Datacenter string Datacenter string
} }
func (k UpstreamKey) String() string { func (k UpstreamKey) String() string {
return fmt.Sprintf( return fmt.Sprintf(
"[type=%q, name=%q, namespace=%q, datacenter=%q]", "[type=%q, name=%q, partition=%q, namespace=%q, datacenter=%q]",
k.DestinationType, k.DestinationType,
k.DestinationName, k.DestinationName,
k.DestinationPartition,
k.DestinationNamespace, k.DestinationNamespace,
k.Datacenter, k.Datacenter,
) )
@ -537,6 +545,7 @@ func (u *Upstream) String() string {
func UpstreamFromAPI(u api.Upstream) Upstream { func UpstreamFromAPI(u api.Upstream) Upstream {
return Upstream{ return Upstream{
DestinationType: string(u.DestinationType), DestinationType: string(u.DestinationType),
DestinationPartition: u.DestinationPartition,
DestinationNamespace: u.DestinationNamespace, DestinationNamespace: u.DestinationNamespace,
DestinationName: u.DestinationName, DestinationName: u.DestinationName,
Datacenter: u.Datacenter, Datacenter: u.Datacenter,

View File

@ -91,6 +91,9 @@ func (s *ServiceDefinition) NodeService() *NodeService {
if ns.Proxy.Upstreams[i].DestinationNamespace == "" { if ns.Proxy.Upstreams[i].DestinationNamespace == "" {
ns.Proxy.Upstreams[i].DestinationNamespace = ns.EnterpriseMeta.NamespaceOrEmpty() ns.Proxy.Upstreams[i].DestinationNamespace = ns.EnterpriseMeta.NamespaceOrEmpty()
} }
if ns.Proxy.Upstreams[i].DestinationPartition == "" {
ns.Proxy.Upstreams[i].DestinationPartition = ns.EnterpriseMeta.PartitionOrEmpty()
}
} }
ns.Proxy.Expose = s.Proxy.Expose ns.Proxy.Expose = s.Proxy.Expose
} }

View File

@ -161,6 +161,11 @@ var expectedFieldConfigUpstreams bexpr.FieldConfigurations = bexpr.FieldConfigur
CoerceFn: bexpr.CoerceString, CoerceFn: bexpr.CoerceString,
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches}, SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
}, },
"DestinationPartition": &bexpr.FieldConfiguration{
StructFieldName: "DestinationPartition",
CoerceFn: bexpr.CoerceString,
SupportedOperations: []bexpr.MatchOperator{bexpr.MatchEqual, bexpr.MatchNotEqual, bexpr.MatchIn, bexpr.MatchNotIn, bexpr.MatchMatches, bexpr.MatchNotMatches},
},
"DestinationName": &bexpr.FieldConfiguration{ "DestinationName": &bexpr.FieldConfiguration{
StructFieldName: "DestinationName", StructFieldName: "DestinationName",
CoerceFn: bexpr.CoerceString, CoerceFn: bexpr.CoerceString,

View File

@ -55,6 +55,9 @@ func TestAddDefaultsToUpstreams(t testing.T, upstreams []Upstream, entMeta Enter
if ups[i].DestinationNamespace == "" { if ups[i].DestinationNamespace == "" {
ups[i].DestinationNamespace = entMeta.NamespaceOrEmpty() ups[i].DestinationNamespace = entMeta.NamespaceOrEmpty()
} }
if ups[i].DestinationPartition == "" {
ups[i].DestinationPartition = entMeta.PartitionOrEmpty()
}
} }
return ups return ups
} }

View File

@ -537,11 +537,10 @@ func (s *ResourceGenerator) makeUpstreamClusterForPreparedQuery(upstream structs
spiffeID := connect.SpiffeIDService{ spiffeID := connect.SpiffeIDService{
Host: cfgSnap.Roots.TrustDomain, Host: cfgSnap.Roots.TrustDomain,
Partition: upstream.DestinationPartition,
Namespace: upstream.DestinationNamespace, Namespace: upstream.DestinationNamespace,
Datacenter: dc, Datacenter: dc,
Service: upstream.DestinationName, Service: upstream.DestinationName,
// TODO(partitions) Store partition
} }
// Enable TLS upstream with the configured client certificate. // Enable TLS upstream with the configured client certificate.

View File

@ -185,6 +185,7 @@ func (s *ResourceGenerator) listenersFromSnapshotConnectProxy(cfgSnap *proxycfg.
u := structs.Upstream{ u := structs.Upstream{
DestinationName: sn.Name, DestinationName: sn.Name,
DestinationNamespace: sn.NamespaceOrDefault(), DestinationNamespace: sn.NamespaceOrDefault(),
DestinationPartition: sn.PartitionOrDefault(),
} }
filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain( filterChain, err := s.makeUpstreamFilterChainForDiscoveryChain(
@ -738,9 +739,7 @@ func injectHTTPFilterOnFilterChains(
) )
} }
var ( var hcm envoy_http_v3.HttpConnectionManager
hcm envoy_http_v3.HttpConnectionManager
)
tc, ok := hcmFilter.ConfigType.(*envoy_listener_v3.Filter_TypedConfig) tc, ok := hcmFilter.ConfigType.(*envoy_listener_v3.Filter_TypedConfig)
if !ok { if !ok {
return fmt.Errorf( return fmt.Errorf(

View File

@ -410,7 +410,7 @@ type ConnectProxyConfig struct {
// Upstream is the response structure for a proxy upstream configuration. // Upstream is the response structure for a proxy upstream configuration.
type Upstream struct { type Upstream struct {
DestinationType UpstreamDestType `json:",omitempty"` DestinationType UpstreamDestType `json:",omitempty"`
// DestinationPartition string `json:",omitempty"` // TODO(partitions)? DestinationPartition string `json:",omitempty"`
DestinationNamespace string `json:",omitempty"` DestinationNamespace string `json:",omitempty"`
DestinationName string DestinationName string
Datacenter string `json:",omitempty"` Datacenter string `json:",omitempty"`
@ -1112,6 +1112,7 @@ func (a *Agent) Monitor(loglevel string, stopCh <-chan struct{}, q *QueryOptions
func (a *Agent) MonitorJSON(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) { func (a *Agent) MonitorJSON(loglevel string, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) {
return a.monitor(loglevel, true, stopCh, q) return a.monitor(loglevel, true, stopCh, q)
} }
func (a *Agent) monitor(loglevel string, logJSON bool, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) { func (a *Agent) monitor(loglevel string, logJSON bool, stopCh <-chan struct{}, q *QueryOptions) (chan string, error) {
r := a.c.newRequest("GET", "/v1/agent/monitor") r := a.c.newRequest("GET", "/v1/agent/monitor")
r.setQueryOptions(q) r.setQueryOptions(q)

View File

@ -106,6 +106,9 @@ func (uc *UpstreamConfig) applyDefaults() {
if uc.DestinationNamespace == "" { if uc.DestinationNamespace == "" {
uc.DestinationNamespace = "default" uc.DestinationNamespace = "default"
} }
if uc.DestinationPartition == "" {
uc.DestinationPartition = "default"
}
if uc.LocalBindAddress == "" && uc.LocalBindSocketPath == "" { if uc.LocalBindAddress == "" && uc.LocalBindSocketPath == "" {
uc.LocalBindAddress = "127.0.0.1" uc.LocalBindAddress = "127.0.0.1"
} }
@ -120,8 +123,8 @@ func (uc *UpstreamConfig) String() string {
"%s:%d", "%s:%d",
uc.LocalBindAddress, uc.LocalBindPort) uc.LocalBindAddress, uc.LocalBindPort)
} }
return fmt.Sprintf("%s->%s:%s/%s", addr, return fmt.Sprintf("%s->%s:%s/%s/%s", addr,
uc.DestinationType, uc.DestinationNamespace, uc.DestinationName) uc.DestinationType, uc.DestinationPartition, uc.DestinationNamespace, uc.DestinationName)
} }
// UpstreamResolverFuncFromClient returns a closure that captures a consul // UpstreamResolverFuncFromClient returns a closure that captures a consul
@ -140,6 +143,7 @@ func UpstreamResolverFuncFromClient(client *api.Client) func(cfg UpstreamConfig)
return &connect.ConsulResolver{ return &connect.ConsulResolver{
Client: client, Client: client,
Namespace: cfg.DestinationNamespace, Namespace: cfg.DestinationNamespace,
Partition: cfg.DestinationPartition,
Name: cfg.DestinationName, Name: cfg.DestinationName,
Type: typ, Type: typ,
Datacenter: cfg.Datacenter, Datacenter: cfg.Datacenter,

View File

@ -23,12 +23,14 @@ func TestUpstreamResolverFuncFromClient(t *testing.T) {
name: "service", name: "service",
cfg: UpstreamConfig{ cfg: UpstreamConfig{
DestinationNamespace: "foo", DestinationNamespace: "foo",
DestinationPartition: "default",
DestinationName: "web", DestinationName: "web",
Datacenter: "ny1", Datacenter: "ny1",
DestinationType: "service", DestinationType: "service",
}, },
want: &connect.ConsulResolver{ want: &connect.ConsulResolver{
Namespace: "foo", Namespace: "foo",
Partition: "default",
Name: "web", Name: "web",
Datacenter: "ny1", Datacenter: "ny1",
Type: connect.ConsulResolverTypeService, Type: connect.ConsulResolverTypeService,
@ -38,6 +40,7 @@ func TestUpstreamResolverFuncFromClient(t *testing.T) {
name: "prepared_query", name: "prepared_query",
cfg: UpstreamConfig{ cfg: UpstreamConfig{
DestinationNamespace: "foo", DestinationNamespace: "foo",
DestinationPartition: "default",
DestinationName: "web", DestinationName: "web",
Datacenter: "ny1", Datacenter: "ny1",
DestinationType: "prepared_query", DestinationType: "prepared_query",
@ -45,6 +48,7 @@ func TestUpstreamResolverFuncFromClient(t *testing.T) {
want: &connect.ConsulResolver{ want: &connect.ConsulResolver{
Namespace: "foo", Namespace: "foo",
Name: "web", Name: "web",
Partition: "default",
Datacenter: "ny1", Datacenter: "ny1",
Type: connect.ConsulResolverTypePreparedQuery, Type: connect.ConsulResolverTypePreparedQuery,
}, },
@ -53,11 +57,13 @@ func TestUpstreamResolverFuncFromClient(t *testing.T) {
name: "unknown behaves like service", name: "unknown behaves like service",
cfg: UpstreamConfig{ cfg: UpstreamConfig{
DestinationNamespace: "foo", DestinationNamespace: "foo",
DestinationPartition: "default",
DestinationName: "web", DestinationName: "web",
Datacenter: "ny1", Datacenter: "ny1",
DestinationType: "junk", DestinationType: "junk",
}, },
want: &connect.ConsulResolver{ want: &connect.ConsulResolver{
Partition: "default",
Namespace: "foo", Namespace: "foo",
Name: "web", Name: "web",
Datacenter: "ny1", Datacenter: "ny1",
@ -130,6 +136,7 @@ func TestAgentConfigWatcherSidecarProxy(t *testing.T) {
{ {
DestinationName: "db", DestinationName: "db",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationType: "service", DestinationType: "service",
LocalBindPort: 9191, LocalBindPort: 9191,
LocalBindAddress: "127.0.0.1", LocalBindAddress: "127.0.0.1",
@ -159,6 +166,7 @@ func TestAgentConfigWatcherSidecarProxy(t *testing.T) {
expectCfg.Upstreams = append(expectCfg.Upstreams, UpstreamConfig{ expectCfg.Upstreams = append(expectCfg.Upstreams, UpstreamConfig{
DestinationName: "cache", DestinationName: "cache",
DestinationNamespace: "default", DestinationNamespace: "default",
DestinationPartition: "default",
DestinationType: "service", DestinationType: "service",
LocalBindPort: 9292, LocalBindPort: 9292,
LocalBindAddress: "127.10.10.10", LocalBindAddress: "127.10.10.10",

View File

@ -66,6 +66,9 @@ type ConsulResolver struct {
// Namespace of the query target. // Namespace of the query target.
Namespace string Namespace string
// Partition of the query target.
Partition string
// Name of the query target. // Name of the query target.
Name string Name string

View File

@ -144,6 +144,7 @@ func UpstreamToStructs(s Upstream) structs.Upstream {
var t structs.Upstream var t structs.Upstream
t.DestinationType = s.DestinationType t.DestinationType = s.DestinationType
t.DestinationNamespace = s.DestinationNamespace t.DestinationNamespace = s.DestinationNamespace
t.DestinationPartition = s.DestinationPartition
t.DestinationName = s.DestinationName t.DestinationName = s.DestinationName
t.Datacenter = s.Datacenter t.Datacenter = s.Datacenter
t.LocalBindAddress = s.LocalBindAddress t.LocalBindAddress = s.LocalBindAddress
@ -159,6 +160,7 @@ func NewUpstreamFromStructs(t structs.Upstream) Upstream {
var s Upstream var s Upstream
s.DestinationType = t.DestinationType s.DestinationType = t.DestinationType
s.DestinationNamespace = t.DestinationNamespace s.DestinationNamespace = t.DestinationNamespace
s.DestinationPartition = t.DestinationPartition
s.DestinationName = t.DestinationName s.DestinationName = t.DestinationName
s.Datacenter = t.Datacenter s.Datacenter = t.Datacenter
s.LocalBindAddress = t.LocalBindAddress s.LocalBindAddress = t.LocalBindAddress

View File

@ -159,6 +159,7 @@ type Upstream struct {
// LocalBindSocketPath is the socket to create to connect to the upstream service // LocalBindSocketPath is the socket to create to connect to the upstream service
LocalBindSocketPath string `protobuf:"bytes,10,opt,name=LocalBindSocketPath,proto3" json:"LocalBindSocketPath,omitempty"` LocalBindSocketPath string `protobuf:"bytes,10,opt,name=LocalBindSocketPath,proto3" json:"LocalBindSocketPath,omitempty"`
LocalBindSocketMode string `protobuf:"bytes,11,opt,name=LocalBindSocketMode,proto3" json:"LocalBindSocketMode,omitempty"` LocalBindSocketMode string `protobuf:"bytes,11,opt,name=LocalBindSocketMode,proto3" json:"LocalBindSocketMode,omitempty"`
DestinationPartition string `protobuf:"bytes,12,opt,name=DestinationPartition,proto3" json:"DestinationPartition,omitempty"`
} }
func (m *Upstream) Reset() { *m = Upstream{} } func (m *Upstream) Reset() { *m = Upstream{} }
@ -619,82 +620,83 @@ func init() {
func init() { proto.RegisterFile("proto/pbservice/service.proto", fileDescriptor_cbb99233b75fb80b) } func init() { proto.RegisterFile("proto/pbservice/service.proto", fileDescriptor_cbb99233b75fb80b) }
var fileDescriptor_cbb99233b75fb80b = []byte{ var fileDescriptor_cbb99233b75fb80b = []byte{
// 1200 bytes of a gzipped FileDescriptorProto // 1212 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcf, 0x6e, 0x1b, 0xb7, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x96, 0xcd, 0x6e, 0x1b, 0x37,
0x13, 0xc7, 0xb5, 0xfa, 0x63, 0x49, 0xe3, 0xfc, 0x1c, 0x9b, 0xd1, 0xcf, 0xdd, 0xba, 0x89, 0xec, 0x10, 0xc7, 0xb5, 0xfa, 0xb0, 0x24, 0xda, 0xf5, 0x07, 0xad, 0xba, 0x5b, 0x37, 0x91, 0x1d, 0xa1,
0x08, 0x45, 0x60, 0xb4, 0x86, 0x94, 0xd8, 0x48, 0xdd, 0x04, 0x48, 0x81, 0xda, 0x72, 0x8b, 0x20, 0x08, 0x8c, 0xd6, 0x90, 0x12, 0x1b, 0xa9, 0x9b, 0x00, 0x29, 0x50, 0x5b, 0x6e, 0x11, 0x24, 0x4e,
0x71, 0xa2, 0xae, 0x55, 0x04, 0x2d, 0xd0, 0x03, 0xb5, 0xa2, 0x57, 0x0b, 0x4b, 0x4b, 0x61, 0x49, 0xd4, 0xb5, 0x8a, 0xa0, 0x05, 0x7a, 0xa0, 0x56, 0xf4, 0x6a, 0x61, 0x69, 0x29, 0x90, 0x94, 0x1b,
0xb9, 0xd1, 0x5b, 0xf4, 0xd6, 0x5e, 0x7b, 0xe8, 0xbd, 0x8f, 0xe1, 0x63, 0x8e, 0x3d, 0x19, 0xad, 0xb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, 0xf5, 0xaa, 0x9e, 0x7b, 0x7b, 0x55, 0xcf, 0xfd, 0x75, 0x55,
0x1a, 0x76, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x70, 0xa5, 0x21, 0xd2, 0x36, 0x0c, 0x00, 0x00, 0xcf, 0xfd, 0xf8, 0xf9, 0x6d, 0xcd, 0x21, 0xf1, 0x5f, 0xbf, 0x37, 0x07, 0x86, 0xdd, 0x7f, 0x03,
0x00, 0x00, 0xff, 0xff, 0x93, 0xfb, 0xcc, 0xfb, 0x6a, 0x0c, 0x00, 0x00,
} }
func (m *ConnectProxyConfig) Marshal() (dAtA []byte, err error) { func (m *ConnectProxyConfig) Marshal() (dAtA []byte, err error) {
@ -836,6 +838,13 @@ func (m *Upstream) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.DestinationPartition) > 0 {
i -= len(m.DestinationPartition)
copy(dAtA[i:], m.DestinationPartition)
i = encodeVarintService(dAtA, i, uint64(len(m.DestinationPartition)))
i--
dAtA[i] = 0x62
}
if len(m.LocalBindSocketMode) > 0 { if len(m.LocalBindSocketMode) > 0 {
i -= len(m.LocalBindSocketMode) i -= len(m.LocalBindSocketMode)
copy(dAtA[i:], m.LocalBindSocketMode) copy(dAtA[i:], m.LocalBindSocketMode)
@ -1523,6 +1532,10 @@ func (m *Upstream) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovService(uint64(l)) n += 1 + l + sovService(uint64(l))
} }
l = len(m.DestinationPartition)
if l > 0 {
n += 1 + l + sovService(uint64(l))
}
return n return n
} }
@ -2494,6 +2507,38 @@ func (m *Upstream) Unmarshal(dAtA []byte) error {
} }
m.LocalBindSocketMode = string(dAtA[iNdEx:postIndex]) m.LocalBindSocketMode = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DestinationPartition", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowService
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthService
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthService
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.DestinationPartition = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipService(dAtA[iNdEx:]) skippy, err := skipService(dAtA[iNdEx:])

View File

@ -134,6 +134,7 @@ message Upstream {
// LocalBindSocketPath is the socket to create to connect to the upstream service // LocalBindSocketPath is the socket to create to connect to the upstream service
string LocalBindSocketPath = 10; string LocalBindSocketPath = 10;
string LocalBindSocketMode = 11; string LocalBindSocketMode = 11;
string DestinationPartition = 12;
} }
// ServiceConnect are the shared Connect settings between all service // ServiceConnect are the shared Connect settings between all service