From 1ff46f3f0a1edd1b1ce5e79b07f776e74fbd7a62 Mon Sep 17 00:00:00 2001 From: tradel Date: Tue, 27 Aug 2019 14:16:25 -0700 Subject: [PATCH] confi\gure providers with DC and domain --- agent/consul/connect_ca_endpoint.go | 2 +- agent/consul/leader_connect.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/consul/connect_ca_endpoint.go b/agent/consul/connect_ca_endpoint.go index fbcdc403cb..f47ba27747 100644 --- a/agent/consul/connect_ca_endpoint.go +++ b/agent/consul/connect_ca_endpoint.go @@ -176,7 +176,7 @@ func (s *ConnectCA) ConfigurationSet( if err != nil { return fmt.Errorf("could not initialize provider: %v", err) } - if err := newProvider.Configure(args.Config.ClusterID, true, args.Config.Config); err != nil { + if err := newProvider.Configure(args.Config.ClusterID, s.srv.config.Datacenter, s.srv.config.Domain, true, args.Config.Config); err != nil { return fmt.Errorf("error configuring provider: %v", err) } if err := newProvider.GenerateRoot(); err != nil { diff --git a/agent/consul/leader_connect.go b/agent/consul/leader_connect.go index 02caa4516b..9fdf9d2654 100644 --- a/agent/consul/leader_connect.go +++ b/agent/consul/leader_connect.go @@ -197,7 +197,7 @@ func (s *Server) initializeCA() error { // initializeRootCA runs the initialization logic for a root CA. func (s *Server) initializeRootCA(provider ca.Provider, conf *structs.CAConfiguration) error { - if err := provider.Configure(conf.ClusterID, true, conf.Config); err != nil { + if err := provider.Configure(conf.ClusterID, s.config.Datacenter, s.config.Domain, true, conf.Config); err != nil { return fmt.Errorf("error configuring provider: %v", err) } if err := provider.GenerateRoot(); err != nil { @@ -750,7 +750,7 @@ func (s *Server) initializeSecondaryProvider(provider ca.Provider, roots structs return err } - if err := provider.Configure(clusterID, false, conf.Config); err != nil { + if err := provider.Configure(clusterID, s.config.Datacenter, s.config.Domain, false, conf.Config); err != nil { return fmt.Errorf("error configuring provider: %v", err) }