mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
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.
This commit is contained in:
parent
8911e2a377
commit
5db0778823
@ -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{
|
||||
|
Loading…
Reference in New Issue
Block a user