Skip to content

Commit

Permalink
Merge pull request #13787 from danwinship/fix-service-validation-15
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Apr 17, 2017
2 parents a3cdf77 + 92fcb8e commit 6c75193
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/sdn/plugin/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ func (master *OsdnMaster) validateNetworkConfig() error {
return err
}
for _, svc := range services.Items {
if !ni.ServiceNetwork.Contains(net.ParseIP(svc.Spec.ClusterIP)) {
svcIP := net.ParseIP(svc.Spec.ClusterIP)
if svcIP != nil && !ni.ServiceNetwork.Contains(svcIP) {
errList = append(errList, fmt.Errorf("Error: Existing service with IP: %s is not part of service network: %s", svc.Spec.ClusterIP, ni.ServiceNetwork.String()))
}
}
Expand Down

0 comments on commit 6c75193

Please sign in to comment.