Skip to content

Commit

Permalink
feat: add support new v3 google provider (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexouzounis authored Feb 18, 2020
1 parent 1a0f0f9 commit c687e42
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 14 deletions.
16 changes: 9 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module "network" {
source = "./modules/network"
region = var.region
cluster_name = var.cluster_name
node_cidr_range = var.node_cidr_range
pod_cidr_range = var.pod_cidr_range
service_cidr_range = var.service_cidr_range
master_cidr_range = var.master_cidr_range
source = "./modules/network"
region = var.region
cluster_name = var.cluster_name
node_cidr_range = var.node_cidr_range
pod_cidr_range = var.pod_cidr_range
service_cidr_range = var.service_cidr_range
master_cidr_range = var.master_cidr_range
workers_ports_from_master = var.network_allow_workers_ports_from_master
}

Expand All @@ -26,6 +26,8 @@ module "cluster" {
disable_network_policy = var.disable_network_policy
authenticator_groups_security_group = var.authenticator_groups_security_group
enable_calico = var.enable_calico
logging_service = var.logging_service
monitoring_service = var.monitoring_service
}

module "default_workers" {
Expand Down
7 changes: 3 additions & 4 deletions modules/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ resource "google_container_cluster" "k8s-cluster" {
min_master_version = var.master_version
enable_legacy_abac = false

logging_service = var.logging_service
logging_service = var.logging_service
monitoring_service = var.monitoring_service

lifecycle {
ignore_changes = [min_master_version]
}
Expand Down Expand Up @@ -59,9 +61,6 @@ resource "google_container_cluster" "k8s-cluster" {
http_load_balancing {
disabled = var.disable_lb
}
kubernetes_dashboard {
disabled = var.disable_dashboard
}
network_policy_config {
disabled = var.disable_network_policy
}
Expand Down
6 changes: 5 additions & 1 deletion modules/gke-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ variable "enable_calico" {
}

variable "logging_service" {
default = "none"
default = "logging.googleapis.com/kubernetes"
}

variable "monitoring_service" {
default = "monitoring.googleapis.com/kubernetes"
}

variable "authenticator_groups_security_group" {
Expand Down
12 changes: 10 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ variable "machine_disk_size" {

variable "machine_disk_type" {
description = "Disk type for the primary pool of workers"
default = "pd-standard"
default = "pd-standard"
}

variable "machine_is_preemptible" {
Expand Down Expand Up @@ -107,7 +107,7 @@ variable "enable_calico" {
}

variable "network_allow_workers_ports_from_master" {
type = list
type = list
default = ["443", "6443", "8443"]
}

Expand All @@ -117,4 +117,12 @@ variable "init_nodes" {
variable "authenticator_groups_security_group" {
type = string
default = null
}

variable "logging_service" {
default = "logging.googleapis.com/kubernetes"
}

variable "monitoring_service" {
default = "monitoring.googleapis.com/kubernetes"
}

0 comments on commit c687e42

Please sign in to comment.