Skip to content

Commit

Permalink
Merge pull request #3495 from justinsb/split_out_baremetal_no_network…
Browse files Browse the repository at this point in the history
…cidr

Automatic merge from submit-queue.

baremetal: error if NetworkCIDR set
  • Loading branch information
Kubernetes Submit Queue authored Sep 30, 2017
2 parents ea31478 + b32e6b5 commit 1e9010d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/apis/kops/validation/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ func ValidateCluster(c *kops.Cluster, strict bool) *field.Error {
switch kops.CloudProviderID(c.Spec.CloudProvider) {
case kops.CloudProviderBareMetal:
requiresSubnets = false
if c.Spec.NetworkCIDR != "" {
return field.Invalid(fieldSpec.Child("NetworkCIDR"), c.Spec.NetworkCIDR, "NetworkCIDR should not be set on bare metal")
}
requiresNetworkCIDR = false

case kops.CloudProviderDO:
Expand Down

0 comments on commit 1e9010d

Please sign in to comment.