mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-11-03 23:40:03 +00:00 
			
		
		
		
	Merge pull request #39855 from justinsb/dns_logging
Automatic merge from submit-queue route53: configure verbose authentication errors Otherwise we get an error message which is confusingly written on authentication failures. Probably blocked on #39854
This commit is contained in:
		@@ -20,6 +20,7 @@ package route53
 | 
			
		||||
import (
 | 
			
		||||
	"io"
 | 
			
		||||
 | 
			
		||||
	"github.com/aws/aws-sdk-go/aws"
 | 
			
		||||
	"github.com/aws/aws-sdk-go/aws/request"
 | 
			
		||||
	"github.com/aws/aws-sdk-go/aws/session"
 | 
			
		||||
	"github.com/aws/aws-sdk-go/service/route53"
 | 
			
		||||
@@ -53,7 +54,13 @@ func route53HandlerLogger(req *request.Request) {
 | 
			
		||||
func newRoute53(config io.Reader) (*Interface, error) {
 | 
			
		||||
	// Connect to AWS Route53 - TODO: Do more sophisticated auth
 | 
			
		||||
 | 
			
		||||
	svc := route53.New(session.New())
 | 
			
		||||
	awsConfig := aws.NewConfig()
 | 
			
		||||
 | 
			
		||||
	// This avoids a confusing error message when we fail to get credentials
 | 
			
		||||
	// e.g. https://github.com/kubernetes/kops/issues/605
 | 
			
		||||
	awsConfig = awsConfig.WithCredentialsChainVerboseErrors(true)
 | 
			
		||||
 | 
			
		||||
	svc := route53.New(session.New(), awsConfig)
 | 
			
		||||
 | 
			
		||||
	// Add our handler that will log requests
 | 
			
		||||
	svc.Handlers.Sign.PushFrontNamed(request.NamedHandler{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user