mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-05-23 17:23:00 +00:00
GCP quotas are fairly limited (on my account, I can only use 8 public IP addresses per zone, which means that I cannot deploy many public clusters in a single zone). I tried to use private clusters, but that causes other problems. This refactoring makes it possible to spread clusters across multiple zones. Since I have access to 20+ zones in Europe and 20+ zones in the US, this lets me create a lot of public clusters and simplifies the module quite a bit.
18 lines
469 B
HCL
18 lines
469 B
HCL
resource "linode_lke_cluster" "_" {
|
|
label = var.cluster_name
|
|
tags = var.common_tags
|
|
# "region" is mandatory, so let's provide a default value if none was given.
|
|
region = var.location != null ? var.location : "eu-central"
|
|
k8s_version = var.k8s_version
|
|
|
|
pool {
|
|
type = local.node_type
|
|
count = var.min_nodes_per_pool
|
|
autoscaler {
|
|
min = var.min_nodes_per_pool
|
|
max = max(var.min_nodes_per_pool, var.max_nodes_per_pool)
|
|
}
|
|
}
|
|
|
|
}
|