Skip to content

Commit

Permalink
resolving comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ketelsen committed Oct 16, 2014
1 parent de3714f commit 516d273
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ func NewKubernetesSync(client *etcd.Client) *KubernetesSync {
return ks
}

// SyncLoop runs periodic work. This is expected to run as a goroutine or as the main loop of the app. It does not return.
// This is a belt-and-suspenders loop that periodically
// addes the records in the local cache of Kubernetes
// services to the skydns repository to prevent them
// from expiring.
func (ksync *KubernetesSync) SyncLoop() {
for {
select {
Expand All @@ -61,7 +64,6 @@ func (ksync *KubernetesSync) ensureDNS() {
// OnUpdate manages the active set of service records.
// Active service records get ttl bumps if found in the update set or
// removed if missing from the update set.

func (ksync *KubernetesSync) OnUpdate(services []api.Service) {
activeServices := util.StringSet{}
for _, service := range services {
Expand Down Expand Up @@ -136,7 +138,7 @@ func (ksync *KubernetesSync) addDNS(service string, info *serviceInfo) error {
//Set with no TTL, and hope that kubernetes events are accurate.
//TODO(BJK) Think this through a little more

log.Printf("Setting dns record: %v\n", record)
log.Printf("setting dns record: %v\n", record)
_, err = ksync.eclient.Set(msg.Path(record), string(b), uint64(0))
return err
}
Expand Down

0 comments on commit 516d273

Please sign in to comment.