Skip to content

Commit

Permalink
Merge pull request #487 from caseydavenport/master
Browse files Browse the repository at this point in the history
Tweak name of node split method
  • Loading branch information
caseydavenport authored Aug 5, 2017
2 parents 2b80ed5 + 8c3b9cd commit 7714b92
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/backend/k8s/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,7 +794,7 @@ func (syn *kubeSyncer) performSnapshot(versions *resourceVersions) (map[string][

versions.nodeVersion = noList.ListMeta.ResourceVersion
for _, no := range noList.Items {
kvpHostIP, kvpIPIPAddr := splitNodeEvent(&no)
kvpHostIP, kvpIPIPAddr := splitNode(&no)
log.WithFields(log.Fields{
"kvpHostIP": kvpHostIP,
"kvpIPIPAddr": kvpIPIPAddr,
Expand Down Expand Up @@ -885,7 +885,7 @@ func (syn *kubeSyncer) parseNamespaceEvent(e watch.Event) []model.KVPair {
return []model.KVPair{*rules, *tags, *labels}
}

func splitNodeEvent(node *k8sapi.Node) (*model.KVPair, *model.KVPair) {
func splitNode(node *k8sapi.Node) (*model.KVPair, *model.KVPair) {
kvp, err := resources.K8sNodeToCalico(node)
if err != nil {
log.WithError(err).Panic("Failed to convert k8s node to Calico node.")
Expand Down Expand Up @@ -927,7 +927,7 @@ func (syn *kubeSyncer) parseNodeEvent(e watch.Event) (*model.KVPair, *model.KVPa
log.Panicf("Invalid node event. Type: %s, Object: %+v", e.Type, e.Object)
}

kvpHostIp, kvpIPIPAddr := splitNodeEvent(node)
kvpHostIp, kvpIPIPAddr := splitNode(node)

if e.Type == watch.Deleted {
kvpHostIp.Value = nil
Expand Down

0 comments on commit 7714b92

Please sign in to comment.