Commit b3540cc2 authored by John Jarvis's avatar John Jarvis

Draft: alternate cluster POC

parent 13e1417e
......@@ -515,6 +515,84 @@ module "gitlab-gke" {
}
}
# // Second cluster
# module "gitlab-gke-1" {
# environment = var.environment
# name = "gitlab-gke-1"
# vpc = module.network.self_link
# source = "git::ssh://[email protected]/gitlab-com/gl-infra/terraform-modules/google/gke.git?ref=cee024f"
# enable_workload_identity = "true"
# ip_cidr_range = var.subnetworks["gitlab-gke-1"]
# disable_network_policy = "false"
# dns_zone_name = var.dns_zone_name
# kubernetes_version = "1.16.10-gke.8"
# node_network_policy = "true"
# private_cluster = "true"
# private_master_cidr = var.master_cidr_subnets["gitlab-gke-1"]
# project = var.project
# region = var.region
# pod_ip_cidr_range = var.subnetworks["gitlab-gke-pod-cidr-1"]
# service_ip_cidr_range = var.subnetworks["gitlab-gke-service-cidr-1"]
# node_pools = {
# "default-1-1" = {
# initial_node_count = "1"
# machine_type = var.machine_types["gitlab-gke"]
# max_node_count = "5"
# node_auto_repair = "true"
# node_auto_upgrade = "false"
# node_disk_size_gb = "50"
# node_disk_type = "pd-standard"
# preemptible = "true"
# type = "default"
# }
# "sidekiq-memory-bound-1-1" = {
# initial_node_count = "1"
# machine_type = var.machine_types["gitlab-gke-sidekiq"]
# max_node_count = "3"
# node_auto_repair = "true"
# node_auto_upgrade = "false"
# node_disk_size_gb = "50"
# node_disk_type = "pd-standard"
# preemptible = "true"
# type = "memory-bound"
# }
# "sidekiq-low-urgency-cpu-bound-1-1" = {
# initial_node_count = "1"
# machine_type = var.machine_types["gitlab-gke-sidekiq"]
# max_node_count = "3"
# node_auto_repair = "true"
# node_auto_upgrade = "false"
# node_disk_size_gb = "50"
# node_disk_type = "pd-standard"
# preemptible = "true"
# type = "low-urgency-cpu-bound"
# }
# "sidekiq-urgent-other-1-1" = {
# initial_node_count = "1"
# machine_type = var.machine_types["gitlab-gke-sidekiq"]
# max_node_count = "3"
# node_auto_repair = "true"
# node_auto_upgrade = "false"
# node_disk_size_gb = "50"
# node_disk_type = "pd-standard"
# preemptible = "true"
# type = "urgent-other"
# }
# "sidekiq-urgent-cpu-bound-1-1" = {
# initial_node_count = "1"
# machine_type = var.machine_types["gitlab-gke-sidekiq"]
# max_node_count = "3"
# node_auto_repair = "true"
# node_auto_upgrade = "false"
# node_disk_size_gb = "50"
# node_disk_type = "pd-standard"
# preemptible = "true"
# type = "urgent-cpu-bound"
# }
# }
# }
// Allow GKE to talk to the prometheus operator which utilizes port 8443
resource "google_compute_firewall" "gke-master-to-kubelet" {
name = "k8s-api-to-kubelets"
......
......@@ -104,26 +104,29 @@ variable "subnetworks" {
type = map(string)
default = {
"bastion" = "10.232.1.0/24"
"monitoring" = "10.232.3.0/24"
"fe-lb" = "10.232.9.0/24"
"fe-lb-pages" = "10.232.10.0/24"
"fe-lb-registry" = "10.232.11.0/24"
"web" = "10.232.13.0/24"
"api" = "10.232.14.0/24"
"git" = "10.232.15.0/24"
"sidekiq" = "10.232.16.0/24"
"web-pages" = "10.232.17.0/24"
"gitaly" = "10.232.18.0/24"
"deploy" = "10.232.19.0/24"
"gitlab-gke" = "10.232.20.0/24"
"consul" = "10.232.22.0/24"
"pubsubbeat" = "10.232.23.0/24"
"thanos-compact" = "10.232.25.0/24"
"thanos-store" = "10.232.26.0/24"
"praefect" = "10.232.27.0/24"
"gitlab-gke-pod-cidr" = "10.235.0.0/16"
"gitlab-gke-service-cidr" = "10.236.0.0/16"
"bastion" = "10.232.1.0/24"
"monitoring" = "10.232.3.0/24"
"fe-lb" = "10.232.9.0/24"
"fe-lb-pages" = "10.232.10.0/24"
"fe-lb-registry" = "10.232.11.0/24"
"web" = "10.232.13.0/24"
"api" = "10.232.14.0/24"
"git" = "10.232.15.0/24"
"sidekiq" = "10.232.16.0/24"
"web-pages" = "10.232.17.0/24"
"gitaly" = "10.232.18.0/24"
"deploy" = "10.232.19.0/24"
"gitlab-gke" = "10.232.20.0/24"
"consul" = "10.232.22.0/24"
"pubsubbeat" = "10.232.23.0/24"
"thanos-compact" = "10.232.25.0/24"
"thanos-store" = "10.232.26.0/24"
"praefect" = "10.232.27.0/24"
"gitlab-gke-1" = "10.232.28.0/24"
"gitlab-gke-pod-cidr" = "10.235.0.0/16"
"gitlab-gke-service-cidr" = "10.236.0.0/16"
"gitlab-gke-pod-cidr-1" = "10.248.0.0/16"
"gitlab-gke-service-cidr-1" = "10.249.0.0/16"
# /mnt/storage
"filestore-storage" = "10.237.0.0/29"
}
......@@ -133,7 +136,8 @@ variable "master_cidr_subnets" {
type = map(string)
default = {
"gitlab-gke" = "172.16.0.0/28"
"gitlab-gke" = "172.16.0.0/28" # 172.16.0.1 - 172.16.0.14
"gitlab-gke-1" = "172.16.1.0/28" # 172.16.1.1 - 172.16.1.14
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment