|
|
|
|
@@ -187,6 +187,31 @@ module "cluster-1-nodepool-dws" {
|
|
|
|
|
}
|
|
|
|
|
# tftest modules=1 resources=2 inventory=dws.yaml
|
|
|
|
|
```
|
|
|
|
|
### Hyperdisk Balanced
|
|
|
|
|
|
|
|
|
|
This example shows how to configure Hyperdisk Balanced with provisioned IOPS and throughput.
|
|
|
|
|
|
|
|
|
|
```hcl
|
|
|
|
|
module "cluster-1-nodepool-hyperdisk" {
|
|
|
|
|
source = "./fabric/modules/gke-nodepool"
|
|
|
|
|
project_id = "myproject"
|
|
|
|
|
cluster_name = "cluster-1"
|
|
|
|
|
location = "europe-west4-a"
|
|
|
|
|
name = "nodepool-hyperdisk"
|
|
|
|
|
node_config = {
|
|
|
|
|
machine_type = "c3-standard-4"
|
|
|
|
|
boot_disk = {
|
|
|
|
|
image_type = "COS_CONTAINERD"
|
|
|
|
|
type = "hyperdisk-balanced"
|
|
|
|
|
size_gb = 100
|
|
|
|
|
provisioned_iops = 3000
|
|
|
|
|
provisioned_throughput = 140
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# tftest modules=1 resources=1 inventory=hyperdisk.yaml
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
<!-- BEGIN TFDOC -->
|
|
|
|
|
## Variables
|
|
|
|
|
|
|
|
|
|
@@ -194,7 +219,7 @@ module "cluster-1-nodepool-dws" {
|
|
|
|
|
|---|---|:---:|:---:|:---:|
|
|
|
|
|
| [cluster_name](variables.tf#L23) | Cluster name. | <code>string</code> | ✓ | |
|
|
|
|
|
| [location](variables.tf#L48) | Cluster location. | <code>string</code> | ✓ | |
|
|
|
|
|
| [project_id](variables.tf#L216) | Cluster project id. | <code>string</code> | ✓ | |
|
|
|
|
|
| [project_id](variables.tf#L223) | Cluster project id. | <code>string</code> | ✓ | |
|
|
|
|
|
| [cluster_id](variables.tf#L17) | Cluster id. Optional, but providing cluster_id is recommended to prevent cluster misconfiguration in some of the edge cases. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [gke_version](variables.tf#L28) | Kubernetes nodes version. Ignored if auto_upgrade is set in management_config. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [k8s_labels](variables.tf#L34) | Kubernetes labels applied to each node. | <code>map(string)</code> | | <code>{}</code> |
|
|
|
|
|
@@ -202,16 +227,16 @@ module "cluster-1-nodepool-dws" {
|
|
|
|
|
| [max_pods_per_node](variables.tf#L53) | Maximum number of pods per node. | <code>number</code> | | <code>null</code> |
|
|
|
|
|
| [name](variables.tf#L59) | Optional nodepool name. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [network_config](variables.tf#L65) | Network configuration. | <code title="object({ enable_private_nodes = optional(bool) pod_range = optional(object({ cidr = optional(string) create = optional(bool, false) name = optional(string) }), {}) additional_node_network_configs = optional(list(object({ network = string subnetwork = string })), []) additional_pod_network_configs = optional(list(object({ subnetwork = string secondary_pod_range = string max_pods_per_node = string })), []) total_egress_bandwidth_tier = optional(string) pod_cidr_overprovisioning_disabled = optional(bool, false) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [node_config](variables.tf#L89) | Node-level configuration. | <code title="object({ boot_disk_kms_key = optional(string) disk_size_gb = optional(number) disk_type = optional(string, "pd-balanced") ephemeral_ssd_count = optional(number) gcfs = optional(bool, false) guest_accelerator = optional(object({ count = number type = string gpu_driver = optional(object({ version = string partition_size = optional(string) max_shared_clients_per_gpu = optional(number) })) })) local_nvme_ssd_count = optional(number) gvnic = optional(bool, false) image_type = optional(string) kubelet_config = optional(object({ cpu_manager_policy = string cpu_cfs_quota = optional(bool) cpu_cfs_quota_period = optional(string) insecure_kubelet_readonly_port_enabled = optional(string) pod_pids_limit = optional(number) container_log_max_size = optional(string) container_log_max_files = optional(number) image_gc_low_threshold_percent = optional(number) image_gc_high_threshold_percent = optional(number) image_minimum_gc_age = optional(string) image_maximum_gc_age = optional(string) allowed_unsafe_sysctls = optional(list(string), []) })) linux_node_config = optional(object({ sysctls = optional(map(string)) cgroup_mode = optional(string) })) local_ssd_count = optional(number) machine_type = optional(string) metadata = optional(map(string)) min_cpu_platform = optional(string) preemptible = optional(bool) sandbox_config_gvisor = optional(bool) shielded_instance_config = optional(object({ enable_integrity_monitoring = optional(bool) enable_secure_boot = optional(bool) })) spot = optional(bool) workload_metadata_config_mode = optional(string) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [node_count](variables.tf#L162) | Number of nodes per instance group. Initial value can only be changed by recreation, current is ignored when autoscaling is used. | <code title="object({ current = optional(number) initial = number })">object({…})</code> | | <code title="{ initial = 1 }">{…}</code> |
|
|
|
|
|
| [node_locations](variables.tf#L174) | Node locations. | <code>list(string)</code> | | <code>null</code> |
|
|
|
|
|
| [nodepool_config](variables.tf#L180) | Nodepool-level configuration. | <code title="object({ autoscaling = optional(object({ location_policy = optional(string) max_node_count = optional(number) min_node_count = optional(number) use_total_nodes = optional(bool, false) })) management = optional(object({ auto_repair = optional(bool) auto_upgrade = optional(bool) })) placement_policy = optional(object({ type = string policy_name = optional(string) tpu_topology = optional(string) })) queued_provisioning = optional(bool, false) upgrade_settings = optional(object({ max_surge = number max_unavailable = number strategy = optional(string) blue_green_settings = optional(object({ node_pool_soak_duration = optional(string) standard_rollout_policy = optional(object({ batch_percentage = optional(number) batch_node_count = optional(number) batch_soak_duration = optional(string) })) })) })) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [reservation_affinity](variables.tf#L221) | Configuration of the desired reservation which instances could take capacity from. | <code title="object({ consume_reservation_type = string key = optional(string) values = optional(list(string)) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [resource_manager_tags](variables.tf#L231) | A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. | <code>map(string)</code> | | <code>null</code> |
|
|
|
|
|
| [service_account](variables.tf#L237) | Nodepool service account. If this variable is set to null, the default GCE service account will be used. If set and email is null, a service account will be created. If scopes are null a default will be used. | <code title="object({ create = optional(bool, false) email = optional(string) oauth_scopes = optional(list(string)) display_name = optional(string) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [sole_tenant_nodegroup](variables.tf#L249) | Sole tenant node group. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [tags](variables.tf#L255) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
|
|
|
|
| [taints](variables.tf#L261) | Kubernetes taints applied to all nodes. | <code title="map(object({ value = string effect = string }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [node_config](variables.tf#L89) | Node-level configuration. | <code title="object({ boot_disk = optional(object({ kms_key = optional(string) size_gb = optional(number) type = optional(string) provisioned_iops = optional(number) provisioned_throughput = optional(number) })) boot_disk_kms_key = optional(string) # usage of this is discouraged disk_size_gb = optional(number) # usage of this is discouraged disk_type = optional(string, "pd-balanced") # usage of this is discouraged ephemeral_ssd_count = optional(number) gcfs = optional(bool, false) guest_accelerator = optional(object({ count = number type = string gpu_driver = optional(object({ version = string partition_size = optional(string) max_shared_clients_per_gpu = optional(number) })) })) local_nvme_ssd_count = optional(number) gvnic = optional(bool, false) image_type = optional(string) kubelet_config = optional(object({ cpu_manager_policy = string cpu_cfs_quota = optional(bool) cpu_cfs_quota_period = optional(string) insecure_kubelet_readonly_port_enabled = optional(string) pod_pids_limit = optional(number) container_log_max_size = optional(string) container_log_max_files = optional(number) image_gc_low_threshold_percent = optional(number) image_gc_high_threshold_percent = optional(number) image_minimum_gc_age = optional(string) image_maximum_gc_age = optional(string) allowed_unsafe_sysctls = optional(list(string), []) })) linux_node_config = optional(object({ sysctls = optional(map(string)) cgroup_mode = optional(string) })) local_ssd_count = optional(number) machine_type = optional(string) metadata = optional(map(string)) min_cpu_platform = optional(string) preemptible = optional(bool) sandbox_config_gvisor = optional(bool) shielded_instance_config = optional(object({ enable_integrity_monitoring = optional(bool) enable_secure_boot = optional(bool) })) spot = optional(bool) workload_metadata_config_mode = optional(string) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [node_count](variables.tf#L169) | Number of nodes per instance group. Initial value can only be changed by recreation, current is ignored when autoscaling is used. | <code title="object({ current = optional(number) initial = number })">object({…})</code> | | <code title="{ initial = 1 }">{…}</code> |
|
|
|
|
|
| [node_locations](variables.tf#L181) | Node locations. | <code>list(string)</code> | | <code>null</code> |
|
|
|
|
|
| [nodepool_config](variables.tf#L187) | Nodepool-level configuration. | <code title="object({ autoscaling = optional(object({ location_policy = optional(string) max_node_count = optional(number) min_node_count = optional(number) use_total_nodes = optional(bool, false) })) management = optional(object({ auto_repair = optional(bool) auto_upgrade = optional(bool) })) placement_policy = optional(object({ type = string policy_name = optional(string) tpu_topology = optional(string) })) queued_provisioning = optional(bool, false) upgrade_settings = optional(object({ max_surge = number max_unavailable = number strategy = optional(string) blue_green_settings = optional(object({ node_pool_soak_duration = optional(string) standard_rollout_policy = optional(object({ batch_percentage = optional(number) batch_node_count = optional(number) batch_soak_duration = optional(string) })) })) })) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [reservation_affinity](variables.tf#L228) | Configuration of the desired reservation which instances could take capacity from. | <code title="object({ consume_reservation_type = string key = optional(string) values = optional(list(string)) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [resource_manager_tags](variables.tf#L238) | A map of resource manager tag keys and values to be attached to the nodes for managing Compute Engine firewalls using Network Firewall Policies. | <code>map(string)</code> | | <code>null</code> |
|
|
|
|
|
| [service_account](variables.tf#L244) | Nodepool service account. If this variable is set to null, the default GCE service account will be used. If set and email is null, a service account will be created. If scopes are null a default will be used. | <code title="object({ create = optional(bool, false) email = optional(string) oauth_scopes = optional(list(string)) display_name = optional(string) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [sole_tenant_nodegroup](variables.tf#L256) | Sole tenant node group. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [tags](variables.tf#L262) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
|
|
|
|
| [taints](variables.tf#L268) | Kubernetes taints applied to all nodes. | <code title="map(object({ value = string effect = string }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|
|
|
|
|
|