Added missing parameters in kubelet and linux node conf (#1918)
This commit is contained in:
parent
d2d62b71e2
commit
6cb3eb5390
|
@ -143,22 +143,22 @@ module "cluster-1-nodepool-gpu-1" {
|
|||
|---|---|:---:|:---:|:---:|
|
||||
| [cluster_name](variables.tf#L23) | Cluster name. | <code>string</code> | ✓ | |
|
||||
| [location](variables.tf#L41) | Cluster location. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L166) | Cluster project id. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L170) | 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> |
|
||||
| [labels](variables.tf#L34) | Kubernetes labels applied to each node. | <code>map(string)</code> | | <code>{}</code> |
|
||||
| [max_pods_per_node](variables.tf#L46) | Maximum number of pods per node. | <code>number</code> | | <code>null</code> |
|
||||
| [name](variables.tf#L52) | Optional nodepool name. | <code>string</code> | | <code>null</code> |
|
||||
| [node_config](variables.tf#L58) | Node-level configuration. | <code title="object({ boot_disk_kms_key = optional(string) disk_size_gb = optional(number) disk_type = optional(string) 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) })) linux_node_config_sysctls = optional(map(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 title="{ disk_type = "pd-balanced" }">{…}</code> |
|
||||
| [node_count](variables.tf#L113) | 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#L125) | Node locations. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [nodepool_config](variables.tf#L131) | 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) })) upgrade_settings = optional(object({ max_surge = number max_unavailable = number })) })">object({…})</code> | | <code>null</code> |
|
||||
| [pod_range](variables.tf#L153) | Pod secondary range configuration. | <code title="object({ secondary_pod_range = object({ name = string cidr = optional(string) create = optional(bool) enable_private_nodes = optional(bool) }) })">object({…})</code> | | <code>null</code> |
|
||||
| [reservation_affinity](variables.tf#L171) | 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> |
|
||||
| [service_account](variables.tf#L181) | 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)) })">object({…})</code> | | <code>{}</code> |
|
||||
| [sole_tenant_nodegroup](variables.tf#L192) | Sole tenant node group. | <code>string</code> | | <code>null</code> |
|
||||
| [tags](variables.tf#L198) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [taints](variables.tf#L204) | Kubernetes taints applied to all nodes. | <code title="map(object({ value = string effect = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [node_config](variables.tf#L58) | Node-level configuration. | <code title="object({ boot_disk_kms_key = optional(string) disk_size_gb = optional(number) disk_type = optional(string) 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) pod_pids_limit = optional(number) })) 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 title="{ disk_type = "pd-balanced" }">{…}</code> |
|
||||
| [node_count](variables.tf#L117) | 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#L129) | Node locations. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [nodepool_config](variables.tf#L135) | 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) })) upgrade_settings = optional(object({ max_surge = number max_unavailable = number })) })">object({…})</code> | | <code>null</code> |
|
||||
| [pod_range](variables.tf#L157) | Pod secondary range configuration. | <code title="object({ secondary_pod_range = object({ name = string cidr = optional(string) create = optional(bool) enable_private_nodes = optional(bool) }) })">object({…})</code> | | <code>null</code> |
|
||||
| [reservation_affinity](variables.tf#L175) | 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> |
|
||||
| [service_account](variables.tf#L185) | 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)) })">object({…})</code> | | <code>{}</code> |
|
||||
| [sole_tenant_nodegroup](variables.tf#L196) | Sole tenant node group. | <code>string</code> | | <code>null</code> |
|
||||
| [tags](variables.tf#L202) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [taints](variables.tf#L208) | Kubernetes taints applied to all nodes. | <code title="map(object({ value = string effect = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
|
|
@ -201,12 +201,14 @@ resource "google_container_node_pool" "nodepool" {
|
|||
cpu_manager_policy = var.node_config.kubelet_config.cpu_manager_policy
|
||||
cpu_cfs_quota = var.node_config.kubelet_config.cpu_cfs_quota
|
||||
cpu_cfs_quota_period = var.node_config.kubelet_config.cpu_cfs_quota_period
|
||||
pod_pids_limit = var.node_config.kubelet_config.pod_pids_limit
|
||||
}
|
||||
}
|
||||
dynamic "linux_node_config" {
|
||||
for_each = var.node_config.linux_node_config_sysctls != null ? [""] : []
|
||||
for_each = var.node_config.linux_node_config != null ? [""] : []
|
||||
content {
|
||||
sysctls = var.node_config.linux_node_config_sysctls
|
||||
sysctls = var.node_config.linux_node_config.sysctls
|
||||
cgroup_mode = try(var.node_config.linux_node_config.cgroup_mode, "CGROUP_MODE_UNSPECIFIED")
|
||||
}
|
||||
}
|
||||
dynamic "reservation_affinity" {
|
||||
|
|
|
@ -79,14 +79,18 @@ variable "node_config" {
|
|||
cpu_manager_policy = string
|
||||
cpu_cfs_quota = optional(bool)
|
||||
cpu_cfs_quota_period = optional(string)
|
||||
pod_pids_limit = optional(number)
|
||||
}))
|
||||
linux_node_config_sysctls = optional(map(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)
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue