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:
Kubernetes Submit Queue 2017-02-23 08:42:02 -08:00 committed by GitHub
commit f1182ddc27

View File

@ -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{