mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-27 16:51:21 +00:00
🏭️ Refactor prepare-tf
- fix tags so that they don't contain '=' - install metrics-server only if necessary - set a maximum size to GKE node pool - change tags to be shorter
This commit is contained in:
@@ -3,14 +3,18 @@ resource "google_container_cluster" "_" {
|
||||
project = "prepare-tf"
|
||||
location = "europe-north1-a"
|
||||
min_master_version = var.k8s_version
|
||||
initial_node_count = var.min_nodes_per_pool
|
||||
#max_size = max(var.min_nodes_per_pool, var.max_nodes_per_pool)
|
||||
#autoscaling = true
|
||||
#autohealing = true
|
||||
|
||||
node_config {
|
||||
tags = var.common_tags
|
||||
machine_type = local.node_type
|
||||
node_pool {
|
||||
name = "x86"
|
||||
node_config {
|
||||
tags = var.common_tags
|
||||
machine_type = local.node_type
|
||||
}
|
||||
initial_node_count = var.min_nodes_per_pool
|
||||
autoscaling {
|
||||
min_node_count = var.min_nodes_per_pool
|
||||
max_node_count = max(var.min_nodes_per_pool, var.max_nodes_per_pool)
|
||||
}
|
||||
}
|
||||
|
||||
# This is not strictly necessary.
|
||||
@@ -23,3 +27,4 @@ resource "google_container_cluster" "_" {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,3 +29,7 @@ output "kubeconfig" {
|
||||
output "cluster_id" {
|
||||
value = google_container_cluster._.id
|
||||
}
|
||||
|
||||
output "has_metrics_server" {
|
||||
value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user