Fix bug in apiserver service cluster cidr split

Signed-off-by: darshanime <deathbullet@gmail.com>
This commit is contained in:
darshanime 2019-12-05 11:31:11 +05:30 committed by Jordan Liggitt
parent 864596f680
commit fdd25ec968

View File

@ -572,8 +572,10 @@ func Complete(s *options.ServerRunOptions) (completedServerRunOptions, error) {
// process s.ServiceClusterIPRange from list to Primary and Secondary
// we process secondary only if provided by user
serviceClusterIPRangeList := strings.Split(s.ServiceClusterIPRanges, ",")
serviceClusterIPRangeList := []string{}
if s.ServiceClusterIPRanges != "" {
serviceClusterIPRangeList = strings.Split(s.ServiceClusterIPRanges, ",")
}
var apiServerServiceIP net.IP
var serviceIPRange net.IPNet