Skip to content

Commit

Permalink
Return error if no pod or svc cidr
Browse files Browse the repository at this point in the history
  • Loading branch information
anjmao committed Aug 30, 2024
1 parent db2709d commit f2be850
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/controller/kube/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ func (c *Client) GetClusterInfo() (*ClusterInfo, error) {
}
}
}
if res.PodCidr == "" && res.ServiceCidr == "" {
return nil, fmt.Errorf("no pod cidr or service cidr found")
}
c.clusterInfo = &res
return &res, nil
}
Expand Down

0 comments on commit f2be850

Please sign in to comment.