Skip to content

Commit 456a3af

Browse files
authored
Merge branch 'master' into issues/358/fix_quoted_types
2 parents e62160c + 2449d47 commit 456a3af

File tree

18 files changed

+233
-11
lines changed

18 files changed

+233
-11
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,32 @@ Then perform the following commands on the root folder:
184184

185185
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
186186

187+
## node_pools variable
188+
The node_pools variable takes the following parameters:
189+
190+
| Name | Description | Default | Requirement |
191+
| --- | --- | --- | --- |
192+
| accelerator_count | The number of the guest accelerator cards exposed to this instance | 0 | Optional |
193+
| accelerator_type | The accelerator type resource to expose to the instance | " " | Optional |
194+
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
195+
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
196+
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
197+
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100GB | Optional |
198+
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |
199+
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
200+
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
201+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
202+
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
203+
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
204+
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
205+
| name | The name of the node pool | | Required |
206+
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
207+
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
208+
| service_account | The service account to be used by the Node VMs | " " | Optional |
209+
| tags | The list of instance tags applied to all nodes | | Required |
210+
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
211+
212+
187213
## Requirements
188214

189215
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:

autogen/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,51 @@ Then perform the following commands on the root folder:
139139
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
140140
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
141141

142+
## node_pools variable
143+
The node_pools variable takes the following parameters:
144+
145+
| Name | Description | Default | Requirement |
146+
| --- | --- | --- | --- |
147+
| accelerator_count | The number of the guest accelerator cards exposed to this instance | 0 | Optional |
148+
| accelerator_type | The accelerator type resource to expose to the instance | " " | Optional |
149+
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
150+
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
151+
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
152+
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100GB | Optional |
153+
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |
154+
{% if beta_cluster %}
155+
| effect | Effect for the taint | | Required |
156+
{% endif %}
157+
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
158+
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
159+
{% if beta_cluster %}
160+
| key | The key required for the taint | | Required |
161+
{% endif %}
162+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
163+
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
164+
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
165+
{% if beta_cluster %}
166+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
167+
{% endif %}
168+
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
169+
| name | The name of the node pool | | Required |
170+
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
171+
{% if beta_cluster %}
172+
| 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 |
173+
| node_metadata | Options to expose the node metadata to the workload running on the node | | Required |
174+
{% endif %}
175+
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
176+
{% if beta_cluster %}
177+
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
178+
{% endif %}
179+
| service_account | The service account to be used by the Node VMs | " " | Optional |
180+
| tags | The list of instance tags applied to all nodes | | Required |
181+
{% if beta_cluster %}
182+
| value | The value for the taint | | Required |
183+
{% endif %}
184+
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
185+
186+
142187
## Requirements
143188

144189
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:

autogen/main.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "random_shuffle" "available_zones" {
3838
locals {
3939
// location
4040
location = var.regional ? var.region : var.zones[0]
41-
region = var.region == null ? join("-", slice(split("-", var.zones[0]), 0, 2)) : var.region
41+
region = var.regional ? var.region : join("-", slice(split("-", var.zones[0]), 0, 2))
4242
// for regional cluster - use var.zones if provided, use available otherwise, for zonal cluster use var.zones with first element extracted
4343
node_locations = var.regional ? coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result)) : slice(var.zones, 1, length(var.zones))
4444
// kuberentes version

autogen/outputs.tf.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ output "identity_namespace" {
155155
description = "Workload Identity namespace"
156156
value = var.identity_namespace
157157
depends_on = [
158-
"google_container_cluster.primary"
158+
google_container_cluster.primary
159159
]
160160
}
161161
{% endif %}

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "random_shuffle" "available_zones" {
3434
locals {
3535
// location
3636
location = var.regional ? var.region : var.zones[0]
37-
region = var.region == null ? join("-", slice(split("-", var.zones[0]), 0, 2)) : var.region
37+
region = var.regional ? var.region : join("-", slice(split("-", var.zones[0]), 0, 2))
3838
// for regional cluster - use var.zones if provided, use available otherwise, for zonal cluster use var.zones with first element extracted
3939
node_locations = var.regional ? coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result)) : slice(var.zones, 1, length(var.zones))
4040
// kuberentes version

modules/beta-private-cluster-update-variant/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,39 @@ Then perform the following commands on the root folder:
231231

232232
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
233233

234+
## node_pools variable
235+
The node_pools variable takes the following parameters:
236+
237+
| Name | Description | Default | Requirement |
238+
| --- | --- | --- | --- |
239+
| accelerator_count | The number of the guest accelerator cards exposed to this instance | 0 | Optional |
240+
| accelerator_type | The accelerator type resource to expose to the instance | " " | Optional |
241+
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
242+
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
243+
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
244+
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100GB | Optional |
245+
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |
246+
| effect | Effect for the taint | | Required |
247+
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
248+
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
249+
| key | The key required for the taint | | Required |
250+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
251+
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
252+
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
253+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
254+
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
255+
| name | The name of the node pool | | Required |
256+
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
257+
| 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 |
258+
| node_metadata | Options to expose the node metadata to the workload running on the node | | Required |
259+
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
260+
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
261+
| service_account | The service account to be used by the Node VMs | " " | Optional |
262+
| tags | The list of instance tags applied to all nodes | | Required |
263+
| value | The value for the taint | | Required |
264+
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
265+
266+
234267
## Requirements
235268

236269
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:

modules/beta-private-cluster-update-variant/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "random_shuffle" "available_zones" {
3434
locals {
3535
// location
3636
location = var.regional ? var.region : var.zones[0]
37-
region = var.region == null ? join("-", slice(split("-", var.zones[0]), 0, 2)) : var.region
37+
region = var.regional ? var.region : join("-", slice(split("-", var.zones[0]), 0, 2))
3838
// for regional cluster - use var.zones if provided, use available otherwise, for zonal cluster use var.zones with first element extracted
3939
node_locations = var.regional ? coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result)) : slice(var.zones, 1, length(var.zones))
4040
// kuberentes version

modules/beta-private-cluster-update-variant/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ output "identity_namespace" {
154154
description = "Workload Identity namespace"
155155
value = var.identity_namespace
156156
depends_on = [
157-
"google_container_cluster.primary"
157+
google_container_cluster.primary
158158
]
159159
}

modules/beta-private-cluster/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,39 @@ Then perform the following commands on the root folder:
231231

232232
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
233233

234+
## node_pools variable
235+
The node_pools variable takes the following parameters:
236+
237+
| Name | Description | Default | Requirement |
238+
| --- | --- | --- | --- |
239+
| accelerator_count | The number of the guest accelerator cards exposed to this instance | 0 | Optional |
240+
| accelerator_type | The accelerator type resource to expose to the instance | " " | Optional |
241+
| auto_repair | Whether the nodes will be automatically repaired | true | Optional |
242+
| autoscaling | Configuration required by cluster autoscaler to adjust the size of the node pool to the current cluster usage | true | Optional |
243+
| auto_upgrade | Whether the nodes will be automatically upgraded | true (if cluster is regional) | Optional |
244+
| disk_size_gb | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB | 100GB | Optional |
245+
| disk_type | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') | pd-standard | Optional |
246+
| effect | Effect for the taint | | Required |
247+
| image_type | The image type to use for this node. Note that changing the image type will delete and recreate all nodes in the node pool | COS | Optional |
248+
| initial_node_count | The initial number of nodes for the pool. In regional or multi-zonal clusters, this is the number of nodes per zone. Changing this will force recreation of the resource. Defaults to the value of min_count | " " | Optional |
249+
| key | The key required for the taint | | Required |
250+
| local_ssd_count | The amount of local SSD disks that will be attached to each cluster node | 0 | Optional |
251+
| machine_type | The name of a Google Compute Engine machine type | n1-standard-2 | Optional |
252+
| max_count | Maximum number of nodes in the NodePool. Must be >= min_count | 100 | Optional |
253+
| max_pods_per_node | The maximum number of pods per node in this cluster | null | Optional |
254+
| min_count | Minimum number of nodes in the NodePool. Must be >=0 and <= max_count. Should be used when autoscaling is true | 1 | Optional |
255+
| name | The name of the node pool | | Required |
256+
| node_count | The number of nodes in the nodepool when autoscaling is false. Otherwise defaults to 1. Only valid for non-autoscaling clusers | | Required |
257+
| 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 |
258+
| node_metadata | Options to expose the node metadata to the workload running on the node | | Required |
259+
| preemptible | A boolean that represents whether or not the underlying node VMs are preemptible | false | Optional |
260+
| sandbox_type | Sandbox to use for pods in the node pool | | Required |
261+
| service_account | The service account to be used by the Node VMs | " " | Optional |
262+
| tags | The list of instance tags applied to all nodes | | Required |
263+
| value | The value for the taint | | Required |
264+
| version | The Kubernetes version for the nodes in this pool. Should only be set if auto_upgrade is false | " " | Optional |
265+
266+
234267
## Requirements
235268

236269
Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:

modules/beta-private-cluster/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ resource "random_shuffle" "available_zones" {
3434
locals {
3535
// location
3636
location = var.regional ? var.region : var.zones[0]
37-
region = var.region == null ? join("-", slice(split("-", var.zones[0]), 0, 2)) : var.region
37+
region = var.regional ? var.region : join("-", slice(split("-", var.zones[0]), 0, 2))
3838
// for regional cluster - use var.zones if provided, use available otherwise, for zonal cluster use var.zones with first element extracted
3939
node_locations = var.regional ? coalescelist(compact(var.zones), sort(random_shuffle.available_zones.result)) : slice(var.zones, 1, length(var.zones))
4040
// kuberentes version

0 commit comments

Comments
 (0)