From 1cf963b443eb1dcbed166dff9f964a0600355a2e Mon Sep 17 00:00:00 2001 From: Daniel Marzini <44803752+danielmarzini@users.noreply.github.com> Date: Tue, 2 Aug 2022 21:41:36 +0200 Subject: [PATCH] added spot vm --- fast/stages/03-gke-multitenant/_module/README.md | 8 ++++---- fast/stages/03-gke-multitenant/_module/gke-nodepools.tf | 1 + fast/stages/03-gke-multitenant/_module/variables.tf | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fast/stages/03-gke-multitenant/_module/README.md b/fast/stages/03-gke-multitenant/_module/README.md index 4528d5b0..8c2d5cd3 100644 --- a/fast/stages/03-gke-multitenant/_module/README.md +++ b/fast/stages/03-gke-multitenant/_module/README.md @@ -43,9 +43,9 @@ TODO | [billing_account_id](variables.tf#L27) | Billing account id. | string | ✓ | | | | [clusters](variables.tf#L61) | | map(object({…})) | ✓ | | | | [folder_id](variables.tf#L163) | Folder used for the GKE project in folders/nnnnnnnnnnn format. | string | ✓ | | | -| [nodepools](variables.tf#L206) | | map(map(object({…}))) | ✓ | | | -| [prefix](variables.tf#L223) | Prefix used for resources that need unique names. | string | ✓ | | | -| [vpc_config](variables.tf#L235) | Shared VPC project and VPC details. | object({…}) | ✓ | | | +| [nodepools](variables.tf#L206) | | map(map(object({…}))) | ✓ | | | +| [prefix](variables.tf#L224) | Prefix used for resources that need unique names. | string | ✓ | | | +| [vpc_config](variables.tf#L236) | Shared VPC project and VPC details. | object({…}) | ✓ | | | | [authenticator_security_group](variables.tf#L21) | Optional group used for Groups for GKE. | string | | null | | | [cluster_defaults](variables.tf#L32) | Default values for optional cluster configurations. | object({…}) | | {…} | | | [dns_domain](variables.tf#L94) | Domain name used for clusters, prefixed by each cluster name. Leave null to disable Cloud DNS for GKE. | string | | null | | @@ -57,7 +57,7 @@ TODO | [iam](variables.tf#L175) | Project-level authoritative IAM bindings for users and service accounts in {ROLE => [MEMBERS]} format. | map(list(string)) | | {} | | | [labels](variables.tf#L182) | Project-level labels. | map(string) | | {} | | | [nodepool_defaults](variables.tf#L188) | | object({…}) | | {…} | | -| [project_services](variables.tf#L228) | Additional project services to enable. | list(string) | | [] | | +| [project_services](variables.tf#L229) | Additional project services to enable. | list(string) | | [] | | ## Outputs diff --git a/fast/stages/03-gke-multitenant/_module/gke-nodepools.tf b/fast/stages/03-gke-multitenant/_module/gke-nodepools.tf index 703c9d71..ed95a02b 100644 --- a/fast/stages/03-gke-multitenant/_module/gke-nodepools.tf +++ b/fast/stages/03-gke-multitenant/_module/gke-nodepools.tf @@ -38,6 +38,7 @@ module "gke-nodepool" { node_machine_type = each.value.node_type # TODO(jccb): can we use spot instances here? node_preemptible = each.value.preemptible + node_spot = each.value.spot node_count = each.value.node_count # node_count = ( diff --git a/fast/stages/03-gke-multitenant/_module/variables.tf b/fast/stages/03-gke-multitenant/_module/variables.tf index 35df5615..0f3fe77c 100644 --- a/fast/stages/03-gke-multitenant/_module/variables.tf +++ b/fast/stages/03-gke-multitenant/_module/variables.tf @@ -217,6 +217,7 @@ variable "nodepools" { node_taints = list(string) }) preemptible = bool + spot = bool }))) }