aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/controller.go
diff options
context:
space:
mode:
authorGravatar Jeongwook Park <henrysecond1@gmail.com> 2021-07-15 03:29:41 +0900
committerGravatar GitHub <noreply@github.com> 2021-07-14 14:29:41 -0400
commitfaa10f61aff9cce538375586b71a9bdd0fab6422 (patch)
tree33095e0075b7c1988c7f73756736649f2cae09c1 /plugin/kubernetes/controller.go
parent39ab8402638201551bd13b54c312ffd2fe12c596 (diff)
downloadcoredns-faa10f61aff9cce538375586b71a9bdd0fab6422.tar.gz
coredns-faa10f61aff9cce538375586b71a9bdd0fab6422.tar.zst
coredns-faa10f61aff9cce538375586b71a9bdd0fab6422.zip
Fix typo on kubernetes plugin (#4753)
- modifed -> modified Signed-off-by: jeongwook-park <jeongwook.park@navercorp.com>
Diffstat (limited to '')
-rw-r--r--plugin/kubernetes/controller.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugin/kubernetes/controller.go b/plugin/kubernetes/controller.go
index 9bef91342..7155c320e 100644
--- a/plugin/kubernetes/controller.go
+++ b/plugin/kubernetes/controller.go
@@ -553,8 +553,8 @@ func (dns *dnsControl) GetNamespaceByName(name string) (*api.Namespace, error) {
return nil, fmt.Errorf("namespace not found")
}
-func (dns *dnsControl) Add(obj interface{}) { dns.updateModifed() }
-func (dns *dnsControl) Delete(obj interface{}) { dns.updateModifed() }
+func (dns *dnsControl) Add(obj interface{}) { dns.updateModified() }
+func (dns *dnsControl) Delete(obj interface{}) { dns.updateModified() }
func (dns *dnsControl) Update(oldObj, newObj interface{}) { dns.detectChanges(oldObj, newObj) }
// detectChanges detects changes in objects, and updates the modified timestamp
@@ -569,12 +569,12 @@ func (dns *dnsControl) detectChanges(oldObj, newObj interface{}) {
}
switch ob := obj.(type) {
case *object.Service:
- dns.updateModifed()
+ dns.updateModified()
case *object.Pod:
- dns.updateModifed()
+ dns.updateModified()
case *object.Endpoints:
if !endpointsEquivalent(oldObj.(*object.Endpoints), newObj.(*object.Endpoints)) {
- dns.updateModifed()
+ dns.updateModified()
}
default:
log.Warningf("Updates for %T not supported.", ob)
@@ -649,7 +649,7 @@ func (dns *dnsControl) Modified() int64 {
}
// updateModified set dns.modified to the current time.
-func (dns *dnsControl) updateModifed() {
+func (dns *dnsControl) updateModified() {
unix := time.Now().Unix()
atomic.StoreInt64(&dns.modified, unix)
}