Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Commit

Permalink
Merge pull request #12 from alena1108/headless
Browse files Browse the repository at this point in the history
Don't set service.vip for headless k8s service
  • Loading branch information
ibuildthecloud committed May 20, 2016
2 parents 671ad80 + 50af8a8 commit 945b5dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kubernetesevents/generic_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,18 @@ func (h *GenericHandler) add(selectorMap map[string]interface{}, metadata *model
data := map[string]interface{}{"fields": fields}

rancherUuid, _ := metadata.Labels["io.rancher.uuid"].(string)

var vip string
if !strings.EqualFold(clusterIp, "None") {
vip = clusterIp
}
service := client.Service{
Kind: kind,
Name: metadata.Name,
ExternalId: metadata.Uid,
SelectorContainer: selector,
Data: data,
Uuid: rancherUuid,
Vip: clusterIp,
Vip: vip,
}
serviceEvent.Service = service

Expand Down

0 comments on commit 945b5dc

Please sign in to comment.