Add spot vm support to gke-nodepool
This commit is contained in:
@@ -41,7 +41,7 @@ module "cluster-1-nodepool-1" {
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [cluster_name](variables.tf#L26) | Cluster name. | <code>string</code> | ✓ | |
|
||||
| [location](variables.tf#L59) | Cluster location. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L210) | Cluster project id. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L216) | Cluster project id. | <code>string</code> | ✓ | |
|
||||
| [autoscaling_config](variables.tf#L17) | Optional autoscaling configuration. | <code title="object({ min_node_count = number max_node_count = number })">object({…})</code> | | <code>null</code> |
|
||||
| [gke_version](variables.tf#L31) | Kubernetes nodes version. Ignored if auto_upgrade is set in management_config. | <code>string</code> | | <code>null</code> |
|
||||
| [initial_node_count](variables.tf#L37) | Initial number of nodes for the pool. | <code>number</code> | | <code>1</code> |
|
||||
@@ -68,10 +68,11 @@ module "cluster-1-nodepool-1" {
|
||||
| [node_service_account_create](variables.tf#L174) | Auto-create service account. | <code>bool</code> | | <code>false</code> |
|
||||
| [node_service_account_scopes](variables.tf#L182) | Scopes applied to service account. Default to: 'cloud-platform' when creating a service account; 'devstorage.read_only', 'logging.write', 'monitoring.write' otherwise. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [node_shielded_instance_config](variables.tf#L188) | Shielded instance options. | <code title="object({ enable_secure_boot = bool enable_integrity_monitoring = bool })">object({…})</code> | | <code>null</code> |
|
||||
| [node_tags](variables.tf#L197) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [node_taints](variables.tf#L203) | Kubernetes taints applied to nodes. E.g. type=blue:NoSchedule. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [upgrade_config](variables.tf#L215) | Optional node upgrade configuration. | <code title="object({ max_surge = number max_unavailable = number })">object({…})</code> | | <code>null</code> |
|
||||
| [workload_metadata_config](variables.tf#L224) | Metadata configuration to expose to workloads on the node pool. | <code>string</code> | | <code>"GKE_METADATA"</code> |
|
||||
| [node_spot](variables.tf#L197) | Use Spot VMs for nodes. | <code>bool</code> | | <code>null</code> |
|
||||
| [node_tags](variables.tf#L203) | Network tags applied to nodes. | <code>list(string)</code> | | <code>null</code> |
|
||||
| [node_taints](variables.tf#L209) | Kubernetes taints applied to nodes. E.g. type=blue:NoSchedule. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [upgrade_config](variables.tf#L221) | Optional node upgrade configuration. | <code title="object({ max_surge = number max_unavailable = number })">object({…})</code> | | <code>null</code> |
|
||||
| [workload_metadata_config](variables.tf#L230) | Metadata configuration to expose to workloads on the node pool. | <code>string</code> | | <code>"GKE_METADATA"</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
|
||||
@@ -105,6 +105,7 @@ resource "google_container_node_pool" "nodepool" {
|
||||
service_account = local.service_account_email
|
||||
tags = var.node_tags
|
||||
boot_disk_kms_key = var.node_boot_disk_kms_key
|
||||
spot = var.node_spot
|
||||
|
||||
dynamic "guest_accelerator" {
|
||||
for_each = var.node_guest_accelerator
|
||||
|
||||
@@ -194,6 +194,12 @@ variable "node_shielded_instance_config" {
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "node_spot" {
|
||||
description = "Use Spot VMs for nodes."
|
||||
type = bool
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "node_tags" {
|
||||
description = "Network tags applied to nodes."
|
||||
type = list(string)
|
||||
|
||||
Reference in New Issue
Block a user