Commit 8631aa2e authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #39991 from justinsb/verbose_changeset_logging

Automatic merge from submit-queue dnsprovider route53: log changeset details at v(8) Otherwise it can be hard to know exactly what is changing and whether the changes could be optimized, or to troubleshoot if someone were accidentally to have a bug in their calling code. ```release-note NONE ```
parents 960efff7 5db07788
......@@ -27,6 +27,7 @@ go_library(
"//vendor:github.com/aws/aws-sdk-go/aws",
"//vendor:github.com/aws/aws-sdk-go/aws/session",
"//vendor:github.com/aws/aws-sdk-go/service/route53",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/util/uuid",
],
)
......
......@@ -17,8 +17,12 @@ limitations under the License.
package route53
import (
"bytes"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/route53"
"github.com/golang/glog"
"k8s.io/kubernetes/federation/pkg/dnsprovider"
)
......@@ -93,6 +97,15 @@ func (c *ResourceRecordChangeset) Apply() error {
return nil
}
if glog.V(8) {
var sb bytes.Buffer
for _, change := range changes {
sb.WriteString(fmt.Sprintf("\t%s %s %s\n", aws.StringValue(change.Action), aws.StringValue(change.ResourceRecordSet.Type), aws.StringValue(change.ResourceRecordSet.Name)))
}
glog.V(8).Infof("Route53 Changeset:\n%s", sb.String())
}
service := c.zone.zones.interface_.service
request := &route53.ChangeResourceRecordSetsInput{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment