From 2935def3c7a3d3ade0f158364428946c79642f52 Mon Sep 17 00:00:00 2001 From: garland Date: Tue, 6 Aug 2019 13:55:46 -0700 Subject: [PATCH] Separating the node pools Signed-off-by: garland --- tf-modules/gcp/private-gke-cluster/main.tf | 69 ++++++++++++---------- tf-modules/gcp/vpc/main.tf | 1 + 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/tf-modules/gcp/private-gke-cluster/main.tf b/tf-modules/gcp/private-gke-cluster/main.tf index 28eb231ca..25131a6f9 100644 --- a/tf-modules/gcp/private-gke-cluster/main.tf +++ b/tf-modules/gcp/private-gke-cluster/main.tf @@ -94,6 +94,13 @@ resource "google_container_cluster" "primary" { enable_legacy_abac = false + maintenance_policy { + daily_maintenance_window { + start_time = "03:00" + } + } + + addons_config { http_load_balancing { disabled = "${var.http_load_balancing}" @@ -129,34 +136,34 @@ resource "google_container_cluster" "primary" { depends_on = ["google_compute_subnetwork.private_subnet"] } -resource "google_container_node_pool" "primary_preemptible_nodes" { - name = "generic-pool" - location = "${var.region}" - cluster = "${google_container_cluster.primary.name}" - node_count = 1 - autoscaling = { - min_node_count = 0 - max_node_count = 5 - } - - node_config { - preemptible = true - machine_type = "n1-standard-1" - - metadata = { - disable-legacy-endpoints = "true" - } - - oauth_scopes = [ - "https://www.googleapis.com/auth/logging.write", - "https://www.googleapis.com/auth/monitoring", - ] - - labels = "${var.labels}" - - tags = "${var.tags}" - - # taints = "${var.taints}" - - } -} +# resource "google_container_node_pool" "primary_preemptible_nodes" { +# name = "generic-pool" +# location = "${var.region}" +# cluster = "${google_container_cluster.primary.name}" +# node_count = 1 +# autoscaling = { +# min_node_count = 0 +# max_node_count = 5 +# } +# +# node_config { +# preemptible = true +# machine_type = "n1-standard-1" +# +# metadata = { +# disable-legacy-endpoints = "true" +# } +# +# oauth_scopes = [ +# "https://www.googleapis.com/auth/logging.write", +# "https://www.googleapis.com/auth/monitoring", +# ] +# +# labels = "${var.labels}" +# +# tags = "${var.tags}" +# +# # taints = "${var.taints}" +# +# } +# } diff --git a/tf-modules/gcp/vpc/main.tf b/tf-modules/gcp/vpc/main.tf index bbad1171b..f59312cc3 100644 --- a/tf-modules/gcp/vpc/main.tf +++ b/tf-modules/gcp/vpc/main.tf @@ -1,5 +1,6 @@ terraform { backend "s3" {} + # backend "gcs" {} } provider "google" {