From c78bc3332ec32ee59d049bca9fea5cc067d1952e Mon Sep 17 00:00:00 2001 From: drfaust92 Date: Mon, 11 Jul 2022 16:22:33 +0300 Subject: [PATCH] revert network_config --- README.md | 1 - autogen/main/README.md | 2 ++ autogen/main/cluster.tf.tmpl | 2 ++ cluster.tf | 6 ------ modules/private-cluster-update-variant/README.md | 1 - modules/private-cluster-update-variant/cluster.tf | 6 ------ modules/private-cluster/README.md | 1 - modules/private-cluster/cluster.tf | 6 ------ 8 files changed, 4 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 98bee34caa..d5ebebeaf5 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,6 @@ The node_pools variable takes the following parameters: | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional | | min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional | | name | The name of the node pool | | Required | -| pod_range | The ID of the secondary range for pod IPs. | | Optional | | node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required | | node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional | | node_metadata | Options to expose the node metadata to the workload running on the node | | Optional | diff --git a/autogen/main/README.md b/autogen/main/README.md index 150c673c58..e2e2eb48c1 100644 --- a/autogen/main/README.md +++ b/autogen/main/README.md @@ -216,7 +216,9 @@ The node_pools variable takes the following parameters: | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional | | min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional | | name | The name of the node pool | | Required | +{% if beta_cluster %} | pod_range | The ID of the secondary range for pod IPs. | | Optional | +{% endif %} | node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required | | node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional | | node_metadata | Options to expose the node metadata to the workload running on the node | | Optional | diff --git a/autogen/main/cluster.tf.tmpl b/autogen/main/cluster.tf.tmpl index 88768bb6ee..b369bfd78d 100644 --- a/autogen/main/cluster.tf.tmpl +++ b/autogen/main/cluster.tf.tmpl @@ -588,12 +588,14 @@ resource "google_container_node_pool" "pools" { } } + {% if beta_cluster %} dynamic "network_config" { for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] content { pod_range = lookup(network_config.value, "pod_range", null) } } + {% endif %} management { auto_repair = lookup(each.value, "auto_repair", true) diff --git a/cluster.tf b/cluster.tf index ff3d221872..9ba51ad550 100644 --- a/cluster.tf +++ b/cluster.tf @@ -297,12 +297,6 @@ resource "google_container_node_pool" "pools" { } } - dynamic "network_config" { - for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] - content { - pod_range = lookup(network_config.value, "pod_range", null) - } - } management { auto_repair = lookup(each.value, "auto_repair", true) diff --git a/modules/private-cluster-update-variant/README.md b/modules/private-cluster-update-variant/README.md index 0b87a0ba1f..7f5c136d56 100644 --- a/modules/private-cluster-update-variant/README.md +++ b/modules/private-cluster-update-variant/README.md @@ -290,7 +290,6 @@ The node_pools variable takes the following parameters: | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional | | min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional | | name | The name of the node pool | | Required | -| pod_range | The ID of the secondary range for pod IPs. | | Optional | | node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required | | node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional | | node_metadata | Options to expose the node metadata to the workload running on the node | | Optional | diff --git a/modules/private-cluster-update-variant/cluster.tf b/modules/private-cluster-update-variant/cluster.tf index 7f96b50181..7ebd2b7de9 100644 --- a/modules/private-cluster-update-variant/cluster.tf +++ b/modules/private-cluster-update-variant/cluster.tf @@ -401,12 +401,6 @@ resource "google_container_node_pool" "pools" { } } - dynamic "network_config" { - for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] - content { - pod_range = lookup(network_config.value, "pod_range", null) - } - } management { auto_repair = lookup(each.value, "auto_repair", true) diff --git a/modules/private-cluster/README.md b/modules/private-cluster/README.md index a3c3bb9d3c..f6b4617170 100644 --- a/modules/private-cluster/README.md +++ b/modules/private-cluster/README.md @@ -268,7 +268,6 @@ The node_pools variable takes the following parameters: | max_unavailable | The number of nodes that can be simultaneously unavailable during an upgrade. Increasing max_unavailable raises the number of nodes that can be upgraded in parallel. Can be set to 0 or greater. | 0 | Optional | | min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional | | name | The name of the node pool | | Required | -| pod_range | The ID of the secondary range for pod IPs. | | Optional | | node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required | | node_locations | The list of zones in which the cluster's nodes are located. Nodes must be in the region of their regional cluster or in the same region as their cluster's zone for zonal clusters. Defaults to cluster level node locations if nothing is specified | " " | Optional | | node_metadata | Options to expose the node metadata to the workload running on the node | | Optional | diff --git a/modules/private-cluster/cluster.tf b/modules/private-cluster/cluster.tf index 00064de9b1..da5463d2a8 100644 --- a/modules/private-cluster/cluster.tf +++ b/modules/private-cluster/cluster.tf @@ -310,12 +310,6 @@ resource "google_container_node_pool" "pools" { } } - dynamic "network_config" { - for_each = length(lookup(each.value, "pod_range", "")) > 0 ? [each.value] : [] - content { - pod_range = lookup(network_config.value, "pod_range", null) - } - } management { auto_repair = lookup(each.value, "auto_repair", true)