mirror of https://github.com/kubernetes/kops.git
Apply gofmt to dns-controller
This commit is contained in:
parent
e3d6231fbe
commit
8df2a8c843
|
|
@ -21,18 +21,18 @@ type DNSController struct {
|
|||
util.Stoppable
|
||||
|
||||
// zones is the DNS provider
|
||||
zones dnsprovider.Zones
|
||||
zones dnsprovider.Zones
|
||||
|
||||
// mutex protects the following mutable state
|
||||
mutex sync.Mutex
|
||||
mutex sync.Mutex
|
||||
// scopes is a map for each top-level grouping
|
||||
scopes map[string]*DNSControllerScope
|
||||
scopes map[string]*DNSControllerScope
|
||||
// lastSuccessSnapshot is the last snapshot we were able to apply to DNS
|
||||
// This lets us perform incremental updates to DNS.
|
||||
lastSuccessfulSnapshot *snapshot
|
||||
|
||||
// changeCount is a change-counter, which helps us avoid computation when nothing has changed
|
||||
changeCount uint64
|
||||
changeCount uint64
|
||||
}
|
||||
|
||||
// DNSController is a Context
|
||||
|
|
@ -43,16 +43,16 @@ type DNSControllerScope struct {
|
|||
// ScopeName is the string id for this scope
|
||||
ScopeName string
|
||||
|
||||
parent *DNSController
|
||||
parent *DNSController
|
||||
|
||||
// mutex protected the following mutable state
|
||||
mutex sync.Mutex
|
||||
mutex sync.Mutex
|
||||
|
||||
// Ready is set if the populating controller has performed an initial synchronization of records
|
||||
Ready bool
|
||||
Ready bool
|
||||
|
||||
// Records is the map of actual records for this scope
|
||||
Records map[string][]Record
|
||||
Records map[string][]Record
|
||||
}
|
||||
|
||||
// DNSControllerScope is a Scope
|
||||
|
|
@ -312,7 +312,7 @@ func (o *dnsOp) findZone(fqdn string) dnsprovider.Zone {
|
|||
if dot == -1 {
|
||||
return nil
|
||||
}
|
||||
zoneName = zoneName[dot + 1:]
|
||||
zoneName = zoneName[dot+1:]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
type IngressController struct {
|
||||
util.Stoppable
|
||||
kubeClient *client_extensions.ExtensionsClient
|
||||
scope dns.Scope
|
||||
scope dns.Scope
|
||||
}
|
||||
|
||||
// newIngressController creates a ingressController
|
||||
|
|
@ -32,7 +32,7 @@ func NewIngressController(kubeClient *client_extensions.ExtensionsClient, dns dn
|
|||
}
|
||||
c := &IngressController{
|
||||
kubeClient: kubeClient,
|
||||
scope: scope,
|
||||
scope: scope,
|
||||
}
|
||||
|
||||
return c, nil
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import (
|
|||
type NodeController struct {
|
||||
util.Stoppable
|
||||
kubeClient *client.CoreClient
|
||||
scope dns.Scope
|
||||
scope dns.Scope
|
||||
}
|
||||
|
||||
// newNodeController creates a nodeController
|
||||
|
|
@ -31,7 +31,7 @@ func NewNodeController(kubeClient *client.CoreClient, dns dns.Context) (*NodeCon
|
|||
}
|
||||
c := &NodeController{
|
||||
kubeClient: kubeClient,
|
||||
scope: scope,
|
||||
scope: scope,
|
||||
}
|
||||
|
||||
return c, nil
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ func NewPodController(kubeClient *client.CoreClient, dns dns.Context) (*PodContr
|
|||
}
|
||||
c := &PodController{
|
||||
kubeClient: kubeClient,
|
||||
scope: scope,
|
||||
scope: scope,
|
||||
}
|
||||
|
||||
return c, nil
|
||||
|
|
@ -127,7 +127,7 @@ func (c *PodController) updatePodRecords(pod *v1.Pod) {
|
|||
var aliases []string
|
||||
if pod.Spec.HostNetwork {
|
||||
if pod.Spec.NodeName != "" {
|
||||
aliases = append(aliases, "node/" + pod.Spec.NodeName + "/external")
|
||||
aliases = append(aliases, "node/"+pod.Spec.NodeName+"/external")
|
||||
}
|
||||
} else {
|
||||
glog.V(4).Infof("Pod %q had %s=%s, but was not HostNetwork", pod.Name, AnnotationNameDnsExternal, specExternal)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import (
|
|||
type ServiceController struct {
|
||||
util.Stoppable
|
||||
kubeClient *client.CoreClient
|
||||
scope dns.Scope
|
||||
scope dns.Scope
|
||||
}
|
||||
|
||||
// newServiceController creates a serviceController
|
||||
|
|
@ -32,7 +32,7 @@ func NewServiceController(kubeClient *client.CoreClient, dns dns.Context) (*Serv
|
|||
}
|
||||
c := &ServiceController{
|
||||
kubeClient: kubeClient,
|
||||
scope: scope,
|
||||
scope: scope,
|
||||
}
|
||||
|
||||
return c, nil
|
||||
|
|
@ -158,5 +158,5 @@ func (c *ServiceController) updateServiceRecords(service *v1.Service) {
|
|||
glog.V(4).Infof("Service %q did not have %s annotation", service.Name, AnnotationNameDnsInternal)
|
||||
}
|
||||
|
||||
c.scope.Replace( service.Name, records)
|
||||
c.scope.Replace(service.Name, records)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue