Skip to content

Commit

Permalink
feat: remove un needed node pool (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexouzounis authored Feb 28, 2020
1 parent 0c72d75 commit 68716cc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
23 changes: 16 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ resource "google_project_service" "project" {

## Modules
module "gke-cluster" {
source = "github.com/ouzi-dev/gke-terraform.git?ref=v0.6.0"
# source = "../gke-terraform"
source = "github.com/ouzi-dev/gke-terraform.git?ref=v0.6.1"
#source = "../gke-terraform"
region = var.gcloud_region
project = var.gcloud_project

Expand All @@ -48,7 +48,6 @@ module "gke-cluster" {
kubernetes_version = var.gke_kubernetes_version

machine_type = var.gke_machine_type
big_machine_type = var.gke_big_machine_type
machine_disk_size = var.gke_machine_disk_size
machine_is_preemptible = var.gke_machine_is_preemptible
min_nodes = var.gke_min_nodes
Expand All @@ -72,7 +71,7 @@ locals {
}

module "image-build-workers" {
source = "github.com/ouzi-dev/gke-terraform.git//modules/gke-workers?ref=v0.5.2"
source = "github.com/ouzi-dev/gke-terraform.git//modules/gke-workers?ref=v0.6.1"
#source = "../gke-terraform/modules/gke-workers"
region = var.gcloud_region

Expand Down Expand Up @@ -156,9 +155,19 @@ resource "google_service_account" "preemptible_killer" {
}

### Set IAM for preemptible-killer to zap nodes
resource "google_project_iam_member" "preemptible_killer" {
role = "compute.instances.delete"
member = "serviceAccount:${google_service_account.preemptible_killer.email}"
resource "google_project_iam_binding" "preemptible_killer_compute_admin" {
role = "roles/compute.admin"
members = [
"serviceAccount:${google_service_account.preemptible_killer.email}",
]
}

### Set IAM for preemptible-killer to zap nodes
resource "google_project_iam_binding" "preemptible_killer_container_admin" {
role = "roles/container.admin"
members = [
"serviceAccount:${google_service_account.preemptible_killer.email}",
]
}

### Key for the Preemptible killer Service Account
Expand Down
5 changes: 0 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ variable "gke_kubernetes_version" {

variable "gke_machine_type" {
description = "Instance type for the primary pool of workers"
default = "n2-standard-2"
}

variable "gke_big_machine_type" {
description = "Instance type for the beefier pool of workers"
default = "n2-standard-4"
}

Expand Down

0 comments on commit 68716cc

Please sign in to comment.