Skip to content

Commit

Permalink
Merge pull request kubernetes#40197 from justinsb/route53_peekaboo
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue (batch tested with PRs 37617, 40197)

dnsprovider: Add direct access to Route53 data

This methods allow us to develop advanced functionality for Route53,
before we add all the functionality to the cross-provider interface.
Use of these methods should be avoided, and adding methods to the
cross-provider interfaces should be preferred.

```release-note
NONE
```
  • Loading branch information
Kubernetes Submit Queue authored Feb 2, 2017
2 parents 331a558 + 176dfa3 commit 570d450
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions federation/pkg/dnsprovider/providers/aws/route53/rrset.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,12 @@ func (rrset ResourceRecordSet) Ttl() int64 {
func (rrset ResourceRecordSet) Type() rrstype.RrsType {
return rrstype.RrsType(*rrset.impl.Type)
}

// Route53ResourceRecordSet returns the route53 ResourceRecordSet object for the ResourceRecordSet
// This is a "back door" that allows for limited access to the ResourceRecordSet,
// without having to requery it, so that we can expose AWS specific functionality.
// Using this method should be avoided where possible; instead prefer to add functionality
// to the cross-provider ResourceRecordSet interface.
func (rrset ResourceRecordSet) Route53ResourceRecordSet() *route53.ResourceRecordSet {
return rrset.impl
}
9 changes: 9 additions & 0 deletions federation/pkg/dnsprovider/providers/aws/route53/zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ func (zone *Zone) ID() string {
func (zone *Zone) ResourceRecordSets() (dnsprovider.ResourceRecordSets, bool) {
return &ResourceRecordSets{zone}, true
}

// Route53HostedZone returns the route53 HostedZone object for the zone.
// This is a "back door" that allows for limited access to the HostedZone,
// without having to requery it, so that we can expose AWS specific functionality.
// Using this method should be avoided where possible; instead prefer to add functionality
// to the cross-provider Zone interface.
func (zone *Zone) Route53HostedZone() *route53.HostedZone {
return zone.impl
}

0 comments on commit 570d450

Please sign in to comment.