chore: update github.com/hashicorp/consul/api

Co-authored-by: lbenguigui <lbenguigui@gmail.com>
This commit is contained in:
Kevin Pollet 2023-11-09 16:58:06 +01:00 committed by GitHub
parent 0e66ed87f8
commit 085b70c94e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 182 deletions

View file

@ -3,7 +3,6 @@ package consulcatalog
import (
"fmt"
"github.com/hashicorp/consul/agent/connect"
"github.com/traefik/traefik/v2/pkg/config/dynamic"
traefiktls "github.com/traefik/traefik/v2/pkg/tls"
)
@ -52,11 +51,11 @@ func (c *connectCert) equals(other *connectCert) bool {
}
func (c *connectCert) serversTransport(item itemData) *dynamic.ServersTransport {
spiffeIDService := connect.SpiffeIDService{
Namespace: item.Namespace,
Datacenter: item.Datacenter,
Service: item.Name,
}
spiffeID := fmt.Sprintf("spiffe:///ns/%s/dc/%s/svc/%s",
item.Namespace,
item.Datacenter,
item.Name,
)
return &dynamic.ServersTransport{
// This ensures that the config changes whenever the verifier function changes
@ -67,6 +66,6 @@ func (c *connectCert) serversTransport(item itemData) *dynamic.ServersTransport
Certificates: traefiktls.Certificates{
c.getLeaf(),
},
PeerCertURI: spiffeIDService.URI().String(),
PeerCertURI: spiffeID,
}
}