Skip to content

Commit

Permalink
Remove client side validation for azure network plugin (#1798)
Browse files Browse the repository at this point in the history
* 🐛 (Network profile of AKS.) Remove client side validation for azure network plugin.

Non-empty podCidr string validation for azure network plugin should be handled by ASK service.

* 📝 (Network profile of AKS.) Add more explainations for network_profile.

Add more explainations on default network_profile and `azure` specific validation requirement.

* Updating to better match the other docs
  • Loading branch information
metacpp authored and tombuildsstuff committed Aug 21, 2018
1 parent 552d613 commit 42db686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions azurerm/resource_arm_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ func resourceArmKubernetesCluster() *schema.Resource {
return nil
}

podCidr := profile["pod_cidr"].(string)

if networkPlugin == "azure" && podCidr != "" {
return fmt.Errorf("The `pod_cidr` field in the `network_profile` block can not be specified when `network_plugin` is set to `azure`. Please remove `pod_cidr` or set `network_plugin` to `kubenet`.")
}

dockerBridgeCidr := profile["docker_bridge_cidr"].(string)
dnsServiceIP := profile["dns_service_ip"].(string)
serviceCidr := profile["service_cidr"].(string)
Expand Down
3 changes: 2 additions & 1 deletion website/docs/r/kubernetes_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ The following arguments are supported:
* `kubernetes_version` - (Optional) Version of Kubernetes specified when creating the AKS managed cluster. If not specified, the latest recommended version will be used at provisioning time (but won't auto-upgrade).

* `network_profile` - (Optional) A Network Profile block as documented below.
-> **NOTE:** If `network_profile` is not defined, `kubenet` profile will be used by default.

* `tags` - (Optional) A mapping of tags to assign to the resource.

Expand Down Expand Up @@ -265,7 +266,7 @@ A `network_profile` block supports the following:

* `docker_bridge_cidr` - (Optional) IP address (in CIDR notation) used as the Docker bridge IP address on nodes. This is required when `network_plugin` is set to `kubenet`. Changing this forces a new resource to be created.

* `pod_cidr` - (Optional) The CIDR to use for pod IP addresses. Changing this forces a new resource to be created.
* `pod_cidr` - (Optional) The CIDR to use for pod IP addresses. This field can only be set when `network_plugin` is set to `kubenet`. Changing this forces a new resource to be created.

Here's an example of configuring the `kubenet` Networking Profile:

Expand Down

0 comments on commit 42db686

Please sign in to comment.