Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
9 bit minimum cluster size req is for Azure CNI only (#1863)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Dec 1, 2017
1 parent 03be870 commit fb57e73
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/api/vlabs/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,11 @@ func (a *KubernetesConfig) Validate(k8sVersion string) error {
return fmt.Errorf("OrchestratorProfile.KubernetesConfig.ClusterSubnet '%s' is an invalid subnet", a.ClusterSubnet)
}

ones, bits := subnet.Mask.Size()
if bits-ones <= 8 {
return fmt.Errorf("OrchestratorProfile.KubernetesConfig.ClusterSubnet '%s' must reserve at least 9 bits for nodes", a.ClusterSubnet)
if a.NetworkPolicy == "azure" {
ones, bits := subnet.Mask.Size()
if bits-ones <= 8 {
return fmt.Errorf("OrchestratorProfile.KubernetesConfig.ClusterSubnet '%s' must reserve at least 9 bits for nodes", a.ClusterSubnet)
}
}
}

Expand Down

0 comments on commit fb57e73

Please sign in to comment.